Scott, thanks for the pointer to the error/limitation in kpartx.
With that fixed, I could successfully boot Ubuntu 14.04.3 on QEMU disks (w/ spaces) w/out user_friendly_names.
I'm attaching a debdiff with the patch submitted to dm-devel here.
Is it still on the window for 14.04.4?
$ mount | grep ' / '
/dev/mapper/0QEMU\x20\x20\x20\x20QEMU\x20HARDDISK\x20\x20\x20helloworld-part2 on / type ext4 (rw,errors=remount-ro)
$ cat /proc/swaps
Filename Type Size Used Priority
/dev/mapper/0QEMU\134x20\134x20\134x20\134x20QEMU\134x20HARDDISK\134x20\134x20\134x20helloworld-part3 partition 5492672 0 -1
$ ls -l /dev/mapper
total 0
brw-rw---- 1 root disk 252, 0 Jan 7 13:50 0QEMU QEMU HARDDISK helloworld
brw-rw---- 1 root disk 252, 1 Jan 7 13:50 0QEMU QEMU HARDDISK test
lrwxrwxrwx 1 root root 7 Jan 7 13:50 0QEMU\x20\x20\x20\x20QEMU\x20HARDDISK\x20\x20\x20helloworld -> ../dm-0
brw-rw---- 1 root disk 252, 2 Jan 7 13:50 0QEMU\x20\x20\x20\x20QEMU\x20HARDDISK\x20\x20\x20helloworld-part1
brw-rw---- 1 root disk 252, 3 Jan 7 13:50 0QEMU\x20\x20\x20\x20QEMU\x20HARDDISK\x20\x20\x20helloworld-part2
brw-rw---- 1 root disk 252, 4 Jan 7 13:50 0QEMU\x20\x20\x20\x20QEMU\x20HARDDISK\x20\x20\x20helloworld-part3
lrwxrwxrwx 1 root root 7 Jan 7 13:50 0QEMU\x20\x20\x20\x20QEMU\x20HARDDISK\x20\x20\x20test -> ../dm-1
brw-rw---- 1 root disk 252, 5 Jan 7 13:50 0QEMU\x20\x20\x20\x20QEMU\x20HARDDISK\x20\x20\x20test-part1
crw------- 1 root root 10, 236 Jan 7 13:50 control
Notice there are 2 devices for each wholedisk (with mangled and unmangled names); I suspect that's some inconsistency between multipath call to libdevmapper and udev (multipath not waiting for udev to create the nodes, and/or creating the nodes by itself / not using udev -- udev should use the DM NAME, which indeed is mangled). I tried but could not find the root cause for that, but it's not a regression from this patch (it existed previously).
Hi @mathieu-tl @smoser
Back to this one. Good news.
Scott, thanks for the pointer to the error/limitation in kpartx. names.
With that fixed, I could successfully boot Ubuntu 14.04.3 on QEMU disks (w/ spaces) w/out user_friendly_
I'm attaching a debdiff with the patch submitted to dm-devel here.
Is it still on the window for 14.04.4?
Boot messages: 0QEMU\x20\ x20\x20\ x20QEMU\ x20HARDDISK\ x20\x20\ x20helloworld- part3. <...>
<...>
[ 84.995873] Adding 5492672k swap on /dev/mapper/
[ 85.004033] EXT4-fs (dm-3): re-mounted. Opts: errors=remount-ro
<...>
$ sudo multipath -l
0QEMU QEMU HARDDISK helloworld dm-0 QEMU ,QEMU HARDDISK
size=128G features='0' hwhandler='0' wp=rw
`-+- policy='round-robin 0' prio=-1 status=active
`- 0:0:0:0 sda 8:0 active undef running
$ mount | grep ' / ' 0QEMU\x20\ x20\x20\ x20QEMU\ x20HARDDISK\ x20\x20\ x20helloworld- part2 on / type ext4 (rw,errors= remount- ro)
/dev/mapper/
$ cat /proc/swaps 0QEMU\134x20\ 134x20\ 134x20\ 134x20QEMU\ 134x20HARDDISK\ 134x20\ 134x20\ 134x20helloworl d-part3 partition 5492672 0 -1
Filename Type Size Used Priority
/dev/mapper/
$ ls -l /dev/mapper x20\x20\ x20QEMU\ x20HARDDISK\ x20\x20\ x20helloworld -> ../dm-0 x20\x20\ x20QEMU\ x20HARDDISK\ x20\x20\ x20helloworld- part1 x20\x20\ x20QEMU\ x20HARDDISK\ x20\x20\ x20helloworld- part2 x20\x20\ x20QEMU\ x20HARDDISK\ x20\x20\ x20helloworld- part3 x20\x20\ x20QEMU\ x20HARDDISK\ x20\x20\ x20test -> ../dm-1 x20\x20\ x20QEMU\ x20HARDDISK\ x20\x20\ x20test- part1
total 0
brw-rw---- 1 root disk 252, 0 Jan 7 13:50 0QEMU QEMU HARDDISK helloworld
brw-rw---- 1 root disk 252, 1 Jan 7 13:50 0QEMU QEMU HARDDISK test
lrwxrwxrwx 1 root root 7 Jan 7 13:50 0QEMU\x20\
brw-rw---- 1 root disk 252, 2 Jan 7 13:50 0QEMU\x20\
brw-rw---- 1 root disk 252, 3 Jan 7 13:50 0QEMU\x20\
brw-rw---- 1 root disk 252, 4 Jan 7 13:50 0QEMU\x20\
lrwxrwxrwx 1 root root 7 Jan 7 13:50 0QEMU\x20\
brw-rw---- 1 root disk 252, 5 Jan 7 13:50 0QEMU\x20\
crw------- 1 root root 10, 236 Jan 7 13:50 control
Notice there are 2 devices for each wholedisk (with mangled and unmangled names); I suspect that's some inconsistency between multipath call to libdevmapper and udev (multipath not waiting for udev to create the nodes, and/or creating the nodes by itself / not using udev -- udev should use the DM NAME, which indeed is mangled). I tried but could not find the root cause for that, but it's not a regression from this patch (it existed previously).