|
Bugzilla – Full Text Bug Listing |
| Summary: | kpartx -a /dev/sda creates nothing | ||
|---|---|---|---|
| Product: | [openSUSE] openSUSE 11.0 | Reporter: | Felix Miata <mrmazda> |
| Component: | Basesystem | Assignee: | Petr Uzel <puzel> |
| Status: | RESOLVED WONTFIX | QA Contact: | E-mail List <qa-bugs> |
| Severity: | Normal | ||
| Priority: | P3 - Medium | CC: | carlos.e.r, hare |
| Version: | Factory | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | openSUSE 11.0 | ||
| Whiteboard: | |||
| Found By: | --- | Services Priority: | |
| Business Priority: | Blocker: | --- | |
| Marketing QA Status: | --- | IT Deployment: | --- |
| Attachments: |
additional partitioning details
/var/log/messages tail boot track display output of kpartx -v -a /dev/sda files created by dfsdisk script output of mkinitrd -v /var/log/boot.msg from using new initrd activate_dm_linear mkintrd, fdisk -l, mount, /dev/md*, /dev/dm*, /var/log/boot.msg |
||
|
Description
Felix Miata
2008-06-06 07:48:28 UTC
Created attachment 220616 [details]
additional partitioning details
I tried modprobe dm-multipath prior to kpartx -a /dev/sda, but that did not change result. I am a-865 on freenode's #opensuse-factory. There was a bug in kpartx which prevented it from creating the correct dm devices for extended partitions. Please verify that the kpartx changelog contains: * Wed May 28 2008 hare@suse.de - Calculate correct partition offset in kpartx (bnc#394658) (In reply to comment #3 from Hannes Reinecke) > Please verify that the kpartx changelog contains: # changelog kpartx -bash: changelog: not found # kpartx --changelog kpartx: invalid option # kpartx -v (usage) # rpm -qa | grep kpartx kpartx-0.4.7-127 # I have no idea how to find this changelog info. 0.4.7-127 is what is now on the mirrors. rpm -qi --changelog kpartx would give you the answer. But seeing the 0.4.7-128 contains the fix, chances are that -127 does not. -127 has a 30 May timestamp and shows * Wed May 28 2008 hare@suse.de - Calculate correct partition offset in kpartx (bnc#394658) Apparently -127 is what I used for filing this bug, which still exists now with -128 not yet available. Would have been too easy. Hmm. Oh for crying out loud. The DFSee tool is _so_ broken. If you ever come across the author please let him know that there are systems with more than 8 disks. Sigh. Sorry, no luck here. I managed to re-create the partition table here locally: yarrow:/tmp/dfsee/linux # kpartx -a -l /dev/sdb sdb1 : 0 208782 /dev/sdb 63 sdb2 : 0 16065 /dev/sdb 208845 sdb3 : 0 514080 /dev/sdb 224910 sdb4 : 0 311805585 /dev/sdb 755055 sdb5 : 0 417627 /dev/dm-3 63 sdb6 : 0 13108977 /dev/dm-3 433818 sdb7 : 0 514017 /dev/dm-3 13542858 sdb8 : 0 2104452 /dev/dm-3 14073003 sdb9 : 0 9831717 /dev/dm-3 16177518 sdb10 : 0 9831717 /dev/dm-3 26009298 sdb11 : 0 9831717 /dev/dm-3 35841078 sdb12 : 0 3277197 /dev/dm-3 45672858 sdb13 : 0 14345982 /dev/dm-3 48950118 sdb14 : 0 481887 /dev/dm-3 63296163 sdb15 : 0 2249037 /dev/dm-3 63778113 sdb16 : 0 9831717 /dev/dm-3 233151408 sdb17 : 0 9831717 /dev/dm-3 242983188 sdb18 : 0 9831717 /dev/dm-3 252814968 sdb19 : 0 9831717 /dev/dm-3 262646748 sdb20 : 0 9831717 /dev/dm-3 272478528 sdb21 : 0 9831717 /dev/dm-3 282310308 sdb22 : 0 9831717 /dev/dm-3 292142088 sdb23 : 0 9831717 /dev/dm-3 301973868 yarrow:/tmp/dfsee/linux # kpartx -a /dev/sdb yarrow:/tmp/dfsee/linux # dmsetup table sdb14: 0 481887 linear 253:3 63296163 sdb3: 0 514080 linear 8:16 224910 sdb13: 0 14345982 linear 253:3 48950118 sdb2: 0 16065 linear 8:16 208845 sdb12: 0 3277197 linear 253:3 45672858 sdb1: 0 208782 linear 8:16 63 sdb11: 0 9831717 linear 253:3 35841078 sdb10: 0 9831717 linear 253:3 26009298 sdb23: 0 9831717 linear 253:3 301973868 sdb22: 0 9831717 linear 253:3 292142088 sdb9: 0 9831717 linear 253:3 16177518 sdb19: 0 9831717 linear 253:3 262646748 sdb21: 0 9831717 linear 253:3 282310308 sdb8: 0 2104452 linear 253:3 14073003 sdb18: 0 9831717 linear 253:3 252814968 sdb20: 0 9831717 linear 253:3 272478528 sdb7: 0 514017 linear 253:3 13542858 sdb17: 0 9831717 linear 253:3 242983188 sdb6: 0 13108977 linear 253:3 433818 sdb16: 0 9831717 linear 253:3 233151408 sdb5: 0 417627 linear 253:3 63 sdb15: 0 2249037 linear 253:3 63778113 sdb4: 0 311805585 linear 8:16 755055 Can you attach /var/log/messages? And 'kpartx -v -a /dev/sda' might be helpful, too. Does it work with OpenSUSE 11.0? (In reply to comment #8 from Hannes Reinecke) > Oh for crying out loud. > The DFSee tool is _so_ broken. If you ever come across the author please let > him know that there are systems with more than 8 disks. He will normally reply to bug reports within 24 hours, but this week and next he is on holiday. I don't know what the "broken" is, so you'll need to report what makes you cry out loud. http://tech.groups.yahoo.com/group/dfsee-support/?yguid=12054984 http://www.dfsee.com/dfsee/ Created attachment 221461 [details]
/var/log/messages tail
Can you try to switch off smartd? There might be a chance that smartd is keeping the device busy and device is refusing to do something with it. (In reply to comment #10 from Hannes Reinecke) > Does it work with OpenSUSE 11.0? This particular install reports itself as 11.0 and was updated after report on mailing list of Factory lockdown for 11.0 release. When I try to access gwdg or mirrors.kernel.org ftp 11.0 dirs I get access denied messages. (In reply to comment #13 from Hannes Reinecke) > Can you try to switch off smartd? > There might be a chance that smartd is keeping the device busy and device is > refusing to do something with it. I turned it off and rebooted but get the same result. Created attachment 221467 [details]
boot track
Created attachment 221468 [details] display output of kpartx -v -a /dev/sda (In reply to comment #10 from Hannes Reinecke) > And 'kpartx -v -a /dev/sda' might be helpful, too. . Created attachment 221471 [details] files created by dfsdisk script DFSee can use these to precisely replicate the partitioning of my ST3160023A 8.01 /dev/sda. http://www.dfsee.com/dfsee/dfsee9xx_linux.tgz (In reply to comment #13 from Hannes Reinecke) > There might be a chance that ... keeping the device busy and device is > refusing to do something with it. Could this problem have anything to do with the fact that the system is a single disk system? /etc/mtab: /dev/sda10 / ext3 rw,noatime,nodiratime,acl 0 0 /dev/sda3 /disks/C msdos rw,noexec,nosuid,nodev,dmask=0000,fmask=0111 0 0 /dev/sda5 /disks/hda/boot ext2 rw,noatime,nodiratime,noacl 0 0 /dev/sda6 /disks/D vfat rw,noexec,nosuid,nodev,dmask=0000,fmask=0111,utf8=true 0 0 /dev/sda7 /disks/E msdos rw,noexec,nosuid,nodev,dmask=0000,fmask=0111 0 0 /dev/sda12 /home ext3 rw,noatime,nodiratime,acl 0 0 /dev/sda13 /pub ext3 rw,noatime,nodiratime,acl 0 0 /dev/sda14 /srv ext3 rw,noatime,nodiratime,noacl 0 0 /dev/sda15 /usr/local ext3 rw,noatime,nodiratime,noacl 0 0 I tried running kpartx -v -a /dev/sda on Mandriva Cooker and get similar messages, e.g. this tail: device-mapper: table: 252:0: linear: dm-linear: Device lookup failed device-mapper: ioctl: error adding target to table device-mapper: reload ioctl failed: Invalid argument add map sda23: 0 9831717 linear 0:0 302728923 Pretty much so. device-mapper refuses to create dm-devices if the underlying devices are busy, eg mounted. So I fear we need to do some initrd hackery here to get the required result. What you need to do is to create a initrd script /lib/mkinitrd/scripts/boot-dm_linear.sh which just creates a linear table on top of your existing sda device. mkinitrd already has the required infrastructure in place, so whenever a dm-device is specified as a root device it'll do the right thing, like running kpartx etc. Then re-run mkinitrd and everything should be nice an dandy. Let's see how the mkinitrd script could look like ... (In reply to comment #20 from Hannes Reinecke) > What you need to do is to create a initrd script Literally? I'm no script writer. > Let's see how the mkinitrd script could look like ... I can only guess one line, same as subject, 'kpartx -a /dev/sda', which would only be good if sda is the only disk you want it done on. Oh well. It all comes back to me. There is a script /sbin/activate_dm_linear, which takes the device name as an argument. That will create the required udev rules. And you need to set 'DM_BLOCK=yes' in /etc/sysconfig/kernel. Then re-run mkinitrd, reboot and you should be set. Created attachment 221792 [details]
output of mkinitrd -v
Created attachment 221793 [details] /var/log/boot.msg from using new initrd (In reply to comment #22 from Hannes Reinecke) > There is a script /sbin/activate_dm_linear, which takes the device name as an > argument. That will create the required udev rules. So all /lib/mkinitrd/scripts/boot-dm_linear.sh needs is? -> /sbin/activate_dm_linear /dev/sda > And you need to set 'DM_BLOCK=yes' in /etc/sysconfig/kernel. With, or without, quotes aroung yes? I tried with. >Then re-run mkinitrd, reboot and you should be set. It booted, but paused waiting for root to appear, then gave: Waiting for device /dev/root to appear: ..............................Could not find /dev/root. Want me to fall back to /dev/disk/by-id/ata-ST3160023A_4JS0L8FE-part10? (Y/n) Waiting for device /dev/disk/by-id/ata-ST3160023A_4JS0L8FE-part10 to appear: ok I don't see anything new in the /dev tree. /dev/mapper only has control. Nothing in /dev/disk beyond 15. Only 3 /dev/d* files. Created attachment 227827 [details]
activate_dm_linear
Updated activate_dm_linear script.
Please use the above script to update the udev rules and re-run mkinitrd. Ensure that 'kpartx' is listed in the features of the mkinitrd output. The system should now boot up running on a device-mapper disk with all partitions visible (as device-mapper devices). Created attachment 228274 [details]
mkintrd, fdisk -l, mount, /dev/md*, /dev/dm*, /var/log/boot.msg
I don't think it worked.
It must have worked at some point. Now after some more updates without paying any mind to this, and using 2.6.26-2, mount shows: /dev/dm-22 on / type ext3 (rw,noatime,nodiratime,acl) /dev/dm-12 on /disks/hda/boot type ext2 (rw,noatime,nodiratime,noacl) /dev/dm-26 on /home type ext3 (rw,noatime,nodiratime,acl) /dev/dm-28 on /pub type ext3 (rw,noatime,nodiratime,acl) /dev/dm-30 on /srv type ext3 (rw,noatime,nodiratime,noacl) /dev/dm-32 on /usr/local type ext3 (rw,noatime,nodiratime,noacl) /dev/dm-24 on /disks/hda/fedora type ext3 (rw,noatime,nodiratime,noacl) Is it time to try a fresh install and see if the installer offers up all my partitions? If so, do I need to manually intervene with kpartx at installation startup? Closing as 11.0 is now out of maintenance. Please reopen if you encounter this bug in any maintained openSUSE release. Thanks. |