Bug 720475 - dracut only accepts LVM ID_FS_TYPE="LVM?_member" and can not find root device if otherwise
Summary: dracut only accepts LVM ID_FS_TYPE="LVM?_member" and can not find root device...
Keywords:
Status: CLOSED NOTABUG
Alias: None
Product: Fedora
Classification: Fedora
Component: util-linux-ng
Version: rawhide
Hardware: Unspecified
OS: Linux
unspecified
unspecified
Target Milestone: ---
Assignee: Karel Zak
QA Contact: Fedora Extras Quality Assurance
URL:
Whiteboard:
Depends On:
Blocks:
TreeView+ depends on / blocked
 
Reported: 2011-07-11 18:21 UTC by Dirk Remmelt
Modified: 2011-07-15 11:10 UTC (History)
4 users (show)

Fixed In Version:
Doc Type: Bug Fix
Doc Text:
Clone Of:
Environment:
Last Closed: 2011-07-15 11:10:25 UTC
Type: ---


Attachments (Terms of Use)

Description Dirk Remmelt 2011-07-11 18:21:26 UTC
Description of problem:
dracut can not automatically find LVM1 root volume, which has ID_FS_TYPE=ext3 (in my case).

Version-Release number of selected component (if applicable):
Problem exists in my opinion since initramfs was generated with dracut.
Current versions:
dracut-011-0.1.git9b30d47.fc16.i686
grubby-7.0.18-1.fc16.i686
kernel-3.0-0.rc6.git6.1.fc16.i686

How reproducible:
Always.

Steps to Reproduce:
1. execute new-kernel-pkg as in installation script of kernel rpm
2. reboot
3.
  
Actual results:
Boot fails, because dracut can not find root device and exits into dracut shell.

Expected results:
dracut should find root device and boot from it.

Additional info:
Logical volume was generated with lvm1 a long time ago.
Volume Group is of LVM2 format (according to vgdisplay).
blkid -o udev -p <root-device> shows:
ID_FS_TYPE=ext3
dracut only accepts LVM volumes with:
ID_FS_TYPE="LVM?_member"
Root device can be found and booted from if either:
1. entering the folowing in dracut shell after boot fails:
   # lvm_scan
   # exit
2. dracut 64-lvm.rules file changed to (in my case):
   ENV{ID_FS_TYPE}!="ext3", GOTO="lvm_end"

Comment 1 Karel Zak 2011-07-13 09:47:12 UTC
Do you want to say that blkid(8) returns "ext3", but the device is has LVM signature?

Please, I'd like to see:

  # rpm -qf /sbin/blkid

  # BLKID_DEBUG=0xffff blkid -o udev -p <device>

  # hexdump -C -n 1000 <device>

Comment 2 Dirk Remmelt 2011-07-13 09:57:13 UTC
Hello Karel

as requested the additional information:




# rpm -qf /sbin/blkid
util-linux-2.19.1-2.fc16.i686




# BLKID_DEBUG=0xffff blkid -o udev -p /dev/mapper/vg0-root
libblkid: debug mask set to 0xffff.
ready for low-probing, offset=0, size=23228055552
found entire diskname for devno 0xfd00 as dm-0
whole-disk: YES, regfile: NO
zeroize wiper
chain safeprobe superblocks ENABLED
--> starting probing loop [SUBLKS idx=-1]
[0] linux_raid_member:
        call probefunc()
        buffer read: off=23227990016 len=64
        buffer read: off=23228047360 len=256
        buffer read: off=0 len=256
        buffer read: off=4096 len=256
[1] ddf_raid_member:
        call probefunc()
        buffer read: off=23228055040 len=512
        buffer read: off=23227923968 len=512
[2] isw_raid_member:
        call probefunc()
        buffer read: off=23228054528 len=48
[3] lsi_mega_raid_member:
        call probefunc()
        reuse buffer: off=23228055040 len=512
[4] via_raid_member:
        call probefunc()
        reuse buffer: off=23228055040 len=512
[5] silicon_medley_raid_member:
        call probefunc()
        reuse buffer: off=23228055040 len=512
[6] nvidia_raid_member:
        call probefunc()
        reuse buffer: off=23228054528 len=48
[7] promise_fasttrack_raid_member:
        call probefunc()
        buffer read: off=23228023296 len=24
        buffer read: off=23227924992 len=24
        buffer read: off=23227924480 len=24
        reuse buffer: off=23228047360 len=256
        buffer read: off=23227851264 len=24
[8] hpt45x_raid_member:
        call probefunc()
        buffer read: off=23228049920 len=4
[9] hpt37x_raid_member:
        buffer read: off=4096 len=1024
        reuse buffer: off=4096 len=1024
[10] adaptec_raid_member:
        call probefunc()
        reuse buffer: off=23228055040 len=512
[11] jmicron_raid_member:
        call probefunc()
        reuse buffer: off=23228055040 len=512
[12] drbd:
        call probefunc()
        buffer read: off=23228051456 len=4096
[13] LVM2_member:
        buffer read: off=0 len=1024
        reuse buffer: off=0 len=1024
        buffer read: off=1024 len=1024
        reuse buffer: off=1024 len=1024
[14] LVM1_member:
        reuse buffer: off=0 len=1024
[15] DM_snapshot_cow:
        reuse buffer: off=0 len=1024
[16] crypto_LUKS:
        reuse buffer: off=0 len=1024
[17] VMFS_volume_member:
        buffer read: off=1048576 len=1024
[18] vfat:
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
[19] swsuspend:
        reuse buffer: off=0 len=1024
        buffer read: off=3072 len=1024
        reuse buffer: off=3072 len=1024
        reuse buffer: off=3072 len=1024
        reuse buffer: off=3072 len=1024
        buffer read: off=7168 len=1024
        reuse buffer: off=7168 len=1024
        reuse buffer: off=7168 len=1024
        reuse buffer: off=7168 len=1024
        buffer read: off=15360 len=1024
        reuse buffer: off=15360 len=1024
        reuse buffer: off=15360 len=1024
        reuse buffer: off=15360 len=1024
        buffer read: off=31744 len=1024
        reuse buffer: off=31744 len=1024
        reuse buffer: off=31744 len=1024
        reuse buffer: off=31744 len=1024
        buffer read: off=64512 len=1024
        reuse buffer: off=64512 len=1024
        reuse buffer: off=64512 len=1024
        reuse buffer: off=64512 len=1024
[20] swap:
        reuse buffer: off=3072 len=1024
        reuse buffer: off=3072 len=1024
        reuse buffer: off=7168 len=1024
        reuse buffer: off=7168 len=1024
        reuse buffer: off=15360 len=1024
        reuse buffer: off=15360 len=1024
        reuse buffer: off=31744 len=1024
        reuse buffer: off=31744 len=1024
        reuse buffer: off=64512 len=1024
        reuse buffer: off=64512 len=1024
[21] xfs:
        reuse buffer: off=0 len=1024
[22] ext4dev:
        reuse buffer: off=1024 len=1024
        magic sboff=56, kboff=1
        call probefunc()
        reuse buffer: off=1024 len=1024
[23] ext4:
        reuse buffer: off=1024 len=1024
        magic sboff=56, kboff=1
        call probefunc()
        reuse buffer: off=1024 len=1024
[24] ext3:
        reuse buffer: off=1024 len=1024
        magic sboff=56, kboff=1
        call probefunc()
        reuse buffer: off=1024 len=1024
ext2_sb.compat = 0000003C:00000006:00000003
assigning UUID [superblocks]
assigning VERSION [superblocks]
assigning TYPE [superblocks]
assigning USAGE [superblocks]
<-- leaving probing loop (type=ext3) [SUBLKS idx=24]
--> starting probing loop [SUBLKS idx=24]
[25] ext2:
        reuse buffer: off=1024 len=1024
        magic sboff=56, kboff=1
        call probefunc()
        reuse buffer: off=1024 len=1024
[26] jbd:
        reuse buffer: off=1024 len=1024
        magic sboff=56, kboff=1
        call probefunc()
        reuse buffer: off=1024 len=1024
[27] reiserfs:
        buffer read: off=8192 len=1024
        buffer read: off=65536 len=1024
        reuse buffer: off=65536 len=1024
        reuse buffer: off=65536 len=1024
        reuse buffer: off=8192 len=1024
[28] reiser4:
        reuse buffer: off=65536 len=1024
[29] jfs:
        buffer read: off=32768 len=1024
[30] udf:
        reuse buffer: off=32768 len=1024
        reuse buffer: off=32768 len=1024
        reuse buffer: off=32768 len=1024
        reuse buffer: off=32768 len=1024
        reuse buffer: off=32768 len=1024
        reuse buffer: off=32768 len=1024
        reuse buffer: off=32768 len=1024
[31] iso9660:
        reuse buffer: off=32768 len=1024
        reuse buffer: off=32768 len=1024
[32] zfs_member:
        call probefunc()
        buffer read: off=131072 len=41
        buffer read: off=135168 len=41
        buffer read: off=139264 len=41
        buffer read: off=143360 len=41
        buffer read: off=147456 len=41
        buffer read: off=151552 len=41
        buffer read: off=155648 len=41
        buffer read: off=159744 len=41
        buffer read: off=163840 len=41
        buffer read: off=167936 len=41
        buffer read: off=172032 len=41
        buffer read: off=176128 len=41
        buffer read: off=180224 len=41
        buffer read: off=184320 len=41
        buffer read: off=188416 len=41
        buffer read: off=192512 len=41
        buffer read: off=196608 len=41
        buffer read: off=200704 len=41
        buffer read: off=204800 len=41
        buffer read: off=208896 len=41
        buffer read: off=212992 len=41
        buffer read: off=217088 len=41
        buffer read: off=221184 len=41
        buffer read: off=225280 len=41
        buffer read: off=229376 len=41
        buffer read: off=233472 len=41
        buffer read: off=237568 len=41
        buffer read: off=241664 len=41
        buffer read: off=245760 len=41
        buffer read: off=249856 len=41
        buffer read: off=253952 len=41
        buffer read: off=258048 len=41
        buffer read: off=393216 len=41
        buffer read: off=397312 len=41
        buffer read: off=401408 len=41
        buffer read: off=405504 len=41
        buffer read: off=409600 len=41
        buffer read: off=413696 len=41
        buffer read: off=417792 len=41
        buffer read: off=421888 len=41
        buffer read: off=425984 len=41
        buffer read: off=430080 len=41
        buffer read: off=434176 len=41
        buffer read: off=438272 len=41
        buffer read: off=442368 len=41
        buffer read: off=446464 len=41
        buffer read: off=450560 len=41
        buffer read: off=454656 len=41
        buffer read: off=458752 len=41
        buffer read: off=462848 len=41
        buffer read: off=466944 len=41
        buffer read: off=471040 len=41
        buffer read: off=475136 len=41
        buffer read: off=479232 len=41
        buffer read: off=483328 len=41
        buffer read: off=487424 len=41
        buffer read: off=491520 len=41
        buffer read: off=495616 len=41
        buffer read: off=499712 len=41
        buffer read: off=503808 len=41
        buffer read: off=507904 len=41
        buffer read: off=512000 len=41
        buffer read: off=516096 len=41
        buffer read: off=520192 len=41
[33] hfsplus:
        reuse buffer: off=1024 len=1024
        reuse buffer: off=1024 len=1024
        reuse buffer: off=1024 len=1024
[34] hfs:
        reuse buffer: off=1024 len=1024
[35] ufs:
        call probefunc()
        buffer read: off=0 len=1377
        buffer read: off=8192 len=1377
        buffer read: off=65536 len=1377
        buffer read: off=262144 len=1377
[36] hpfs:
        reuse buffer: off=8192 len=1024
[37] sysv:
        call probefunc()
        reuse buffer: off=0 len=1024
        buffer read: off=9728 len=512
        reuse buffer: off=15360 len=1024
        buffer read: off=18944 len=512
[38] xenix:
        buffer read: off=2048 len=1024
        reuse buffer: off=2048 len=1024
[39] ntfs:
        reuse buffer: off=0 len=1024
[40] cramfs:
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
[41] romfs:
        reuse buffer: off=0 len=1024
[42] minix:
        reuse buffer: off=1024 len=1024
        reuse buffer: off=1024 len=1024
        reuse buffer: off=1024 len=1024
        reuse buffer: off=1024 len=1024
        reuse buffer: off=1024 len=1024
[43] gfs:
        reuse buffer: off=65536 len=1024
[44] gfs2:
        reuse buffer: off=65536 len=1024
[45] ocfs:
        reuse buffer: off=8192 len=1024
[46] ocfs2:
        reuse buffer: off=1024 len=1024
        reuse buffer: off=2048 len=1024
        reuse buffer: off=4096 len=1024
        reuse buffer: off=8192 len=1024
[47] oracleasm:
        reuse buffer: off=0 len=1024
[48] vxfs:
        reuse buffer: off=1024 len=1024
[49] squashfs:
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
[50] nss:
        reuse buffer: off=4096 len=1024
[51] btrfs:
        reuse buffer: off=65536 len=1024
[52] ubifs:
        reuse buffer: off=0 len=1024
[53] bfs:
        reuse buffer: off=0 len=1024
[54] VMFS:
        buffer read: off=2097152 len=1024
[55] befs:
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
[56] nilfs2:
        reuse buffer: off=1024 len=1024
[57] exfat:
        reuse buffer: off=0 len=1024
<-- leaving probing loop (failed) [SUBLKS idx=57]
chain safeprobe topology DISABLED
chain safeprobe partitions ENABLED
--> starting probing loop [PARTS idx=-1]
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
gpt: ---> call probefunc()
        reuse buffer: off=0 len=1024
gpt: <--- (rc = 1)
        reuse buffer: off=0 len=1024
ultrix: ---> call probefunc()
        reuse buffer: off=15360 len=1024
ultrix: <--- (rc = 1)
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        buffer read: off=28672 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
<-- leaving probing loop (failed) [PARTS idx=10]
zeroize wiper
returning UUID value
ID_FS_UUID=f23f728c-ade9-4558-8833-b3ec10168331
ID_FS_UUID_ENC=f23f728c-ade9-4558-8833-b3ec10168331
returning VERSION value
ID_FS_VERSION=1.0
returning TYPE value
ID_FS_TYPE=ext3
returning USAGE value
ID_FS_USAGE=filesystem
reseting probing buffers
buffers summary: 30616 bytes by 98 read() call(s)




# hexdump -C -n 1000 /dev/mapper/vg0-root
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000003e0  00 00 00 00 00 00 00 00                           |........|
000003e8

Comment 3 Harald Hoyer 2011-07-15 08:04:33 UTC
you should run this on the physical volumes, which are part of the volume group.

Comment 4 Dirk Remmelt 2011-07-15 08:31:56 UTC
Hello Harald

sorry, didn't know to run it on PV.

Ok, here it is. /dev/sda4 is the only PV of VG vg0 with the root LV.




# BLKID_DEBUG=0xffff blkid -o udev -p /dev/sda4
libblkid: debug mask set to 0xffff.
ready for low-probing, offset=0, size=25383214080
found entire diskname for devno 0x0804 as sda
whole-disk: NO, regfile: NO
zeroize wiper
chain safeprobe superblocks ENABLED
--> starting probing loop [SUBLKS idx=-1]
[0] linux_raid_member:
        call probefunc()
        buffer read: off=25383141376 len=64
        buffer read: off=25383202816 len=256
        buffer read: off=0 len=256
        buffer read: off=4096 len=256
[1] ddf_raid_member:
        call probefunc()
        buffer read: off=25383213568 len=512
        buffer read: off=25383082496 len=512
[2] isw_raid_member:
        call probefunc()
[3] lsi_mega_raid_member:
        call probefunc()
[4] via_raid_member:
        call probefunc()
[5] silicon_medley_raid_member:
        call probefunc()
[6] nvidia_raid_member:
        call probefunc()
[7] promise_fasttrack_raid_member:
        call probefunc()
[8] hpt45x_raid_member:
        call probefunc()
[9] hpt37x_raid_member:
        buffer read: off=4096 len=1024
        reuse buffer: off=4096 len=1024
[10] adaptec_raid_member:
        call probefunc()
[11] jmicron_raid_member:
        call probefunc()
[12] drbd:
        call probefunc()
        buffer read: off=25383209984 len=4096
[13] LVM2_member:
        buffer read: off=0 len=1024
        magic sboff=536, kboff=0
        call probefunc()
        reuse buffer: off=0 len=1024
assigning UUID [superblocks]
assigning VERSION [superblocks]
wiper set to superblocks::LVM2_member off=0 size=8192
assigning TYPE [superblocks]
assigning USAGE [superblocks]
<-- leaving probing loop (type=LVM2_member) [SUBLKS idx=13]
chain safeprobe topology DISABLED
chain safeprobe partitions ENABLED
--> starting probing loop [PARTS idx=-1]
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        magic sboff=510, kboff=0
dos: ---> call probefunc()
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        magic sboff=0, kboff=0
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
wiped area detected -- ignore previous results
zeroize wiper
dos: <--- (rc = 0)
assigning PTTYPE [partitions]
<-- leaving probing loop (type=dos) [PARTS idx=3]
found devno 0x0800 as /dev/sda
parts: 8:4: starting whole-disk probing: /dev/sda
ready for low-probing, offset=0, size=120034123776
found entire diskname for devno 0x0800 as sda
whole-disk: YES, regfile: NO
partlist reseted
parts: initialized partitions list (0x924c328, size=0)
--> starting probing loop [PARTS idx=-1]
        buffer read: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        magic sboff=510, kboff=0
dos: ---> call probefunc()
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
        magic sboff=0, kboff=0
        reuse buffer: off=0 len=1024
        reuse buffer: off=0 len=1024
parts: create a new partition table (0x924c768, type=dos, offset=446)
parts: add partition (0x924c788 start=63, size=12578832, table=0x924c768)
parts: add partition (0x924c87c start=12578895, size=62878410, table=0x924c768)
parts: add partition (0x924c970 start=75473370, size=107426655, table=0x924c768)
parts: add partition (0x924ca64 start=184859955, size=49576590, table=0x924c768)
dos: <--- (rc = 0)
<-- leaving probing loop (type=dos) [PARTS idx=3]
returning partitions binary data
assigning PART_ENTRY_SCHEME [partitions]
assigning PART_ENTRY_TYPE [partitions]
assigning PART_ENTRY_NUMBER [partitions]
reseting probing buffers
buffers summary: 1024 bytes by 1 read() call(s)
zeroize wiper
returning PTTYPE value
ID_PART_TABLE_TYPE=dos
returning PART_ENTRY_SCHEME value
ID_PART_ENTRY_SCHEME=dos
returning PART_ENTRY_TYPE value
ID_PART_ENTRY_TYPE=0x8e
returning PART_ENTRY_NUMBER value
ID_PART_ENTRY_NUMBER=4
reseting probing buffers
buffers summary: 8000 bytes by 9 read() call(s)




# hexdump -C -n 1000 /dev/sda4
00000000  eb 4c 90 00 00 00 00 00  00 00 00 00 00 00 00 00  |.L..............|
00000010  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000030  00 00 00 00 00 00 00 00  00 00 00 00 00 00 04 00  |................|
00000040  00 80 00 08 8f d6 ca 01  00 00 00 00 ff ff fa eb  |................|
00000050  07 f6 c2 80 75 02 b2 80  ea 5d 7c 00 00 31 c0 8e  |....u....]|..1..|
00000060  d8 8e d0 bc 00 20 fb a1  4c 7c 88 e6 3c ff 74 02  |..... ..L|..<.t.|
00000070  88 c2 52 be 76 7d e8 25  01 be 05 7c f6 c2 80 74  |..R.v}.%...|...t|
00000080  48 b4 41 bb aa 55 cd 13  5a 52 72 3d 81 fb 55 aa  |H.A..U..ZRr=..U.|
00000090  75 37 83 e1 01 74 32 31  c0 89 44 04 40 88 44 ff  |u7...t21..D.@.D.|
000000a0  89 44 02 c7 04 10 00 66  8b 1e 44 7c 66 89 5c 08  |.D.....f..D|f.\.|
000000b0  66 8b 1e 48 7c 66 89 5c  0c c7 44 06 00 70 b4 42  |f..H|f.\..D..p.B|
000000c0  cd 13 72 05 bb 00 70 eb  74 b4 08 cd 13 73 0a f6  |..r...p.t....s..|
000000d0  c2 80 0f 84 ed 00 e9 85  00 66 0f b6 c6 88 64 ff  |.........f....d.|
000000e0  40 66 89 44 04 0f b6 d1  c1 e2 02 88 e8 88 f4 40  |@f.D...........@|
000000f0  89 44 08 0f b6 c2 c0 e8  02 66 89 04 66 a1 48 7c  |.D.......f..f.H||
00000100  66 09 c0 75 51 66 a1 44  7c 66 31 d2 66 f7 34 88  |f..uQf.D|f1.f.4.|
00000110  d1 31 d2 66 f7 74 04 3b  44 08 7d 3a fe c1 88 c5  |.1.f.t.;D.}:....|
00000120  30 c0 c1 e8 02 08 c1 88  d0 5a 52 88 c6 bb 00 70  |0........ZR....p|
00000130  8e c3 31 db b8 01 02 cd  13 72 2b 8c c3 8e 06 42  |..1......r+....B|
00000140  7c 60 1e b9 00 01 8e db  31 f6 31 ff fc f3 a5 1f  ||`......1.1.....|
00000150  61 5a ff 26 40 7c be 7c  7d e8 42 00 eb 0e be 81  |aZ.&@|.|}.B.....|
00000160  7d e8 3a 00 eb 06 be 8b  7d e8 32 00 be 90 7d e8  |}.:.....}.2...}.|
00000170  2c 00 cd 18 eb fe 47 52  55 42 20 00 47 65 6f 6d  |,.....GRUB .Geom|
00000180  00 48 61 72 64 20 44 69  73 6b 00 52 65 61 64 00  |.Hard Disk.Read.|
00000190  20 45 72 72 6f 72 00 bb  01 00 b4 0e cd 10 ac 3c  | Error.........<|
000001a0  00 75 f4 c3 00 00 00 00  00 00 00 00 00 00 00 00  |.u..............|
000001b0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
00000200  4c 41 42 45 4c 4f 4e 45  01 00 00 00 00 00 00 00  |LABELONE........|
00000210  7e 4f 25 21 20 00 00 00  4c 56 4d 32 20 30 30 31  |~O%! ...LVM2 001|
00000220  4c 4f 78 51 4d 78 6b 66  65 79 31 49 39 77 59 4e  |LOxQMxkfey1I9wYN|
00000230  46 70 58 4e 4f 43 48 49  4d 61 51 51 4b 6d 6b 59  |FpXNOCHIMaQQKmkY|
00000240  00 1c f5 e8 05 00 00 00  00 00 03 00 00 00 00 00  |................|
00000250  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000260  00 00 00 00 00 00 00 00  00 10 00 00 00 00 00 00  |................|
00000270  00 f0 02 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
00000280  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000003e0  00 00 00 00 00 00 00 00                           |........|
000003e8

Comment 5 Karel Zak 2011-07-15 09:29:25 UTC
The blkid detects LVM2_MEMBER, but the result is ignored, because there is obsolete extended partition table on the device (line 00001f0 in the hexdump).

It seems that pvcreate does not delete the first 512 bytes on the device ;-(

I'll try to fix this heuristic, the current implementation is not robust...

The workaround is to remove 0x55AA bytes, try:

 # dd if=/dev/zero of=/dev/sda4 seek=510 count=2 bs=1 conv=notrunc

but be careful! Maybe you want to backup the begin of the device:

 # dd if=/dev/md1 of=/root/sda4.img count=1 bs=1MiB

Comment 6 Karel Zak 2011-07-15 09:35:06 UTC
(In reply to comment #5)
>  # dd if=/dev/md1 of=/root/sda4.img count=1 bs=1MiB
           ^^^^^^^^
         /dev/sda4

sorry.

Comment 7 Karel Zak 2011-07-15 09:59:07 UTC
(In reply to comment #5)
> The blkid detects LVM2_MEMBER, but the result is ignored, because there is
> obsolete extended partition table on the device (line 00001f0 in the hexdump).
> 
> It seems that pvcreate does not delete the first 512 bytes on the device ;-(

This is probably not true. It seems that pvcreate delete the begin of the device.

# hexdump -C -n 550 /dev/sdb2
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
000001f0  00 00 00 00 00 00 00 00  00 00 00 00 00 00 55 aa  |..............U.|
00000200  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000220  00 00 00 00 00 00                                 |......|
00000226

# pvcreate /dev/sdb2
Physical volume "/dev/sdb2" successfully created

# hexdump -C -n 550 /dev/sdb2
00000000  00 00 00 00 00 00 00 00  00 00 00 00 00 00 00 00  |................|
*
00000200  4c 41 42 45 4c 4f 4e 45  01 00 00 00 00 00 00 00  |LABELONE........|
00000210  16 ae d8 78 20 00 00 00  4c 56 4d 32 20 30 30 31  |...x ...LVM2 001|
00000220  65 67 63 72 57 67                                 |egcrWg|
00000226

Comment 8 Karel Zak 2011-07-15 10:23:07 UTC
Well, verified in pvcreate code, by default it deletes the first 2048 bytes on the device. So the disk was modified (for example by fdisk) after pvcreate.

Comment 9 Dirk Remmelt 2011-07-15 11:10:25 UTC
Hello Karel

yes, that did the job. Thank you. :-)

I wrote the two zero bytes with dd, changed the dracut 64-lvm.rules back to its original, re-created the initramfs, and rebooted the system. Now the root device was found without a problem.

It is true that /dev/sda4 once was an extended partition.

I tried it and, yes, an "fdisk /dev/sda4" with a write/exit changes the "00 00" back to "55 aa" at the noted position.

But I can't remember when and even why I should have done an "fdisk /dev/sda4" and then quitting with a write/exit.

Nonetheless, many thanks for your help.

Best regards
Dirk


Note You need to log in before you can comment on or make changes to this bug.