Your message dated Sat, 11 Aug 2018 22:54:34 +0200
with message-id <20180811205433.wcfimockjbzdc...@percival.namespace.at>
and subject line Re: Bug#777462: kpartx_id generates wrong WWN
has caused the Debian Bug report #777462,
regarding kpartx_id generates wrong WWN
to be marked as done.

This means that you claim that the problem has been dealt with.
If this is not the case it is now your responsibility to reopen the
Bug report if necessary, and/or fix the problem forthwith.

(NB: If you are a system administrator and have no idea what this
message is talking about, this may indicate a serious mail system
misconfiguration somewhere. Please contact ow...@bugs.debian.org
immediately.)


-- 
777462: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=777462
Debian Bug Tracking System
Contact ow...@bugs.debian.org with problems
--- Begin Message ---
Package: kpartx
Version: 0.5.0-5
Severity: normal

Hi,

I've got an iSCSI rooted jessie system.  /etc/multipath.conf defines the
following alias for the (multipathed and dm-crypted) disk:

multipaths {
        multipath {
                wwid 3600000e00d1100000011043c00320000
                alias repce_disk
        }
}

All is well, except that

$ ls -l /dev/disk/by-id/wwn-*
lrwxrwxrwx 1 root root 10 Feb  8 08:31 
/dev/disk/by-id/wwn-0x600000e00d1100000011043c00320000 -> ../../dm-0
lrwxrwxrwx 1 root root 10 Feb  7 16:37 
/dev/disk/by-id/wwn-0x600000e00d1100000011043c00320000-part1 -> ../../sdj1
lrwxrwxrwx 1 root root 10 Feb  7 16:37 
/dev/disk/by-id/wwn-0x600000e00d1100000011043c00320000-part2 -> ../../sdj2
lrwxrwxrwx 1 root root 10 Feb  8 08:49 
/dev/disk/by-id/wwn-0xeneric_USB_Flash_Disk_000000000000001000000993-0:0 -> 
../../dm-8
lrwxrwxrwx 1 root root 10 Feb  8 08:31 /dev/disk/by-id/wwn-0xepce_disk-part1 -> 
../../dm-2
lrwxrwxrwx 1 root root 10 Feb  8 08:31 /dev/disk/by-id/wwn-0xepce_disk-part2 -> 
../../dm-3

that is, I find wwn-0xepce_disk-part1 and similar links, containing
device names missing their first characters.  Here, a USB flash disk
is also inserted in the system.

# multipath -ll
Generic_USB_Flash_Disk_000000000000001000000993-0:0 dm-8 ,
size=1.9G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=0 status=active
  `- #:#:#:#  -   #:#   active faulty running
repce_disk (3600000e00d1100000011043c00320000) dm-0 FUJITSU,ETERNUS_DXL
size=27G features='1 queue_if_no_path' hwhandler='0' wp=rw
|-+- policy='service-time 0' prio=50 status=active
| |- 0:0:0:0  sda 8:0   active ready running
| |- 12:0:0:0 sdd 8:48  active ready running
| |- 14:0:0:0 sdg 8:96  active ready running
| `- 13:0:0:0 sdj 8:144 active ready running
`-+- policy='service-time 0' prio=10 status=enabled
  |- 10:0:0:0 sdi 8:128 active ready running
  |- 11:0:0:0 sdh 8:112 active ready running
  |- 8:0:0:0  sde 8:64  active ready running
  `- 9:0:0:0  sdf 8:80  active ready running

The problem seems to stem from

# udevadm info -q property -n dm-2 | fgrep DM_UUID
DM_UUID=part1-mpath-3600000e00d1100000011043c00320000
# /lib/udev/kpartx_id 254 2 part1-mpath-3600000e00d1100000011043c00320000
DM_NAME=repce_disk
DM_MPATH=3600000e00d1100000011043c00320000
DM_PART=1
DM_TYPE=scsi
DM_WWN=0xepce_disk

which suggests that

echo "DM_WWN=0x${dmname#?}"

in /lib/udev/kpartx_id is not correct in general, as the WWN is not always
contained in the device name.  At least not for aliased multipath devices
and plain USB flash disks (which shouldn't be multipathed anyway, but I
neglected to blacklist them until now).  Please find a more robust way to
determine the WWN.
-- 
Thanks,
Feri.

--- End Message ---
--- Begin Message ---
Version: 0.7.7-1

I believe upstream has fixed this in commit
3d5cd26376ff42c282f22d93943b40a76e6250ee.

* Ferenc Wágner <wf...@niif.hu> [180811 20:51]:
> echo "DM_WWN=0x${dmname#?}"

This is now: echo "DM_WWN=0x${dmserial#?}".

See here for more details:
https://github.com/bmarzins/rh-multipath-tools/commit/3d5cd26376ff42c282f22d93943b40a76e6250ee

Thanks,
Chris

--- End Message ---

Reply via email to