Debian Bug report logs - #827412
multipath-tools: /dev/mapper device files not removed when partition is removed

version graph

Package: multipath-tools; Maintainer for multipath-tools is Debian DM Multipath Team <team+linux-blocks@tracker.debian.org>; Source for multipath-tools is src:multipath-tools (PTS, buildd, popcon).

Reported by: Andrew Patterson <andrew.patterson@hpe.com>

Date: Wed, 15 Jun 2016 21:33:01 UTC

Severity: normal

Tags: confirmed, moreinfo

Found in version 0.6.1

Done: Ritesh Raj Sarraf <rrs@debian.org>

Bug is archived. No further changes may be made.

Toggle useless messages

View this report as an mbox folder, status mbox, maintainer mbox


Report forwarded to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#827412; Package multipath-tools. (Wed, 15 Jun 2016 21:33:05 GMT) (full text, mbox, link).


Acknowledgement sent to Andrew Patterson <andrew.patterson@hpe.com>:
New Bug report received and forwarded. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>. (Wed, 15 Jun 2016 21:33:05 GMT) (full text, mbox, link).


Message #5 received at submit@bugs.debian.org (full text, mbox, reply):

From: Andrew Patterson <andrew.patterson@hpe.com>
To: submit@bugs.debian.org
Subject: multipath-tools: /dev/mapper device files not removed when partition is removed
Date: Wed, 15 Jun 2016 15:31:32 -0600
Package: multipath-tools
Version: 0.6.1

Multipath-tools creates device files in /dev/mapper for both the block
device and its partitions. The partition device file use the format
/dev/mapper/<mpath-device>-partX, where X is the partition number.

Example:

Configuration details:

Testing on an amd64 system running sid with
multipath-tools/kpartx_0.6.1-3 from experimental. We have 8 FC LUNs
with 4 paths each. The kernel version is 4.6.0-1-amd64.

With the following /etc/multipath.conf file:

defaults {
	user_friendly_names "yes"
}

blacklist {
	device {
		vendor "HP"
		product "LOGICAL VOLUME"
}

Here are the devices used (the boot device is blacklisted):

# lsscsi
[0:0:0:0]    storage HP       P244br           2.52  -        
[0:1:0:0]    disk    HP       LOGICAL VOLUME   2.52  /dev/sda 
[1:0:0:0]    disk    3PARdata VV               3212  /dev/sdj 
[1:0:0:1]    disk    3PARdata VV               3212  /dev/sdl 
[1:0:0:2]    disk    3PARdata VV               3212  /dev/sdn 
[1:0:0:3]    disk    3PARdata VV               3212  /dev/sdq 
[1:0:0:4]    disk    3PARdata VV               3212  /dev/sdr 
[1:0:0:5]    disk    3PARdata VV               3212  /dev/sdt 
[1:0:0:6]    disk    3PARdata VV               3212  /dev/sdv 
[1:0:0:7]    disk    3PARdata VV               3212  /dev/sdx 
[1:0:0:254]  enclosu 3PARdata SES              3212  -        
[1:0:1:0]    disk    3PARdata VV               3212  /dev/sdz 
[1:0:1:1]    disk    3PARdata VV               3212  /dev/sdaa
[1:0:1:2]    disk    3PARdata VV               3212  /dev/sdab
[1:0:1:3]    disk    3PARdata VV               3212  /dev/sdac
[1:0:1:4]    disk    3PARdata VV               3212  /dev/sdad
[1:0:1:5]    disk    3PARdata VV               3212  /dev/sdae
[1:0:1:6]    disk    3PARdata VV               3212  /dev/sdaf
[1:0:1:7]    disk    3PARdata VV               3212  /dev/sdag
[1:0:1:254]  enclosu 3PARdata SES              3212  -        
[2:0:0:0]    disk    3PARdata VV               3212  /dev/sdb 
[2:0:0:1]    disk    3PARdata VV               3212  /dev/sdc 
[2:0:0:2]    disk    3PARdata VV               3212  /dev/sdd 
[2:0:0:3]    disk    3PARdata VV               3212  /dev/sde 
[2:0:0:4]    disk    3PARdata VV               3212  /dev/sdf 
[2:0:0:5]    disk    3PARdata VV               3212  /dev/sdg 
[2:0:0:6]    disk    3PARdata VV               3212  /dev/sdh 
[2:0:0:7]    disk    3PARdata VV               3212  /dev/sdi 
[2:0:0:254]  enclosu 3PARdata SES              3212  -        
[2:0:1:0]    disk    3PARdata VV               3212  /dev/sdk 
[2:0:1:1]    disk    3PARdata VV               3212  /dev/sdm 
[2:0:1:2]    disk    3PARdata VV               3212  /dev/sdo 
[2:0:1:3]    disk    3PARdata VV               3212  /dev/sdp 
[2:0:1:4]    disk    3PARdata VV               3212  /dev/sds 
[2:0:1:5]    disk    3PARdata VV               3212  /dev/sdu 
[2:0:1:6]    disk    3PARdata VV               3212  /dev/sdw 
[2:0:1:7]    disk    3PARdata VV               3212  /dev/sdy 
[2:0:1:254]  enclosu 3PARdata SES              3212  - 

And the following multipath -l output:

# multipath -l
mpathe (360002ac00000000000001908000028be) dm-4 3PARdata,VV
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=0 status=active
  |- 1:0:0:4 sdr  65:16  active undef running
  |- 1:0:1:4 sdad 65:208 active undef running
  |- 2:0:0:4 sdf  8:80   active undef running
  `- 2:0:1:4 sds  65:32  active undef running
mpathd (360002ac00000000000001907000028be) dm-3 3PARdata,VV
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=0 status=active
  |- 1:0:0:3 sdq  65:0   active undef running
  |- 1:0:1:3 sdac 65:192 active undef running
  |- 2:0:0:3 sde  8:64   active undef running
  `- 2:0:1:3 sdp  8:240  active undef running
mpathc (360002ac00000000000001906000028be) dm-2 3PARdata,VV
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=0 status=active
  |- 1:0:0:2 sdn  8:208  active undef running
  |- 1:0:1:2 sdab 65:176 active undef running
  |- 2:0:0:2 sdd  8:48   active undef running
  `- 2:0:1:2 sdo  8:224  active undef running
mpathb (360002ac00000000000001905000028be) dm-1 3PARdata,VV
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=0 status=active
  |- 1:0:0:1 sdl  8:176  active undef running
  |- 1:0:1:1 sdaa 65:160 active undef running
  |- 2:0:0:1 sdc  8:32   active undef running
  `- 2:0:1:1 sdm  8:192  active undef running
mpatha (360002ac00000000000001904000028be) dm-0 3PARdata,VV
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=0 status=active
  |- 1:0:0:0 sdj  8:144  active undef running
  |- 1:0:1:0 sdz  65:144 active undef running
  |- 2:0:0:0 sdb  8:16   active undef running
  `- 2:0:1:0 sdk  8:160  active undef running
mpathh (360002ac0000000000000190b000028be) dm-7 3PARdata,VV
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=0 status=active
  |- 1:0:0:7 sdx  65:112 active undef running
  |- 1:0:1:7 sdag 66:0   active undef running
  |- 2:0:0:7 sdi  8:128  active undef running
  `- 2:0:1:7 sdy  65:128 active undef running
mpathg (360002ac0000000000000190a000028be) dm-6 3PARdata,VV
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=0 status=active
  |- 1:0:0:6 sdv  65:80  active undef running
  |- 1:0:1:6 sdaf 65:240 active undef running
  |- 2:0:0:6 sdh  8:112  active undef running
  `- 2:0:1:6 sdw  65:96  active undef running
mpathf (360002ac00000000000001909000028be) dm-5 3PARdata,VV
size=1.0G features='0' hwhandler='0' wp=rw
`-+- policy='service-time 0' prio=0 status=active
  |- 1:0:0:5 sdt  65:48  active undef running
  |- 1:0:1:5 sdae 65:224 active undef running
  |- 2:0:0:5 sdg  8:96   active undef running
  `- 2:0:1:5 sdu  65:64  active undef running

With the following device files in /dev/mapper:

# ls -l /dev/mapper
total 0
crw------- 1 root root 10, 236 Jun 14 13:28 control
lrwxrwxrwx 1 root root       7 Jun 14 13:53 mpatha -> ../dm-0
lrwxrwxrwx 1 root root       7 Jun 14 13:53 mpathb -> ../dm-1
lrwxrwxrwx 1 root root       7 Jun 14 13:53 mpathc -> ../dm-2
lrwxrwxrwx 1 root root       7 Jun 14 13:53 mpathd -> ../dm-3
lrwxrwxrwx 1 root root       7 Jun 14 13:53 mpathe -> ../dm-4
lrwxrwxrwx 1 root root       7 Jun 14 13:53 mpathf -> ../dm-5
lrwxrwxrwx 1 root root       7 Jun 14 13:53 mpathg -> ../dm-6
lrwxrwxrwx 1 root root       7 Jun 14 13:53 mpathh -> ../dm-7

We now create and remove a partition using fdisk.

# fdisk /dev/mapper/mpatha

Welcome to fdisk (util-linux 2.28).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): n
Partition number (1-128, default 1): 
First sector (34-2097118, default 32768): 
Last sector, +sectors or +size{K,M,G,T,P} (32768-2097118, default 2097118): 

Created a new partition 1 of type 'Linux filesystem' and of size 1008 MiB.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Invalid argument

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

Resulting in:

# ls -l /dev/mapper/mpatha*
lrwxrwxrwx 1 root root 7 Jun 15 14:58 /dev/mapper/mpatha -> ../dm-0
lrwxrwxrwx 1 root root 7 Jun 15 14:58 /dev/mapper/mpatha-part1 -> ../dm-8
# ls -l /dev/disk/by-id/scsi-mpatha*
lrwxrwxrwx 1 root root 10 Jun 15 15:02 /dev/disk/by-id/scsi-mpatha -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jun 15 15:02 /dev/disk/by-id/scsi-mpatha-part1 -> ../../dm-2

Now when I remove this partition:

# fdisk /dev/mapper/mpatha

Welcome to fdisk (util-linux 2.28).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): d
Selected partition 1
Partition 1 has been deleted.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Invalid argument

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

The /dev/mapper partition device file is still present:

# ls -l /dev/mapper/mpatha*
lrwxrwxrwx 1 root root 7 Jun 15 15:05 /dev/mapper/mpatha -> ../dm-0
lrwxrwxrwx 1 root root 7 Jun 15 15:02 /dev/mapper/mpatha-part1 -> ../dm-2
# ls -l /dev/disk/by-id/scsi-mpatha
lrwxrwxrwx 1 root root 10 Jun 15 15:13 /dev/disk/by-id/scsi-mpatha -> ../../dm-2

Note that the /dev/disk/by-path file is gone while the /dev/mapper
device file remains.

Here is the output from udevadm monitor while removing the partition:

KERNEL[155.958774] change   /devices/virtual/block/dm-2 (block)
UDEV  [155.986198] change   /devices/virtual/block/dm-2 (block)

and /proc/partitions indicates that the partition is gone:

# cat /proc/partitions  | grep -- dm-
 254        0    1048576 dm-0
 254        1    1048576 dm-1
 254        2    1048576 dm-2
 254        3    1048576 dm-3
 254        4    1048576 dm-4
 254        5    1048576 dm-5
 254        6    1048576 dm-6
 254        7    1048576 dm-7
 254        8    1032175 dm-8

This seems to work correctly when using parted, e.g.,

# ls -l /dev/mapper/mpathb*
lrwxrwxrwx 1 root root 7 Jun 15 15:19 /dev/mapper/mpathb -> ../dm-3
lrwxrwxrwx 1 root root 7 Jun 15 15:19 /dev/mapper/mpathb1 -> ../dm-9
# ls -l /dev/disk/by-id/scsi-mpathb*
lrwxrwxrwx 1 root root 10 Jun 15 15:19 /dev/disk/by-id/scsi-mpathb -> ../../dm-3
lrwxrwxrwx 1 root root 10 Jun 15 15:19 /dev/disk/by-id/scsi-mpathb1 -> ../../dm-9

# parted /dev/mapper/mpathb
GNU Parted 3.2
Using /dev/mapper/mpathb
Welcome to GNU Parted! Type 'help' to view a list of commands.
(parted) rm 1
(parted) quit                                                             
Information: You may need to update /etc/fstab.

# ls -l /dev/mapper/mpathb*                            
lrwxrwxrwx 1 root root 7 Jun 15 15:22 /dev/mapper/mpathb -> ../dm-3
# ls -l /dev/disk/by-id/scsi-mpathb*
lrwxrwxrwx 1 root root 10 Jun 15 15:22 /dev/disk/by-id/scsi-mpathb -> ../../dm-3

Here is the output for udevadm monitor when deleting the parted partition:

KERNEL[735.524037] change   /devices/virtual/block/dm-9 (block)
KERNEL[735.524470] change   /devices/virtual/block/dm-3 (block)
UDEV  [735.540771] change   /devices/virtual/block/dm-9 (block)
KERNEL[735.543465] add      /devices/virtual/bdi/254:10 (bdi)
KERNEL[735.543534] add      /devices/virtual/block/dm-10 (block)
UDEV  [735.543727] add      /devices/virtual/bdi/254:10 (bdi)
KERNEL[735.543795] remove   /devices/virtual/block/dm-10 (block)
UDEV  [735.548136] add      /devices/virtual/block/dm-10 (block)
UDEV  [735.548265] remove   /devices/virtual/block/dm-10 (block)
KERNEL[735.556226] remove   /devices/virtual/bdi/254:10 (bdi)
UDEV  [735.556447] remove   /devices/virtual/bdi/254:10 (bdi)
UDEV  [735.573117] change   /devices/virtual/block/dm-3 (block)
KERNEL[739.475199] change   /devices/virtual/block/dm-9 (block)
UDEV  [739.517662] change   /devices/virtual/block/dm-9 (block)
KERNEL[739.518452] remove   /devices/virtual/block/dm-9 (block)
KERNEL[739.518643] remove   /devices/virtual/block/dm-9 (block)
UDEV  [739.521683] remove   /devices/virtual/block/dm-9 (block)
UDEV  [739.521786] remove   /devices/virtual/block/dm-9 (block)
KERNEL[739.532256] remove   /devices/virtual/bdi/254:9 (bdi)
UDEV  [739.532847] remove   /devices/virtual/bdi/254:9 (bdi)
KERNEL[744.961662] change   /devices/virtual/block/dm-3 (block)
UDEV  [744.981294] change   /devices/virtual/block/dm-3 (block)

Note, we are now getting events for the partition as well as the parent
block device.

Note that when using parted, we get a different partition device file
-- /dev/mapper/mpathb1 than that created with fdisk. This difference
is discussed in bug
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=827308/

I have seen this same issue in earlier versions of multipath-tools.

-- 
Andrew Patterson
Hewlett-Packard Enterprise



Information forwarded to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#827412; Package multipath-tools. (Thu, 16 Jun 2016 10:48:06 GMT) (full text, mbox, link).


Acknowledgement sent to rrs@debian.org:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>. (Thu, 16 Jun 2016 10:48:06 GMT) (full text, mbox, link).


Message #10 received at 827412@bugs.debian.org (full text, mbox, reply):

From: Ritesh Raj Sarraf <rrs@debian.org>
To: Andrew Patterson <andrew.patterson@hpe.com>, 827412@bugs.debian.org
Subject: Re: Bug#827412: multipath-tools: /dev/mapper device files not removed when partition is removed
Date: Thu, 16 Jun 2016 16:15:54 +0530
[Message part 1 (text/plain, inline)]
Control: tag -1 +confirmed


Can you please try the attached patch ?



On Wed, 2016-06-15 at 15:31 -0600, Andrew Patterson wrote:
> Package: multipath-tools
> Version: 0.6.1
> 
> Multipath-tools creates device files in /dev/mapper for both the block
> device and its partitions. The partition device file use the format
> /dev/mapper/<mpath-device>-partX, where X is the partition number.
> 
> Example:
> 
> Configuration details:
> 
> Testing on an amd64 system running sid with
> multipath-tools/kpartx_0.6.1-3 from experimental. We have 8 FC LUNs
> with 4 paths each. The kernel version is 4.6.0-1-amd64.
> 
> With the following /etc/multipath.conf file:
> 
> defaults {
> 	user_friendly_names "yes"
> }
> 
> blacklist {
> 	device {
> 		vendor "HP"
> 		product "LOGICAL VOLUME"
> }
> 
> Here are the devices used (the boot device is blacklisted):
> 
> # lsscsi
> [0:0:0:0]    storage HP       P244br           2.52  -        
> [0:1:0:0]    disk    HP       LOGICAL VOLUME   2.52  /dev/sda 
> [1:0:0:0]    disk    3PARdata VV               3212  /dev/sdj 
> [1:0:0:1]    disk    3PARdata VV               3212  /dev/sdl 
> [1:0:0:2]    disk    3PARdata VV               3212  /dev/sdn 
> [1:0:0:3]    disk    3PARdata VV               3212  /dev/sdq 
> [1:0:0:4]    disk    3PARdata VV               3212  /dev/sdr 
> [1:0:0:5]    disk    3PARdata VV               3212  /dev/sdt 
> [1:0:0:6]    disk    3PARdata VV               3212  /dev/sdv 
> [1:0:0:7]    disk    3PARdata VV               3212  /dev/sdx 
> [1:0:0:254]  enclosu 3PARdata SES              3212  -        
> [1:0:1:0]    disk    3PARdata VV               3212  /dev/sdz 
> [1:0:1:1]    disk    3PARdata VV               3212  /dev/sdaa
> [1:0:1:2]    disk    3PARdata VV               3212  /dev/sdab
> [1:0:1:3]    disk    3PARdata VV               3212  /dev/sdac
> [1:0:1:4]    disk    3PARdata VV               3212  /dev/sdad
> [1:0:1:5]    disk    3PARdata VV               3212  /dev/sdae
> [1:0:1:6]    disk    3PARdata VV               3212  /dev/sdaf
> [1:0:1:7]    disk    3PARdata VV               3212  /dev/sdag
> [1:0:1:254]  enclosu 3PARdata SES              3212  -        
> [2:0:0:0]    disk    3PARdata VV               3212  /dev/sdb 
> [2:0:0:1]    disk    3PARdata VV               3212  /dev/sdc 
> [2:0:0:2]    disk    3PARdata VV               3212  /dev/sdd 
> [2:0:0:3]    disk    3PARdata VV               3212  /dev/sde 
> [2:0:0:4]    disk    3PARdata VV               3212  /dev/sdf 
> [2:0:0:5]    disk    3PARdata VV               3212  /dev/sdg 
> [2:0:0:6]    disk    3PARdata VV               3212  /dev/sdh 
> [2:0:0:7]    disk    3PARdata VV               3212  /dev/sdi 
> [2:0:0:254]  enclosu 3PARdata SES              3212  -        
> [2:0:1:0]    disk    3PARdata VV               3212  /dev/sdk 
> [2:0:1:1]    disk    3PARdata VV               3212  /dev/sdm 
> [2:0:1:2]    disk    3PARdata VV               3212  /dev/sdo 
> [2:0:1:3]    disk    3PARdata VV               3212  /dev/sdp 
> [2:0:1:4]    disk    3PARdata VV               3212  /dev/sds 
> [2:0:1:5]    disk    3PARdata VV               3212  /dev/sdu 
> [2:0:1:6]    disk    3PARdata VV               3212  /dev/sdw 
> [2:0:1:7]    disk    3PARdata VV               3212  /dev/sdy 
> [2:0:1:254]  enclosu 3PARdata SES              3212  - 
> 
> And the following multipath -l output:
> 
> # multipath -l
> mpathe (360002ac00000000000001908000028be) dm-4 3PARdata,VV
> size=1.0G features='0' hwhandler='0' wp=rw
> `-+- policy='service-time 0' prio=0 status=active
>   |- 1:0:0:4 sdr  65:16  active undef running
>   |- 1:0:1:4 sdad 65:208 active undef running
>   |- 2:0:0:4 sdf  8:80   active undef running
>   `- 2:0:1:4 sds  65:32  active undef running
> mpathd (360002ac00000000000001907000028be) dm-3 3PARdata,VV
> size=1.0G features='0' hwhandler='0' wp=rw
> `-+- policy='service-time 0' prio=0 status=active
>   |- 1:0:0:3 sdq  65:0   active undef running
>   |- 1:0:1:3 sdac 65:192 active undef running
>   |- 2:0:0:3 sde  8:64   active undef running
>   `- 2:0:1:3 sdp  8:240  active undef running
> mpathc (360002ac00000000000001906000028be) dm-2 3PARdata,VV
> size=1.0G features='0' hwhandler='0' wp=rw
> `-+- policy='service-time 0' prio=0 status=active
>   |- 1:0:0:2 sdn  8:208  active undef running
>   |- 1:0:1:2 sdab 65:176 active undef running
>   |- 2:0:0:2 sdd  8:48   active undef running
>   `- 2:0:1:2 sdo  8:224  active undef running
> mpathb (360002ac00000000000001905000028be) dm-1 3PARdata,VV
> size=1.0G features='0' hwhandler='0' wp=rw
> `-+- policy='service-time 0' prio=0 status=active
>   |- 1:0:0:1 sdl  8:176  active undef running
>   |- 1:0:1:1 sdaa 65:160 active undef running
>   |- 2:0:0:1 sdc  8:32   active undef running
>   `- 2:0:1:1 sdm  8:192  active undef running
> mpatha (360002ac00000000000001904000028be) dm-0 3PARdata,VV
> size=1.0G features='0' hwhandler='0' wp=rw
> `-+- policy='service-time 0' prio=0 status=active
>   |- 1:0:0:0 sdj  8:144  active undef running
>   |- 1:0:1:0 sdz  65:144 active undef running
>   |- 2:0:0:0 sdb  8:16   active undef running
>   `- 2:0:1:0 sdk  8:160  active undef running
> mpathh (360002ac0000000000000190b000028be) dm-7 3PARdata,VV
> size=1.0G features='0' hwhandler='0' wp=rw
> `-+- policy='service-time 0' prio=0 status=active
>   |- 1:0:0:7 sdx  65:112 active undef running
>   |- 1:0:1:7 sdag 66:0   active undef running
>   |- 2:0:0:7 sdi  8:128  active undef running
>   `- 2:0:1:7 sdy  65:128 active undef running
> mpathg (360002ac0000000000000190a000028be) dm-6 3PARdata,VV
> size=1.0G features='0' hwhandler='0' wp=rw
> `-+- policy='service-time 0' prio=0 status=active
>   |- 1:0:0:6 sdv  65:80  active undef running
>   |- 1:0:1:6 sdaf 65:240 active undef running
>   |- 2:0:0:6 sdh  8:112  active undef running
>   `- 2:0:1:6 sdw  65:96  active undef running
> mpathf (360002ac00000000000001909000028be) dm-5 3PARdata,VV
> size=1.0G features='0' hwhandler='0' wp=rw
> `-+- policy='service-time 0' prio=0 status=active
>   |- 1:0:0:5 sdt  65:48  active undef running
>   |- 1:0:1:5 sdae 65:224 active undef running
>   |- 2:0:0:5 sdg  8:96   active undef running
>   `- 2:0:1:5 sdu  65:64  active undef running
> 
> With the following device files in /dev/mapper:
> 
> # ls -l /dev/mapper
> total 0
> crw------- 1 root root 10, 236 Jun 14 13:28 control
> lrwxrwxrwx 1 root root       7 Jun 14 13:53 mpatha -> ../dm-0
> lrwxrwxrwx 1 root root       7 Jun 14 13:53 mpathb -> ../dm-1
> lrwxrwxrwx 1 root root       7 Jun 14 13:53 mpathc -> ../dm-2
> lrwxrwxrwx 1 root root       7 Jun 14 13:53 mpathd -> ../dm-3
> lrwxrwxrwx 1 root root       7 Jun 14 13:53 mpathe -> ../dm-4
> lrwxrwxrwx 1 root root       7 Jun 14 13:53 mpathf -> ../dm-5
> lrwxrwxrwx 1 root root       7 Jun 14 13:53 mpathg -> ../dm-6
> lrwxrwxrwx 1 root root       7 Jun 14 13:53 mpathh -> ../dm-7
> 
> We now create and remove a partition using fdisk.
> 
> # fdisk /dev/mapper/mpatha
> 
> Welcome to fdisk (util-linux 2.28).
> Changes will remain in memory only, until you decide to write them.
> Be careful before using the write command.
> 
> 
> Command (m for help): n
> Partition number (1-128, default 1): 
> First sector (34-2097118, default 32768): 
> Last sector, +sectors or +size{K,M,G,T,P} (32768-2097118, default 2097118): 
> 
> Created a new partition 1 of type 'Linux filesystem' and of size 1008 MiB.
> 
> Command (m for help): w
> The partition table has been altered.
> Calling ioctl() to re-read partition table.
> Re-reading the partition table failed.: Invalid argument
> 
> The kernel still uses the old table. The new table will be used at the next
> reboot or after you run partprobe(8) or kpartx(8).
> 
> Resulting in:
> 
> # ls -l /dev/mapper/mpatha*
> lrwxrwxrwx 1 root root 7 Jun 15 14:58 /dev/mapper/mpatha -> ../dm-0
> lrwxrwxrwx 1 root root 7 Jun 15 14:58 /dev/mapper/mpatha-part1 -> ../dm-8
> # ls -l /dev/disk/by-id/scsi-mpatha*
> lrwxrwxrwx 1 root root 10 Jun 15 15:02 /dev/disk/by-id/scsi-mpatha ->
> ../../dm-0
> lrwxrwxrwx 1 root root 10 Jun 15 15:02 /dev/disk/by-id/scsi-mpatha-part1 ->
> ../../dm-2
> 
> Now when I remove this partition:
> 
> # fdisk /dev/mapper/mpatha
> 
> Welcome to fdisk (util-linux 2.28).
> Changes will remain in memory only, until you decide to write them.
> Be careful before using the write command.
> 
> 
> Command (m for help): d
> Selected partition 1
> Partition 1 has been deleted.
> 
> Command (m for help): w
> The partition table has been altered.
> Calling ioctl() to re-read partition table.
> Re-reading the partition table failed.: Invalid argument
> 
> The kernel still uses the old table. The new table will be used at the next
> reboot or after you run partprobe(8) or kpartx(8).
> 
> The /dev/mapper partition device file is still present:
> 
> # ls -l /dev/mapper/mpatha*
> lrwxrwxrwx 1 root root 7 Jun 15 15:05 /dev/mapper/mpatha -> ../dm-0
> lrwxrwxrwx 1 root root 7 Jun 15 15:02 /dev/mapper/mpatha-part1 -> ../dm-2
> # ls -l /dev/disk/by-id/scsi-mpatha
> lrwxrwxrwx 1 root root 10 Jun 15 15:13 /dev/disk/by-id/scsi-mpatha ->
> ../../dm-2
> 
> Note that the /dev/disk/by-path file is gone while the /dev/mapper
> device file remains.
> 
> Here is the output from udevadm monitor while removing the partition:
> 
> KERNEL[155.958774] change   /devices/virtual/block/dm-2 (block)
> UDEV  [155.986198] change   /devices/virtual/block/dm-2 (block)
> 
> and /proc/partitions indicates that the partition is gone:
> 
> # cat /proc/partitions  | grep -- dm-
>  254        0    1048576 dm-0
>  254        1    1048576 dm-1
>  254        2    1048576 dm-2
>  254        3    1048576 dm-3
>  254        4    1048576 dm-4
>  254        5    1048576 dm-5
>  254        6    1048576 dm-6
>  254        7    1048576 dm-7
>  254        8    1032175 dm-8
> 
> This seems to work correctly when using parted, e.g.,
> 
> # ls -l /dev/mapper/mpathb*
> lrwxrwxrwx 1 root root 7 Jun 15 15:19 /dev/mapper/mpathb -> ../dm-3
> lrwxrwxrwx 1 root root 7 Jun 15 15:19 /dev/mapper/mpathb1 -> ../dm-9
> # ls -l /dev/disk/by-id/scsi-mpathb*
> lrwxrwxrwx 1 root root 10 Jun 15 15:19 /dev/disk/by-id/scsi-mpathb ->
> ../../dm-3
> lrwxrwxrwx 1 root root 10 Jun 15 15:19 /dev/disk/by-id/scsi-mpathb1 ->
> ../../dm-9
> 
> # parted /dev/mapper/mpathb
> GNU Parted 3.2
> Using /dev/mapper/mpathb
> Welcome to GNU Parted! Type 'help' to view a list of commands.
> (parted) rm 1
> (parted) quit                                                             
> Information: You may need to update /etc/fstab.
> 
> # ls -l /dev/mapper/mpathb*                            
> lrwxrwxrwx 1 root root 7 Jun 15 15:22 /dev/mapper/mpathb -> ../dm-3
> # ls -l /dev/disk/by-id/scsi-mpathb*
> lrwxrwxrwx 1 root root 10 Jun 15 15:22 /dev/disk/by-id/scsi-mpathb ->
> ../../dm-3
> 
> Here is the output for udevadm monitor when deleting the parted partition:
> 
> KERNEL[735.524037] change   /devices/virtual/block/dm-9 (block)
> KERNEL[735.524470] change   /devices/virtual/block/dm-3 (block)
> UDEV  [735.540771] change   /devices/virtual/block/dm-9 (block)
> KERNEL[735.543465] add      /devices/virtual/bdi/254:10 (bdi)
> KERNEL[735.543534] add      /devices/virtual/block/dm-10 (block)
> UDEV  [735.543727] add      /devices/virtual/bdi/254:10 (bdi)
> KERNEL[735.543795] remove   /devices/virtual/block/dm-10 (block)
> UDEV  [735.548136] add      /devices/virtual/block/dm-10 (block)
> UDEV  [735.548265] remove   /devices/virtual/block/dm-10 (block)
> KERNEL[735.556226] remove   /devices/virtual/bdi/254:10 (bdi)
> UDEV  [735.556447] remove   /devices/virtual/bdi/254:10 (bdi)
> UDEV  [735.573117] change   /devices/virtual/block/dm-3 (block)
> KERNEL[739.475199] change   /devices/virtual/block/dm-9 (block)
> UDEV  [739.517662] change   /devices/virtual/block/dm-9 (block)
> KERNEL[739.518452] remove   /devices/virtual/block/dm-9 (block)
> KERNEL[739.518643] remove   /devices/virtual/block/dm-9 (block)
> UDEV  [739.521683] remove   /devices/virtual/block/dm-9 (block)
> UDEV  [739.521786] remove   /devices/virtual/block/dm-9 (block)
> KERNEL[739.532256] remove   /devices/virtual/bdi/254:9 (bdi)
> UDEV  [739.532847] remove   /devices/virtual/bdi/254:9 (bdi)
> KERNEL[744.961662] change   /devices/virtual/block/dm-3 (block)
> UDEV  [744.981294] change   /devices/virtual/block/dm-3 (block)
> 
> Note, we are now getting events for the partition as well as the parent
> block device.
> 
> Note that when using parted, we get a different partition device file
> -- /dev/mapper/mpathb1 than that created with fdisk. This difference
> is discussed in bug
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=827308/
> 
> I have seen this same issue in earlier versions of multipath-tools.
> 
-- 
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System
[0003-Cater-to-devices-beyond-a-z.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Added tag(s) confirmed. Request was from Ritesh Raj Sarraf <rrs@debian.org> to 827412-submit@bugs.debian.org. (Thu, 16 Jun 2016 10:48:06 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#827412; Package multipath-tools. (Thu, 16 Jun 2016 16:57:05 GMT) (full text, mbox, link).


Acknowledgement sent to Andrew Patterson <andrew.patterson@hpe.com>:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>. (Thu, 16 Jun 2016 16:57:06 GMT) (full text, mbox, link).


Message #17 received at 827412@bugs.debian.org (full text, mbox, reply):

From: Andrew Patterson <andrew.patterson@hpe.com>
To: 827412@bugs.debian.org
Subject: Re: Bug#827412: multipath-tools: /dev/mapper device files not removed when partition is removed
Date: Thu, 16 Jun 2016 10:48:16 -0600
On Thu, 16 Jun 2016 16:15:54 +0530 Ritesh Raj Sarraf <rrs@debian.org> wrote:
> Control: tag -1 +confirmed
> 
> 
> Can you please try the attached patch ?
> 
> 
> 

That works:

# ls -l /dev/mapper
total 0
crw------- 1 root root 10, 236 Jun 16 10:23 control
lrwxrwxrwx 1 root root       7 Jun 16 10:39 mpatha -> ../dm-0
lrwxrwxrwx 1 root root       7 Jun 16 10:39 mpatha-part1 -> ../dm-8
lrwxrwxrwx 1 root root       7 Jun 16 10:29 mpathb -> ../dm-1
lrwxrwxrwx 1 root root       7 Jun 16 10:29 mpathc -> ../dm-2
lrwxrwxrwx 1 root root       7 Jun 16 10:29 mpathd -> ../dm-3
lrwxrwxrwx 1 root root       7 Jun 16 10:29 mpathe -> ../dm-4
lrwxrwxrwx 1 root root       7 Jun 16 10:29 mpathf -> ../dm-5
lrwxrwxrwx 1 root root       7 Jun 16 10:29 mpathg -> ../dm-6
lrwxrwxrwx 1 root root       7 Jun 16 10:29 mpathh -> ../dm-7


# fdisk /dev/mapper/mpatha

Welcome to fdisk (util-linux 2.28).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): d
Selected partition 1
Partition 1 has been deleted.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Invalid argument

The kernel still uses the old table. The new table will be used at the next reboot or after you run partprobe(8) or kpartx(8).

# ls -l /dev/mapper
total 0
crw------- 1 root root 10, 236 Jun 16 10:23 control
lrwxrwxrwx 1 root root       7 Jun 16 10:41 mpatha -> ../dm-0
lrwxrwxrwx 1 root root       7 Jun 16 10:44 mpathb -> ../dm-1
lrwxrwxrwx 1 root root       7 Jun 16 10:29 mpathc -> ../dm-2
lrwxrwxrwx 1 root root       7 Jun 16 10:29 mpathd -> ../dm-3
lrwxrwxrwx 1 root root       7 Jun 16 10:29 mpathe -> ../dm-4
lrwxrwxrwx 1 root root       7 Jun 16 10:29 mpathf -> ../dm-5
lrwxrwxrwx 1 root root       7 Jun 16 10:29 mpathg -> ../dm-6
lrwxrwxrwx 1 root root       7 Jun 16 10:29 mpathh -> ../dm-7


-- 
Andrew Patterson
Hewlett-Packard Enterprise



Information forwarded to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#827412; Package multipath-tools. (Thu, 16 Jun 2016 17:09:05 GMT) (full text, mbox, link).


Acknowledgement sent to rrs@debian.org:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>. (Thu, 16 Jun 2016 17:09:05 GMT) (full text, mbox, link).


Message #22 received at 827412@bugs.debian.org (full text, mbox, reply):

From: Ritesh Raj Sarraf <rrs@debian.org>
To: Andrew Patterson <andrew.patterson@hpe.com>, 827412@bugs.debian.org
Subject: Re: Bug#827412: multipath-tools: /dev/mapper device files not removed when partition is removed
Date: Thu, 16 Jun 2016 22:35:17 +0530
[Message part 1 (text/plain, inline)]
Control: tag -1 +pending

On Thu, 2016-06-16 at 10:48 -0600, Andrew Patterson wrote:
> On Thu, 16 Jun 2016 16:15:54 +0530 Ritesh Raj Sarraf <rrs@debian.org> wrote:
> > Control: tag -1 +confirmed
> > 
> > 
> > Can you please try the attached patch ?
> > 
> > 
> > 
> 
> That works:

Thank you very much. Will be part of next upload

-- 
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System
[signature.asc (application/pgp-signature, inline)]

Added tag(s) pending. Request was from Ritesh Raj Sarraf <rrs@debian.org> to 827412-submit@bugs.debian.org. (Thu, 16 Jun 2016 17:09:06 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#827412; Package multipath-tools. (Thu, 16 Jun 2016 17:21:04 GMT) (full text, mbox, link).


Acknowledgement sent to rrs@debian.org:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>. (Thu, 16 Jun 2016 17:21:04 GMT) (full text, mbox, link).


Message #29 received at 827412@bugs.debian.org (full text, mbox, reply):

From: Ritesh Raj Sarraf <rrs@debian.org>
To: Andrew Patterson <andrew.patterson@hpe.com>, 827412@bugs.debian.org
Subject: Re: Bug#827412: multipath-tools: /dev/mapper device files not removed when partition is removed
Date: Thu, 16 Jun 2016 22:47:36 +0530
[Message part 1 (text/plain, inline)]
Control: tag -1 -pending

On Thu, 2016-06-16 at 22:35 +0530, Ritesh Raj Sarraf wrote:
> Control: tag -1 +pending
> 
> On Thu, 2016-06-16 at 10:48 -0600, Andrew Patterson wrote:
> > On Thu, 16 Jun 2016 16:15:54 +0530 Ritesh Raj Sarraf <rrs@debian.org> wrote:
> > > Control: tag -1 +confirmed
> > > 
> > > 
> > > Can you please try the attached patch ?
> > > 
> > > 
> > > 
> > 
> > That works:
> 
> Thank you very much. Will be part of next upload

Actually, my root cause may not be correct here. mpath*-* results in a wider
wildcard. The current one, mpath-* should have covered the mpath-WWID case. But
that is what the bug is about.

Needs more investigation.

-- 
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System
[signature.asc (application/pgp-signature, inline)]

Removed tag(s) pending. Request was from Ritesh Raj Sarraf <rrs@debian.org> to 827412-submit@bugs.debian.org. (Thu, 16 Jun 2016 17:21:04 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#827412; Package multipath-tools. (Thu, 16 Jun 2016 17:27:03 GMT) (full text, mbox, link).


Acknowledgement sent to rrs@debian.org:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>. (Thu, 16 Jun 2016 17:27:04 GMT) (full text, mbox, link).


Message #36 received at 827412@bugs.debian.org (full text, mbox, reply):

From: Ritesh Raj Sarraf <rrs@debian.org>
To: Andrew Patterson <andrew.patterson@hpe.com>, 827412@bugs.debian.org
Subject: Re: Bug#827412: multipath-tools: /dev/mapper device files not removed when partition is removed
Date: Thu, 16 Jun 2016 22:54:08 +0530
[Message part 1 (text/plain, inline)]
On Thu, 2016-06-16 at 22:47 +0530, Ritesh Raj Sarraf wrote:
> On Thu, 2016-06-16 at 22:35 +0530, Ritesh Raj Sarraf wrote:
> > Control: tag -1 +pending
> > 
> > On Thu, 2016-06-16 at 10:48 -0600, Andrew Patterson wrote:
> > > On Thu, 16 Jun 2016 16:15:54 +0530 Ritesh Raj Sarraf <rrs@debian.org>
> wrote:
> > > > Control: tag -1 +confirmed
> > > > 
> > > > 
> > > > Can you please try the attached patch ?
> > > > 
> > > > 
> > > > 
> > > 
> > > That works:
> > 
> > Thank you very much. Will be part of next upload
> 
> Actually, my root cause may not be correct here. mpath*-* results in a wider
> wildcard. The current one, mpath-* should have covered the mpath-WWID case.
> But
> that is what the bug is about.
> 
> Needs more investigation.

Can you please try it without the friendly names setting ?
The current rule seems to be working fine in an environment without friendly
names.

And please share output of /dev/disk/by-id/ with and without friendly names set.

-- 
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#827412; Package multipath-tools. (Thu, 16 Jun 2016 18:54:04 GMT) (full text, mbox, link).


Acknowledgement sent to Andrew Patterson <andrew.patterson@hpe.com>:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>. (Thu, 16 Jun 2016 18:54:04 GMT) (full text, mbox, link).


Message #41 received at 827412@bugs.debian.org (full text, mbox, reply):

From: Andrew Patterson <andrew.patterson@hpe.com>
To: 827412@bugs.debian.org
Subject: Re: Bug#827412: multipath-tools: /dev/mapper device files not removed when partition is removed
Date: Thu, 16 Jun 2016 12:51:55 -0600
On Thu, 16 Jun 2016 22:54:08 +0530 Ritesh Raj Sarraf <rrs@debian.org> wrote:
> On Thu, 2016-06-16 at 22:47 +0530, Ritesh Raj Sarraf wrote:
> > On Thu, 2016-06-16 at 22:35 +0530, Ritesh Raj Sarraf wrote:
> > > Control: tag -1 +pending
> > >Â 
> > > On Thu, 2016-06-16 at 10:48 -0600, Andrew Patterson wrote:
> > > > On Thu, 16 Jun 2016 16:15:54 +0530 Ritesh Raj Sarraf <rrs@debian.org>
> > wrote:
> > > > > Control: tag -1 +confirmed
> > > > >Â 
> > > > >Â 
> > > > > Can you please try the attached patch ?
> > > > >Â 
> > > > >Â 
> > > > >Â 
> > > >Â 
> > > > That works:
> > >Â 
> > > Thank you very much. Will be part of next upload
> > 
> > Actually, my root cause may not be correct here. mpath*-* results in a wider
> > wildcard. The current one, mpath-* should have covered the mpath-WWID case.
> > But
> > that is what the bug is about.
> > 
> > Needs more investigation.
> 
> Can you please try it without the friendly names setting ?
> The current rule seems to be working fine in an environment without friendly
> names.
> 
> And please share output of /dev/disk/by-id/ with and without friendly names set.
> 

With user_friendly_names turned off:

# ls -l /dev/mapper
total 0
lrwxrwxrwx 1 root root       7 Jun 16 12:42 360002ac00000000000001904000028be -> ../dm-0
lrwxrwxrwx 1 root root       7 Jun 16 12:42 360002ac00000000000001904000028be-part1 -> ../dm-8
lrwxrwxrwx 1 root root       7 Jun 16 12:38 360002ac00000000000001905000028be -> ../dm-1
lrwxrwxrwx 1 root root       7 Jun 16 12:38 360002ac00000000000001906000028be -> ../dm-2
lrwxrwxrwx 1 root root       7 Jun 16 12:38 360002ac00000000000001907000028be -> ../dm-3
lrwxrwxrwx 1 root root       7 Jun 16 12:38 360002ac00000000000001908000028be -> ../dm-4
lrwxrwxrwx 1 root root       7 Jun 16 12:38 360002ac00000000000001909000028be -> ../dm-5
lrwxrwxrwx 1 root root       7 Jun 16 12:38 360002ac0000000000000190a000028be -> ../dm-6
lrwxrwxrwx 1 root root       7 Jun 16 12:38 360002ac0000000000000190b000028be -> ../dm-7
crw------- 1 root root 10, 236 Jun 16 10:23 control

# ls -l /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root 10 Jun 16 12:42 dm-name-360002ac00000000000001904000028be -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jun 16 12:42 dm-name-360002ac00000000000001904000028be-part1 -> ../../dm-8
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-name-360002ac00000000000001905000028be -> ../../dm-1
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-name-360002ac00000000000001906000028be -> ../../dm-2
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-name-360002ac00000000000001907000028be -> ../../dm-3
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-name-360002ac00000000000001908000028be -> ../../dm-4
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-name-360002ac00000000000001909000028be -> ../../dm-5
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-name-360002ac0000000000000190a000028be -> ../../dm-6
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-name-360002ac0000000000000190b000028be -> ../../dm-7
lrwxrwxrwx 1 root root 10 Jun 16 12:42 dm-uuid-mpath-360002ac00000000000001904000028be -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-uuid-mpath-360002ac00000000000001905000028be -> ../../dm-1
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-uuid-mpath-360002ac00000000000001906000028be -> ../../dm-2
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-uuid-mpath-360002ac00000000000001907000028be -> ../../dm-3
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-uuid-mpath-360002ac00000000000001908000028be -> ../../dm-4
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-uuid-mpath-360002ac00000000000001909000028be -> ../../dm-5
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-uuid-mpath-360002ac0000000000000190a000028be -> ../../dm-6
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-uuid-mpath-360002ac0000000000000190b000028be -> ../../dm-7
lrwxrwxrwx 1 root root 10 Jun 16 12:42 dm-uuid-part1-mpath-360002ac00000000000001904000028be -> ../../dm-8
lrwxrwxrwx 1 root root  9 Jun 16 10:23 scsi-0HP_LOGICAL_VOLUME_00000000 -> ../../sda
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-0HP_LOGICAL_VOLUME_00000000-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-0HP_LOGICAL_VOLUME_00000000-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-0HP_LOGICAL_VOLUME_00000000-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Jun 16 12:42 scsi-360002ac00000000000001904000028be -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jun 16 12:42 scsi-360002ac00000000000001904000028be-part1 -> ../../dm-8
lrwxrwxrwx 1 root root 10 Jun 16 12:38 scsi-360002ac00000000000001905000028be -> ../../dm-1
lrwxrwxrwx 1 root root 10 Jun 16 12:38 scsi-360002ac00000000000001906000028be -> ../../dm-2
lrwxrwxrwx 1 root root 10 Jun 16 12:38 scsi-360002ac00000000000001907000028be -> ../../dm-3
lrwxrwxrwx 1 root root 10 Jun 16 12:38 scsi-360002ac00000000000001908000028be -> ../../dm-4
lrwxrwxrwx 1 root root 10 Jun 16 12:38 scsi-360002ac00000000000001909000028be -> ../../dm-5
lrwxrwxrwx 1 root root 10 Jun 16 12:38 scsi-360002ac0000000000000190a000028be -> ../../dm-6
lrwxrwxrwx 1 root root 10 Jun 16 12:38 scsi-360002ac0000000000000190b000028be -> ../../dm-7
lrwxrwxrwx 1 root root  9 Jun 16 10:23 scsi-3600508b1001c5238e1cdb3176eacbd63 -> ../../sda
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-3600508b1001c5238e1cdb3176eacbd63-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-3600508b1001c5238e1cdb3176eacbd63-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-3600508b1001c5238e1cdb3176eacbd63-part3 -> ../../sda3
lrwxrwxrwx 1 root root  9 Jun 16 10:23 scsi-S3PARdata_VV_1410430 -> ../../sdo
lrwxrwxrwx 1 root root  9 Jun 16 10:23 scsi-SHP_LOGICAL_VOLUME_PDZVU0HLM7Q0HS -> ../../sda
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-SHP_LOGICAL_VOLUME_PDZVU0HLM7Q0HS-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-SHP_LOGICAL_VOLUME_PDZVU0HLM7Q0HS-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-SHP_LOGICAL_VOLUME_PDZVU0HLM7Q0HS-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Jun 16 12:42 wwn-0x60002ac00000000000001904000028be -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jun 16 12:42 wwn-0x60002ac00000000000001904000028be-part1 -> ../../dm-8
lrwxrwxrwx 1 root root 10 Jun 16 12:38 wwn-0x60002ac00000000000001905000028be -> ../../dm-1
lrwxrwxrwx 1 root root 10 Jun 16 12:38 wwn-0x60002ac00000000000001906000028be -> ../../dm-2
lrwxrwxrwx 1 root root 10 Jun 16 12:38 wwn-0x60002ac00000000000001907000028be -> ../../dm-3
lrwxrwxrwx 1 root root 10 Jun 16 12:38 wwn-0x60002ac00000000000001908000028be -> ../../dm-4
lrwxrwxrwx 1 root root 10 Jun 16 12:38 wwn-0x60002ac00000000000001909000028be -> ../../dm-5
lrwxrwxrwx 1 root root 10 Jun 16 12:38 wwn-0x60002ac0000000000000190a000028be -> ../../dm-6
lrwxrwxrwx 1 root root 10 Jun 16 12:38 wwn-0x60002ac0000000000000190b000028be -> ../../dm-7
lrwxrwxrwx 1 root root  9 Jun 16 10:23 wwn-0x600508b1001c5238e1cdb3176eacbd63 -> ../../sda
lrwxrwxrwx 1 root root 10 Jun 16 10:23 wwn-0x600508b1001c5238e1cdb3176eacbd63-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 16 10:23 wwn-0x600508b1001c5238e1cdb3176eacbd63-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 16 10:23 wwn-0x600508b1001c5238e1cdb3176eacbd63-part3 -> ../../sda3

# fdisk /dev/mapper/360002ac00000000000001904000028be

Welcome to fdisk (util-linux 2.28).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): d
Selected partition 1
Partition 1 has been deleted.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Invalid argument

The kernel still uses the old table. The new table will be used at the
next reboot or after you run partprobe(8) or kpartx(8).

# ls -l /dev/mapper
total 0
lrwxrwxrwx 1 root root       7 Jun 16 12:43 360002ac00000000000001904000028be -> ../dm-0
lrwxrwxrwx 1 root root       7 Jun 16 12:38 360002ac00000000000001905000028be -> ../dm-1
lrwxrwxrwx 1 root root       7 Jun 16 12:38 360002ac00000000000001906000028be -> ../dm-2
lrwxrwxrwx 1 root root       7 Jun 16 12:38 360002ac00000000000001907000028be -> ../dm-3
lrwxrwxrwx 1 root root       7 Jun 16 12:38 360002ac00000000000001908000028be -> ../dm-4
lrwxrwxrwx 1 root root       7 Jun 16 12:38 360002ac00000000000001909000028be -> ../dm-5
lrwxrwxrwx 1 root root       7 Jun 16 12:38 360002ac0000000000000190a000028be -> ../dm-6
lrwxrwxrwx 1 root root       7 Jun 16 12:38 360002ac0000000000000190b000028be -> ../dm-7
crw------- 1 root root 10, 236 Jun 16 10:23 control

# ls -l /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root 10 Jun 16 12:43 dm-name-360002ac00000000000001904000028be -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-name-360002ac00000000000001905000028be -> ../../dm-1
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-name-360002ac00000000000001906000028be -> ../../dm-2
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-name-360002ac00000000000001907000028be -> ../../dm-3
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-name-360002ac00000000000001908000028be -> ../../dm-4
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-name-360002ac00000000000001909000028be -> ../../dm-5
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-name-360002ac0000000000000190a000028be -> ../../dm-6
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-name-360002ac0000000000000190b000028be -> ../../dm-7
lrwxrwxrwx 1 root root 10 Jun 16 12:43 dm-uuid-mpath-360002ac00000000000001904000028be -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-uuid-mpath-360002ac00000000000001905000028be -> ../../dm-1
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-uuid-mpath-360002ac00000000000001906000028be -> ../../dm-2
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-uuid-mpath-360002ac00000000000001907000028be -> ../../dm-3
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-uuid-mpath-360002ac00000000000001908000028be -> ../../dm-4
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-uuid-mpath-360002ac00000000000001909000028be -> ../../dm-5
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-uuid-mpath-360002ac0000000000000190a000028be -> ../../dm-6
lrwxrwxrwx 1 root root 10 Jun 16 12:38 dm-uuid-mpath-360002ac0000000000000190b000028be -> ../../dm-7
lrwxrwxrwx 1 root root  9 Jun 16 10:23 scsi-0HP_LOGICAL_VOLUME_00000000 -> ../../sda
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-0HP_LOGICAL_VOLUME_00000000-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-0HP_LOGICAL_VOLUME_00000000-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-0HP_LOGICAL_VOLUME_00000000-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Jun 16 12:43 scsi-360002ac00000000000001904000028be -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jun 16 12:38 scsi-360002ac00000000000001905000028be -> ../../dm-1
lrwxrwxrwx 1 root root 10 Jun 16 12:38 scsi-360002ac00000000000001906000028be -> ../../dm-2
lrwxrwxrwx 1 root root 10 Jun 16 12:38 scsi-360002ac00000000000001907000028be -> ../../dm-3
lrwxrwxrwx 1 root root 10 Jun 16 12:38 scsi-360002ac00000000000001908000028be -> ../../dm-4
lrwxrwxrwx 1 root root 10 Jun 16 12:38 scsi-360002ac00000000000001909000028be -> ../../dm-5
lrwxrwxrwx 1 root root 10 Jun 16 12:38 scsi-360002ac0000000000000190a000028be -> ../../dm-6
lrwxrwxrwx 1 root root 10 Jun 16 12:38 scsi-360002ac0000000000000190b000028be -> ../../dm-7
lrwxrwxrwx 1 root root  9 Jun 16 10:23 scsi-3600508b1001c5238e1cdb3176eacbd63 -> ../../sda
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-3600508b1001c5238e1cdb3176eacbd63-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-3600508b1001c5238e1cdb3176eacbd63-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-3600508b1001c5238e1cdb3176eacbd63-part3 -> ../../sda3
lrwxrwxrwx 1 root root  9 Jun 16 10:23 scsi-S3PARdata_VV_1410430 -> ../../sdo
lrwxrwxrwx 1 root root  9 Jun 16 10:23 scsi-SHP_LOGICAL_VOLUME_PDZVU0HLM7Q0HS -> ../../sda
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-SHP_LOGICAL_VOLUME_PDZVU0HLM7Q0HS-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-SHP_LOGICAL_VOLUME_PDZVU0HLM7Q0HS-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-SHP_LOGICAL_VOLUME_PDZVU0HLM7Q0HS-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Jun 16 12:43 wwn-0x60002ac00000000000001904000028be -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jun 16 12:38 wwn-0x60002ac00000000000001905000028be -> ../../dm-1
lrwxrwxrwx 1 root root 10 Jun 16 12:38 wwn-0x60002ac00000000000001906000028be -> ../../dm-2
lrwxrwxrwx 1 root root 10 Jun 16 12:38 wwn-0x60002ac00000000000001907000028be -> ../../dm-3
lrwxrwxrwx 1 root root 10 Jun 16 12:38 wwn-0x60002ac00000000000001908000028be -> ../../dm-4
lrwxrwxrwx 1 root root 10 Jun 16 12:38 wwn-0x60002ac00000000000001909000028be -> ../../dm-5
lrwxrwxrwx 1 root root 10 Jun 16 12:38 wwn-0x60002ac0000000000000190a000028be -> ../../dm-6
lrwxrwxrwx 1 root root 10 Jun 16 12:38 wwn-0x60002ac0000000000000190b000028be -> ../../dm-7
lrwxrwxrwx 1 root root  9 Jun 16 10:23 wwn-0x600508b1001c5238e1cdb3176eacbd63 -> ../../sda
lrwxrwxrwx 1 root root 10 Jun 16 10:23 wwn-0x600508b1001c5238e1cdb3176eacbd63-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 16 10:23 wwn-0x600508b1001c5238e1cdb3176eacbd63-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 16 10:23 wwn-0x600508b1001c5238e1cdb3176eacbd63-part3 -> ../../sda3

And with "user_friendly_names" turned on:

# ls -l /dev/mapper
total 0
crw------- 1 root root 10, 236 Jun 16 10:23 control
lrwxrwxrwx 1 root root       7 Jun 16 12:48 mpatha -> ../dm-0
lrwxrwxrwx 1 root root       7 Jun 16 12:48 mpatha-part1 -> ../dm-8
lrwxrwxrwx 1 root root       7 Jun 16 12:47 mpathb -> ../dm-1
lrwxrwxrwx 1 root root       7 Jun 16 12:47 mpathc -> ../dm-2
lrwxrwxrwx 1 root root       7 Jun 16 12:47 mpathd -> ../dm-3
lrwxrwxrwx 1 root root       7 Jun 16 12:47 mpathe -> ../dm-4
lrwxrwxrwx 1 root root       7 Jun 16 12:47 mpathf -> ../dm-5
lrwxrwxrwx 1 root root       7 Jun 16 12:47 mpathg -> ../dm-6
lrwxrwxrwx 1 root root       7 Jun 16 12:47 mpathh -> ../dm-7

# ls -l /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root 10 Jun 16 12:48 dm-name-mpatha -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jun 16 12:48 dm-name-mpatha-part1 -> ../../dm-8
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-name-mpathb -> ../../dm-1
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-name-mpathc -> ../../dm-2
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-name-mpathd -> ../../dm-3
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-name-mpathe -> ../../dm-4
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-name-mpathf -> ../../dm-5
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-name-mpathg -> ../../dm-6
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-name-mpathh -> ../../dm-7
lrwxrwxrwx 1 root root 10 Jun 16 12:48 dm-uuid-mpath-360002ac00000000000001904000028be -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-uuid-mpath-360002ac00000000000001905000028be -> ../../dm-1
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-uuid-mpath-360002ac00000000000001906000028be -> ../../dm-2
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-uuid-mpath-360002ac00000000000001907000028be -> ../../dm-3
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-uuid-mpath-360002ac00000000000001908000028be -> ../../dm-4
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-uuid-mpath-360002ac00000000000001909000028be -> ../../dm-5
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-uuid-mpath-360002ac0000000000000190a000028be -> ../../dm-6
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-uuid-mpath-360002ac0000000000000190b000028be -> ../../dm-7
lrwxrwxrwx 1 root root 10 Jun 16 12:48 dm-uuid-part1-mpath-360002ac00000000000001904000028be -> ../../dm-8
lrwxrwxrwx 1 root root  9 Jun 16 10:23 scsi-0HP_LOGICAL_VOLUME_00000000 -> ../../sda
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-0HP_LOGICAL_VOLUME_00000000-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-0HP_LOGICAL_VOLUME_00000000-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-0HP_LOGICAL_VOLUME_00000000-part3 -> ../../sda3
lrwxrwxrwx 1 root root  9 Jun 16 12:47 scsi-360002ac00000000000001904000028be -> ../../sdz
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-360002ac00000000000001905000028be -> ../../sdaa
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-360002ac00000000000001906000028be -> ../../sdab
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-360002ac00000000000001907000028be -> ../../sdac
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-360002ac00000000000001908000028be -> ../../sdad
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-360002ac00000000000001909000028be -> ../../sdae
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-360002ac0000000000000190a000028be -> ../../sdaf
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-360002ac0000000000000190b000028be -> ../../sdag
lrwxrwxrwx 1 root root  9 Jun 16 10:23 scsi-3600508b1001c5238e1cdb3176eacbd63 -> ../../sda
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-3600508b1001c5238e1cdb3176eacbd63-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-3600508b1001c5238e1cdb3176eacbd63-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-3600508b1001c5238e1cdb3176eacbd63-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Jun 16 12:48 scsi-mpatha -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jun 16 12:48 scsi-mpatha-part1 -> ../../dm-8
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-mpathb -> ../../dm-1
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-mpathc -> ../../dm-2
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-mpathd -> ../../dm-3
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-mpathe -> ../../dm-4
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-mpathf -> ../../dm-5
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-mpathg -> ../../dm-6
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-mpathh -> ../../dm-7
lrwxrwxrwx 1 root root  9 Jun 16 10:23 scsi-S3PARdata_VV_1410430 -> ../../sdo
lrwxrwxrwx 1 root root  9 Jun 16 10:23 scsi-SHP_LOGICAL_VOLUME_PDZVU0HLM7Q0HS -> ../../sda
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-SHP_LOGICAL_VOLUME_PDZVU0HLM7Q0HS-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-SHP_LOGICAL_VOLUME_PDZVU0HLM7Q0HS-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-SHP_LOGICAL_VOLUME_PDZVU0HLM7Q0HS-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Jun 16 12:48 wwn-0x60002ac00000000000001904000028be -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jun 16 12:47 wwn-0x60002ac00000000000001905000028be -> ../../dm-1
lrwxrwxrwx 1 root root 10 Jun 16 12:47 wwn-0x60002ac00000000000001906000028be -> ../../dm-2
lrwxrwxrwx 1 root root 10 Jun 16 12:47 wwn-0x60002ac00000000000001907000028be -> ../../dm-3
lrwxrwxrwx 1 root root 10 Jun 16 12:47 wwn-0x60002ac00000000000001908000028be -> ../../dm-4
lrwxrwxrwx 1 root root 10 Jun 16 12:47 wwn-0x60002ac00000000000001909000028be -> ../../dm-5
lrwxrwxrwx 1 root root 10 Jun 16 12:47 wwn-0x60002ac0000000000000190a000028be -> ../../dm-6
lrwxrwxrwx 1 root root 10 Jun 16 12:47 wwn-0x60002ac0000000000000190b000028be -> ../../dm-7
lrwxrwxrwx 1 root root  9 Jun 16 10:23 wwn-0x600508b1001c5238e1cdb3176eacbd63 -> ../../sda
lrwxrwxrwx 1 root root 10 Jun 16 10:23 wwn-0x600508b1001c5238e1cdb3176eacbd63-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 16 10:23 wwn-0x600508b1001c5238e1cdb3176eacbd63-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 16 10:23 wwn-0x600508b1001c5238e1cdb3176eacbd63-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Jun 16 12:48 wwn-0xpatha-part1 -> ../../dm-8

# fdisk /dev/mapper/mpatha

Welcome to fdisk (util-linux 2.28).
Changes will remain in memory only, until you decide to write them.
Be careful before using the write command.


Command (m for help): d
Selected partition 1
Partition 1 has been deleted.

Command (m for help): w
The partition table has been altered.
Calling ioctl() to re-read partition table.
Re-reading the partition table failed.: Invalid argument

The kernel still uses the old table. The new table will be used at the
next reboot or after you run partprobe(8) or kpartx(8).

# ls -l /dev/mapper
total 0
crw------- 1 root root 10, 236 Jun 16 10:23 control
lrwxrwxrwx 1 root root       7 Jun 16 12:48 mpatha -> ../dm-0
lrwxrwxrwx 1 root root       7 Jun 16 12:47 mpathb -> ../dm-1
lrwxrwxrwx 1 root root       7 Jun 16 12:47 mpathc -> ../dm-2
lrwxrwxrwx 1 root root       7 Jun 16 12:47 mpathd -> ../dm-3
lrwxrwxrwx 1 root root       7 Jun 16 12:47 mpathe -> ../dm-4
lrwxrwxrwx 1 root root       7 Jun 16 12:47 mpathf -> ../dm-5
lrwxrwxrwx 1 root root       7 Jun 16 12:47 mpathg -> ../dm-6
lrwxrwxrwx 1 root root       7 Jun 16 12:47 mpathh -> ../dm-7

# ls -l /dev/disk/by-id
total 0
lrwxrwxrwx 1 root root 10 Jun 16 12:48 dm-name-mpatha -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-name-mpathb -> ../../dm-1
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-name-mpathc -> ../../dm-2
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-name-mpathd -> ../../dm-3
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-name-mpathe -> ../../dm-4
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-name-mpathf -> ../../dm-5
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-name-mpathg -> ../../dm-6
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-name-mpathh -> ../../dm-7
lrwxrwxrwx 1 root root 10 Jun 16 12:48 dm-uuid-mpath-360002ac00000000000001904000028be -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-uuid-mpath-360002ac00000000000001905000028be -> ../../dm-1
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-uuid-mpath-360002ac00000000000001906000028be -> ../../dm-2
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-uuid-mpath-360002ac00000000000001907000028be -> ../../dm-3
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-uuid-mpath-360002ac00000000000001908000028be -> ../../dm-4
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-uuid-mpath-360002ac00000000000001909000028be -> ../../dm-5
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-uuid-mpath-360002ac0000000000000190a000028be -> ../../dm-6
lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-uuid-mpath-360002ac0000000000000190b000028be -> ../../dm-7
lrwxrwxrwx 1 root root  9 Jun 16 10:23 scsi-0HP_LOGICAL_VOLUME_00000000 -> ../../sda
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-0HP_LOGICAL_VOLUME_00000000-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-0HP_LOGICAL_VOLUME_00000000-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-0HP_LOGICAL_VOLUME_00000000-part3 -> ../../sda3
lrwxrwxrwx 1 root root  9 Jun 16 12:47 scsi-360002ac00000000000001904000028be -> ../../sdz
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-360002ac00000000000001905000028be -> ../../sdaa
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-360002ac00000000000001906000028be -> ../../sdab
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-360002ac00000000000001907000028be -> ../../sdac
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-360002ac00000000000001908000028be -> ../../sdad
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-360002ac00000000000001909000028be -> ../../sdae
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-360002ac0000000000000190a000028be -> ../../sdaf
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-360002ac0000000000000190b000028be -> ../../sdag
lrwxrwxrwx 1 root root  9 Jun 16 10:23 scsi-3600508b1001c5238e1cdb3176eacbd63 -> ../../sda
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-3600508b1001c5238e1cdb3176eacbd63-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-3600508b1001c5238e1cdb3176eacbd63-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-3600508b1001c5238e1cdb3176eacbd63-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Jun 16 12:48 scsi-mpatha -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-mpathb -> ../../dm-1
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-mpathc -> ../../dm-2
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-mpathd -> ../../dm-3
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-mpathe -> ../../dm-4
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-mpathf -> ../../dm-5
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-mpathg -> ../../dm-6
lrwxrwxrwx 1 root root 10 Jun 16 12:47 scsi-mpathh -> ../../dm-7
lrwxrwxrwx 1 root root  9 Jun 16 10:23 scsi-S3PARdata_VV_1410430 -> ../../sdo
lrwxrwxrwx 1 root root  9 Jun 16 10:23 scsi-SHP_LOGICAL_VOLUME_PDZVU0HLM7Q0HS -> ../../sda
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-SHP_LOGICAL_VOLUME_PDZVU0HLM7Q0HS-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-SHP_LOGICAL_VOLUME_PDZVU0HLM7Q0HS-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 16 10:23 scsi-SHP_LOGICAL_VOLUME_PDZVU0HLM7Q0HS-part3 -> ../../sda3
lrwxrwxrwx 1 root root 10 Jun 16 12:48 wwn-0x60002ac00000000000001904000028be -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jun 16 12:47 wwn-0x60002ac00000000000001905000028be -> ../../dm-1
lrwxrwxrwx 1 root root 10 Jun 16 12:47 wwn-0x60002ac00000000000001906000028be -> ../../dm-2
lrwxrwxrwx 1 root root 10 Jun 16 12:47 wwn-0x60002ac00000000000001907000028be -> ../../dm-3
lrwxrwxrwx 1 root root 10 Jun 16 12:47 wwn-0x60002ac00000000000001908000028be -> ../../dm-4
lrwxrwxrwx 1 root root 10 Jun 16 12:47 wwn-0x60002ac00000000000001909000028be -> ../../dm-5
lrwxrwxrwx 1 root root 10 Jun 16 12:47 wwn-0x60002ac0000000000000190a000028be -> ../../dm-6
lrwxrwxrwx 1 root root 10 Jun 16 12:47 wwn-0x60002ac0000000000000190b000028be -> ../../dm-7
lrwxrwxrwx 1 root root  9 Jun 16 10:23 wwn-0x600508b1001c5238e1cdb3176eacbd63 -> ../../sda
lrwxrwxrwx 1 root root 10 Jun 16 10:23 wwn-0x600508b1001c5238e1cdb3176eacbd63-part1 -> ../../sda1
lrwxrwxrwx 1 root root 10 Jun 16 10:23 wwn-0x600508b1001c5238e1cdb3176eacbd63-part2 -> ../../sda2
lrwxrwxrwx 1 root root 10 Jun 16 10:23 wwn-0x600508b1001c5238e1cdb3176eacbd63-part3 -> ../../sda3

So it looks like it works with both.

-- 
Andrew Patterson
Hewlett-Packard Enterprise



Information forwarded to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#827412; Package multipath-tools. (Fri, 17 Jun 2016 09:06:04 GMT) (full text, mbox, link).


Acknowledgement sent to rrs@debian.org:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>. (Fri, 17 Jun 2016 09:06:04 GMT) (full text, mbox, link).


Message #46 received at 827412@bugs.debian.org (full text, mbox, reply):

From: Ritesh Raj Sarraf <rrs@debian.org>
To: Andrew Patterson <andrew.patterson@hpe.com>, 827412@bugs.debian.org
Subject: Re: Bug#827412: multipath-tools: /dev/mapper device files not removed when partition is removed
Date: Fri, 17 Jun 2016 14:32:07 +0530
[Message part 1 (text/plain, inline)]
On Thu, 2016-06-16 at 12:51 -0600, Andrew Patterson wrote:
> lrwxrwxrwx 1 root root 10 Jun 16 12:48 dm-uuid-mpath-
> 360002ac00000000000001904000028be -> ../../dm-0
> lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-uuid-mpath-
> 360002ac00000000000001905000028be -> ../../dm-1
> lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-uuid-mpath-
> 360002ac00000000000001906000028be -> ../../dm-2
> lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-uuid-mpath-
> 360002ac00000000000001907000028be -> ../../dm-3
> lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-uuid-mpath-
> 360002ac00000000000001908000028be -> ../../dm-4
> lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-uuid-mpath-
> 360002ac00000000000001909000028be -> ../../dm-5
> lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-uuid-mpath-
> 360002ac0000000000000190a000028be -> ../../dm-6
> lrwxrwxrwx 1 root root 10 Jun 16 12:47 dm-uuid-mpath-
> 360002ac0000000000000190b000028be -> ../../dm-7
> lrwxrwxrwx 1 root root 10 Jun 16 12:48 dm-uuid-part1-mpath-
> 360002ac00000000000001904000028be -> ../../dm-8


To be honest, I'm a little lost now. This last line looks like where the bug is,
but again, if this is the bug, I can't see a reason why the patch worked on it.

Can you run the following command on the device that you create a partition for?
sudo udevadm info --path /sys/block/dm-0 --query=all

Where dm-X is your device.


-- 
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#827412; Package multipath-tools. (Fri, 17 Jun 2016 11:51:04 GMT) (full text, mbox, link).


Acknowledgement sent to rrs@debian.org:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>. (Fri, 17 Jun 2016 11:51:05 GMT) (full text, mbox, link).


Message #51 received at 827412@bugs.debian.org (full text, mbox, reply):

From: Ritesh Raj Sarraf <rrs@debian.org>
To: Andrew Patterson <andrew.patterson@hpe.com>, 827412@bugs.debian.org
Subject: Re: Bug#827412: multipath-tools: /dev/mapper device files not removed when partition is removed
Date: Fri, 17 Jun 2016 17:17:36 +0530
[Message part 1 (text/plain, inline)]
On Fri, 2016-06-17 at 14:32 +0530, Ritesh Raj Sarraf wrote:
> 
> 
> To be honest, I'm a little lost now. This last line looks like where the bug
> is,
> but again, if this is the bug, I can't see a reason why the patch worked on
> it.
> 
> Can you run the following command on the device that you create a partition
> for?
> sudo udevadm info --path /sys/block/dm-0 --query=all
> 
> Where dm-X is your device.

I ran it on my virtual setup.


root@debian-btrfs:~# udevadm info --path /sys/block/dm-2 --query=all
P: /devices/virtual/block/dm-2
N: dm-2
L: 50
S: disk/by-id/dm-name-36001405226c2409d98a4e35ba427b274-part1
S: disk/by-id/dm-uuid-part1-mpath-36001405226c2409d98a4e35ba427b274
S: disk/by-id/scsi-36001405226c2409d98a4e35ba427b274-part1
S: disk/by-id/wwn-0x6001405226c2409d98a4e35ba427b274-part1
S: mapper/36001405226c2409d98a4e35ba427b274-part1
E: DEVLINKS=/dev/disk/by-id/wwn-0x6001405226c2409d98a4e35ba427b274-part1 /dev/disk/by-id/dm-uuid-part1-mpath-36001405226c2409d98a4e35ba427b274 /dev/mapper/36001405226c2409d98a4e35ba427b274-part1 /dev/disk/by-id/dm-name-36001405226c2409d98a4e35ba427b274-part1 /dev/disk/by-id/scsi-36001405226c2409d98a4e35ba427b274-part1
E: DEVNAME=/dev/dm-2
E: DEVPATH=/devices/virtual/block/dm-2
E: DEVTYPE=disk
E: DM_ACTIVATION=1
E: DM_MPATH=36001405226c2409d98a4e35ba427b274
E: DM_NAME=36001405226c2409d98a4e35ba427b274-part1
E: DM_PART=1
E: DM_STATE=ACTIVE
E: DM_SUSPENDED=0
E: DM_TABLE_STATE=LIVE
E: DM_TYPE=scsi
E: DM_UDEV_DISABLE_LIBRARY_FALLBACK_FLAG=1
E: DM_UDEV_PRIMARY_SOURCE_FLAG=1
E: DM_UDEV_RULES=1
E: DM_UUID=part1-mpath-36001405226c2409d98a4e35ba427b274
E: DM_WWN=0x6001405226c2409d98a4e35ba427b274
E: ID_PART_ENTRY_DISK=253:1
E: ID_PART_ENTRY_NUMBER=1
E: ID_PART_ENTRY_OFFSET=65528
E: ID_PART_ENTRY_SCHEME=dos
E: ID_PART_ENTRY_SIZE=2031624
E: ID_PART_ENTRY_TYPE=0x83
E: MAJOR=253
E: MINOR=2
E: SUBSYSTEM=block
E: TAGS=:systemd:
E: USEC_INITIALIZED=339233875


The problem here is: E: DM_UUID=part1-mpath-36001405226c2409d98a4e35ba427b274 and the udev rule's: ENV{DM_STATE}!="SUSPENDED", ENV{DM_UUID}=="mpath-*", \
        RUN+="/sbin/kpartx -u -p -part /dev/$name"


For the whole device, the report is such:

root@debian-btrfs:~# udevadm info --path /sys/block/dm-1 --query=all
P: /devices/virtual/block/dm-1
N: dm-1
L: 50
S: disk/by-id/dm-name-36001405226c2409d98a4e35ba427b274
S: disk/by-id/dm-uuid-mpath-36001405226c2409d98a4e35ba427b274
S: disk/by-id/scsi-36001405226c2409d98a4e35ba427b274
S: disk/by-id/wwn-0x6001405226c2409d98a4e35ba427b274
S: mapper/36001405226c2409d98a4e35ba427b274
E: DEVLINKS=/dev/disk/by-id/dm-uuid-mpath-36001405226c2409d98a4e35ba427b274 /dev/disk/by-id/scsi-36001405226c2409d98a4e35ba427b274 /dev/mapper/36001405226c2409d98a4e35ba427b274 /dev/disk/by-id/dm-name-36001405226c2409d98a4e35ba427b274 /dev/disk/by-id/wwn-0x6001405226c2409d98a4e35ba427b274
E: DEVNAME=/dev/dm-1
E: DEVPATH=/devices/virtual/block/dm-1
E: DEVTYPE=disk
E: DM_NAME=36001405226c2409d98a4e35ba427b274
E: DM_STATE=ACTIVE
E: DM_SUSPENDED=0
E: DM_TABLE_STATE=LIVE
E: DM_TYPE=scsi
E: DM_UDEV_DISABLE_LIBRARY_FALLBACK_FLAG=1
E: DM_UDEV_PRIMARY_SOURCE_FLAG=1
E: DM_UDEV_RULES=1
E: DM_UUID=mpath-36001405226c2409d98a4e35ba427b274
E: DM_WWN=0x6001405226c2409d98a4e35ba427b274
E: ID_PART_TABLE_TYPE=dos
E: MAJOR=253
E: MINOR=1
E: SUBSYSTEM=block
E: TAGS=:systemd:
E: USEC_INITIALIZED=24061606


Now I am not sure if DM_UUID being prepended with partN is the correct behavior. Andrew: Do you know about it ?
From what I understand, the state of DM_UUID is different in Debian than Upstream. See debian/dmsetup_env for details.
Maybe the previous maintainer has the history of this deviation.


That said, my previous patch was not correct. I still don't know why it worked for your case. :-)

But for Debian, in its current form, perhaps the new (attached) patch will be better. Can you please test it Andrew?
I'll also talk to Guido when I get a chance.


-- 
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System
[catch-partitioned-devices-dmuuid.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#827412; Package multipath-tools. (Fri, 17 Jun 2016 11:57:05 GMT) (full text, mbox, link).


Acknowledgement sent to rrs@debian.org:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>. (Fri, 17 Jun 2016 11:57:06 GMT) (full text, mbox, link).


Message #56 received at 827412@bugs.debian.org (full text, mbox, reply):

From: Ritesh Raj Sarraf <rrs@debian.org>
To: Andrew Patterson <andrew.patterson@hpe.com>, 827412@bugs.debian.org
Subject: Re: Bug#827412: multipath-tools: /dev/mapper device files not removed when partition is removed
Date: Fri, 17 Jun 2016 17:22:14 +0530
[Message part 1 (text/plain, inline)]
On Fri, 2016-06-17 at 17:17 +0530, Ritesh Raj Sarraf wrote:
> Handle (broken?) DM Device partitions
> Debian Bug: #827412
> --- a/kpartx/kpartx.rules
> +++ b/kpartx/kpartx.rules
> @@ -37,7 +37,7 @@
>  # Create dm tables for partitions
>  ENV{DM_ACTION}=="PATH_FAILED|PATH_REINSTATED", GOTO="kpartx_end"
>  ENV{DM_NR_VALID_PATHS}=="0", GOTO="kpartx_end"
> -ENV{DM_STATE}!="SUSPENDED", ENV{DM_UUID}=="mpath-*", \
> +ENV{DM_STATE}!="SUSPENDED", ENV{DM_UUID}=="mpath*-* | part*-mpath-*", \
>          RUN+="/sbin/kpartx -u -p -part /dev/$name"

Pfff. Please find the correct one attached.


-- 
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System
[catch-partitioned-devices-dmuuid.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#827412; Package multipath-tools. (Fri, 17 Jun 2016 12:45:04 GMT) (full text, mbox, link).


Acknowledgement sent to rrs@debian.org:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>. (Fri, 17 Jun 2016 12:45:04 GMT) (full text, mbox, link).


Message #61 received at 827412@bugs.debian.org (full text, mbox, reply):

From: Ritesh Raj Sarraf <rrs@debian.org>
To: Andrew Patterson <andrew.patterson@hpe.com>, 827412@bugs.debian.org
Subject: Re: Bug#827412: multipath-tools: /dev/mapper device files not removed when partition is removed
Date: Fri, 17 Jun 2016 18:11:09 +0530
[Message part 1 (text/plain, inline)]
On Fri, 2016-06-17 at 17:22 +0530, Ritesh Raj Sarraf wrote:
> On Fri, 2016-06-17 at 17:17 +0530, Ritesh Raj Sarraf wrote:
> > Handle (broken?) DM Device partitions
> > Debian Bug: #827412
> > --- a/kpartx/kpartx.rules
> > +++ b/kpartx/kpartx.rules
> > @@ -37,7 +37,7 @@
> >  # Create dm tables for partitions
> >  ENV{DM_ACTION}=="PATH_FAILED|PATH_REINSTATED", GOTO="kpartx_end"
> >  ENV{DM_NR_VALID_PATHS}=="0", GOTO="kpartx_end"
> > -ENV{DM_STATE}!="SUSPENDED", ENV{DM_UUID}=="mpath-*", \
> > +ENV{DM_STATE}!="SUSPENDED", ENV{DM_UUID}=="mpath*-* | part*-mpath-*", \
> >          RUN+="/sbin/kpartx -u -p -part /dev/$name"
> 
> Pfff. Please find the correct one attached.

And there was 1 more error on my part. Revised patch attached.

-- 
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System
[catch-partitioned-devices-dmuuid.patch (text/x-patch, attachment)]
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#827412; Package multipath-tools. (Mon, 20 Jun 2016 11:09:06 GMT) (full text, mbox, link).


Acknowledgement sent to rrs@debian.org:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>. (Mon, 20 Jun 2016 11:09:06 GMT) (full text, mbox, link).


Message #66 received at 827412@bugs.debian.org (full text, mbox, reply):

From: Ritesh Raj Sarraf <rrs@debian.org>
To: Andrew Patterson <andrew.patterson@hpe.com>, 827412@bugs.debian.org
Subject: Re: Bug#827412: multipath-tools: /dev/mapper device files not removed when partition is removed
Date: Mon, 20 Jun 2016 14:01:13 +0530
[Message part 1 (text/plain, inline)]
Surprisingly, I am not able to reproduce this bug, now, on my virtual setup.
Here, the updation to /dev/mapper/ entries are instant as and when partitions
are deleted, without the patch proposed in this bug report.

So inclusion of this patch will depend on the bug reporter's results. We also
need to determine the cause of the bug because it is not just reproducible with
in a partitioned block device environment.



On Fri, 2016-06-17 at 18:11 +0530, Ritesh Raj Sarraf wrote:
> On Fri, 2016-06-17 at 17:22 +0530, Ritesh Raj Sarraf wrote:
> > On Fri, 2016-06-17 at 17:17 +0530, Ritesh Raj Sarraf wrote:
> > > Handle (broken?) DM Device partitions
> > > Debian Bug: #827412
> > > --- a/kpartx/kpartx.rules
> > > +++ b/kpartx/kpartx.rules
> > > @@ -37,7 +37,7 @@
> > >  # Create dm tables for partitions
> > >  ENV{DM_ACTION}=="PATH_FAILED|PATH_REINSTATED", GOTO="kpartx_end"
> > >  ENV{DM_NR_VALID_PATHS}=="0", GOTO="kpartx_end"
> > > -ENV{DM_STATE}!="SUSPENDED", ENV{DM_UUID}=="mpath-*", \
> > > +ENV{DM_STATE}!="SUSPENDED", ENV{DM_UUID}=="mpath*-* | part*-mpath-*", \
> > >          RUN+="/sbin/kpartx -u -p -part /dev/$name"
> > 
> > Pfff. Please find the correct one attached.
> 
> And there was 1 more error on my part. Revised patch attached.
-- 
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System
[signature.asc (application/pgp-signature, inline)]

Information forwarded to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#827412; Package multipath-tools. (Mon, 20 Jun 2016 17:42:10 GMT) (full text, mbox, link).


Acknowledgement sent to rrs@debian.org:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>. (Mon, 20 Jun 2016 17:42:10 GMT) (full text, mbox, link).


Message #71 received at 827412@bugs.debian.org (full text, mbox, reply):

From: Ritesh Raj Sarraf <rrs@debian.org>
To: Andrew Patterson <andrew.patterson@hpe.com>, 827412@bugs.debian.org
Subject: Re: Bug#827412: multipath-tools: /dev/mapper device files not removed when partition is removed
Date: Mon, 20 Jun 2016 23:09:30 +0530
[Message part 1 (text/plain, inline)]
Control: tag -1 +moreinfo

I was thinking about this bug again, and I think the bug must be elsewhere.

Andrew: Are you able to consistently reproduce this bug on multiple setups ?


The reason I think this bug may not be valid is for 2 reasons:

1) If the bug was valid, it should have been reproducible in my virtual setup.

2) More than 1, the patch being proposed should not be needed. Because even
though a partition has an UUID with string "partN-mpath-*" the parent device is
still owning the UUID with string "mpath-*". When the device is deleted, the
event will be generated for the device itself. Which, should be able to catch
the string regex of the latter I've exampled above. This is what is happening in
my virtual setup.


If 2 is correct, why has the OP seen the issue?
We need confirmation if the issue was seen consistently on multiple setups. If
so, are there other components that may be silently locking the device ?



On Mon, 2016-06-20 at 14:01 +0530, Ritesh Raj Sarraf wrote:
> Surprisingly, I am not able to reproduce this bug, now, on my virtual setup.
> Here, the updation to /dev/mapper/ entries are instant as and when partitions
> are deleted, without the patch proposed in this bug report.
> 
> So inclusion of this patch will depend on the bug reporter's results. We also
> need to determine the cause of the bug because it is not just reproducible
> with
> in a partitioned block device environment.
> 
-- 
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System
[signature.asc (application/pgp-signature, inline)]

Added tag(s) moreinfo. Request was from Ritesh Raj Sarraf <rrs@debian.org> to 827412-submit@bugs.debian.org. (Mon, 20 Jun 2016 17:42:10 GMT) (full text, mbox, link).


Information forwarded to debian-bugs-dist@lists.debian.org, Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>:
Bug#827412; Package multipath-tools. (Mon, 20 Jun 2016 22:03:03 GMT) (full text, mbox, link).


Acknowledgement sent to Andrew Patterson <andrew.patterson@hpe.com>:
Extra info received and forwarded to list. Copy sent to Debian LVM Team <pkg-lvm-maintainers@lists.alioth.debian.org>. (Mon, 20 Jun 2016 22:03:03 GMT) (full text, mbox, link).


Message #78 received at 827412@bugs.debian.org (full text, mbox, reply):

From: Andrew Patterson <andrew.patterson@hpe.com>
To: 827412@bugs.debian.org
Subject: Re: Bug#827412: multipath-tools: /dev/mapper device files not removed when partition is removed
Date: Mon, 20 Jun 2016 15:59:48 -0600
On Mon, 20 Jun 2016 23:09:30 +0530 Ritesh Raj Sarraf <rrs@debian.org> wrote:
> Control: tag -1 +moreinfo
> 
> I was thinking about this bug again, and I think the bug must be elsewhere.
> 
> Andrew: Are you able to consistently reproduce this bug on multiple setups ?
> 
> 
> The reason I think this bug may not be valid is for 2 reasons:
> 
> 1) If the bug was valid, it should have been reproducible in my virtual setup.
> 
> 2) More than 1, the patch being proposed should not be needed. Because even
> though a partition has an UUID with string "partN-mpath-*" the parent device is
> still owning the UUID with string "mpath-*". When the device is deleted, the
> event will be generated for the device itself. Which, should be able to catch
> the string regex of the latter I've exampled above. This is what is happening in
> my virtual setup.
> 
> 
> If 2 is correct, why has the OP seen the issue?
> We need confirmation if the issue was seen consistently on multiple setups. If
> so, are there other components that may be silently locking the device ?
> 
> 
> 
> On Mon, 2016-06-20 at 14:01 +0530, Ritesh Raj Sarraf wrote:
> > Surprisingly, I am not able to reproduce this bug, now, on my virtual setup.
> > Here, the updation to /dev/mapper/ entries are instant as and when partitions
> > are deleted, without the patch proposed in this bug report.
> > 
> > So inclusion of this patch will depend on the bug reporter's results. We also
> > need to determine the cause of the bug because it is not just reproducible
> > with
> > in a partitioned block device environment.
> > 
> -- 

Well. It seems that I can no longer reproduce this issue. Furthermore,
it seems that that the patched rule is not even triggered.  The rule is on
line #47 of /lib/udev/rules.d/60-kpartx. Running udevadm trigger does
not show that line being called.

# ls -l /dev/mapper/mpatha*
lrwxrwxrwx 1 root root 7 Jun 20 15:13 /dev/mapper/mpatha -> ../dm-0
lrwxrwxrwx 1 root root 7 Jun 20 15:13 /dev/mapper/mpatha-part1 -> ../dm-8
# ls -l /dev/disk/by-id/*mpath*
lrwxrwxrwx 1 root root 10 Jun 20 15:13 /dev/disk/by-id/dm-name-mpatha -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jun 20 15:13 /dev/disk/by-id/dm-name-mpatha-part1 -> ../../dm-8
lrwxrwxrwx 1 root root 10 Jun 20 15:13 /dev/disk/by-id/scsi-mpatha -> ../../dm-0
lrwxrwxrwx 1 root root 10 Jun 20 15:13 /dev/disk/by-id/scsi-mpatha-part1 -> ../../dm-8

udevadm test --action remote /sys/block/dm-8
calling: test
version 230
This program is for debugging only, it does not run any program
specified by a RUN key. It may show incorrect results, because
some values may be different, or not available at a simulation run.

=== trie on-disk ===
tool version:          230
file size:         6944075 bytes
header size             80 bytes
strings            1780123 bytes
nodes              5163872 bytes
Load module index
Found container virtualization none
timestamp of '/etc/systemd/network' changed
timestamp of '/lib/systemd/network' changed
Parsed configuration file /lib/systemd/network/99-default.link
Created link configuration context.
timestamp of '/etc/udev/rules.d' changed
timestamp of '/lib/udev/rules.d' changed
Reading rules file: /lib/udev/rules.d/50-firmware.rules
Reading rules file: /lib/udev/rules.d/50-udev-default.rules
Reading rules file: /lib/udev/rules.d/55-dm.rules
Reading rules file: /lib/udev/rules.d/55-scsi-sg3_id.rules
Reading rules file: /lib/udev/rules.d/56-lvm.rules
Reading rules file: /lib/udev/rules.d/58-scsi-sg3_symlink.rules
Reading rules file: /lib/udev/rules.d/60-block.rules
Reading rules file: /lib/udev/rules.d/60-cdrom_id.rules
Reading rules file: /lib/udev/rules.d/60-drm.rules
Reading rules file: /lib/udev/rules.d/60-evdev.rules
Reading rules file: /lib/udev/rules.d/60-gnupg.rules
Reading rules file: /lib/udev/rules.d/60-kpartx.rules
Reading rules file: /lib/udev/rules.d/60-persistent-alsa.rules
Reading rules file: /lib/udev/rules.d/60-persistent-input.rules
Reading rules file: /lib/udev/rules.d/60-persistent-storage-dm.rules
Reading rules file: /lib/udev/rules.d/60-persistent-storage-tape.rules
Reading rules file: /lib/udev/rules.d/60-persistent-storage.rules
Reading rules file: /lib/udev/rules.d/60-persistent-v4l.rules
Reading rules file: /lib/udev/rules.d/60-serial.rules
Reading rules file: /lib/udev/rules.d/64-btrfs.rules
Reading rules file: /lib/udev/rules.d/69-lvm-metad.rules
Reading rules file: /lib/udev/rules.d/70-debian-uaccess.rules
Reading rules file: /lib/udev/rules.d/70-mouse.rules
Reading rules file: /lib/udev/rules.d/70-power-switch.rules
Reading rules file: /lib/udev/rules.d/70-uaccess.rules
Reading rules file: /lib/udev/rules.d/71-seat.rules
Reading rules file: /lib/udev/rules.d/73-seat-late.rules
Reading rules file: /lib/udev/rules.d/73-special-net-names.rules
Reading rules file: /lib/udev/rules.d/73-usb-net-by-mac.rules
Reading rules file: /lib/udev/rules.d/75-net-description.rules
Reading rules file: /lib/udev/rules.d/75-probe_mtd.rules
Reading rules file: /lib/udev/rules.d/78-sound-card.rules
Reading rules file: /lib/udev/rules.d/80-debian-compat.rules
Reading rules file: /lib/udev/rules.d/80-drivers.rules
Reading rules file: /lib/udev/rules.d/80-ifupdown.rules
Reading rules file: /lib/udev/rules.d/80-net-setup-link.rules
Reading rules file: /lib/udev/rules.d/85-hdparm.rules
Reading rules file: /lib/udev/rules.d/85-hwclock.rules
Reading rules file: /lib/udev/rules.d/90-console-setup.rules
Reading rules file: /lib/udev/rules.d/99-systemd.rules
rules contain 49152 bytes tokens (4096 * 12 bytes), 14495 bytes strings
2224 strings (27633 bytes), 1511 de-duplicated (13852 bytes), 714 trie nodes used
IMPORT 'dmsetup_env 254 8' /lib/udev/rules.d/60-kpartx.rules:12
starting 'dmsetup_env 254 8'
'dmsetup_env 254 8'(out) 'DM_UUID=part1-mpath-360002ac00000000000001904000028be'
'dmsetup_env 254 8'(out) 'DM_TABLE_STATE=LIVE'
'dmsetup_env 254 8'(out) 'DM_STATE=ACTIVE'
'dmsetup_env 254 8'(out) 'DM_NAME=mpatha-part1'
Process 'dmsetup_env 254 8' succeeded.
IMPORT 'kpartx_id 254 8 part1-mpath-360002ac00000000000001904000028be' /lib/udev/rules.d/60-kpartx.rules:17
starting 'kpartx_id 254 8 part1-mpath-360002ac00000000000001904000028be'
'kpartx_id 254 8 part1-mpath-360002ac00000000000001904000028be'(out) 'DM_MPATH=mpatha'
'kpartx_id 254 8 part1-mpath-360002ac00000000000001904000028be'(out) 'DM_PART=1'
'kpartx_id 254 8 part1-mpath-360002ac00000000000001904000028be'(out) 'DM_TYPE=scsi'
'kpartx_id 254 8 part1-mpath-360002ac00000000000001904000028be'(out) 'DM_WWN=0xpatha'
Process 'kpartx_id 254 8 part1-mpath-360002ac00000000000001904000028be' succeeded.
LINK 'disk/by-id/scsi-mpatha-part1' /lib/udev/rules.d/60-kpartx.rules:22
LINK 'disk/by-id/wwn-0xpatha-part1' /lib/udev/rules.d/60-kpartx.rules:30
update old name, '/dev/disk/by-id/dm-name-mpatha-part1' no longer belonging to '/devices/virtual/block/dm-8'
no reference left, remove '/dev/disk/by-id/dm-name-mpatha-part1'
update old name, '/dev/disk/by-id/dm-uuid-part1-mpath-360002ac00000000000001904000028be' no longer belonging to '/devices/virtual/block/dm-8'
no reference left, remove '/dev/disk/by-id/dm-uuid-part1-mpath-360002ac00000000000001904000028be'
update old name, '/dev/disk/by-uuid/f3cf40d9-e78e-425b-b88c-807535188ea8' no longer belonging to '/devices/virtual/block/dm-8'
no reference left, remove '/dev/disk/by-uuid/f3cf40d9-e78e-425b-b88c-807535188ea8'
update old name, '/dev/mapper/mpatha-part1' no longer belonging to '/devices/virtual/block/dm-8'
no reference left, remove '/dev/mapper/mpatha-part1'
handling device node '/dev/dm-8', devnum=b254:8, mode=0600, uid=0, gid=0
preserve already existing symlink '/dev/block/254:8' to '../dm-8'
found 'b254:8' claiming '/run/udev/links/\x2fdisk\x2fby-id\x2fscsi-mpatha-part1'
creating link '/dev/disk/by-id/scsi-mpatha-part1' to '/dev/dm-8'
preserve already existing symlink '/dev/disk/by-id/scsi-mpatha-part1' to '../../dm-8'
found 'b254:8' claiming '/run/udev/links/\x2fdisk\x2fby-id\x2fwwn-0xpatha-part1'
creating link '/dev/disk/by-id/wwn-0xpatha-part1' to '/dev/dm-8'
preserve already existing symlink '/dev/disk/by-id/wwn-0xpatha-part1' to '../../dm-8'
created db file '/run/udev/data/b254:8' for '/devices/virtual/block/dm-8'
.ID_FS_TYPE_NEW=
ACTION=remote
DEVLINKS=/dev/disk/by-id/wwn-0xpatha-part1 /dev/disk/by-id/scsi-mpatha-part1
DEVNAME=/dev/dm-8
DEVPATH=/devices/virtual/block/dm-8
DEVTYPE=disk
DM_MPATH=mpatha
DM_NAME=mpatha-part1
DM_PART=1
DM_STATE=ACTIVE
DM_TABLE_STATE=LIVE
DM_TYPE=scsi
DM_UUID=part1-mpath-360002ac00000000000001904000028be
DM_WWN=0xpatha
ID_FS_TYPE=
MAJOR=254
MINOR=8
SUBSYSTEM=block
TAGS=:systemd:
USEC_INITIALIZED=363164888098
Unload module index
Unloaded link configuration context.

-- 
Andrew Patterson
Hewlett-Packard Enterprise



Reply sent to rrs@debian.org:
You have taken responsibility. (Tue, 21 Jun 2016 07:57:07 GMT) (full text, mbox, link).


Notification sent to Andrew Patterson <andrew.patterson@hpe.com>:
Bug acknowledged by developer. (Tue, 21 Jun 2016 07:57:07 GMT) (full text, mbox, link).


Message #83 received at 827412-done@bugs.debian.org (full text, mbox, reply):

From: Ritesh Raj Sarraf <rrs@debian.org>
To: Andrew Patterson <andrew.patterson@hpe.com>, 827412-done@bugs.debian.org
Subject: Re: Bug#827412: multipath-tools: /dev/mapper device files not removed when partition is removed
Date: Tue, 21 Jun 2016 13:23:05 +0530
[Message part 1 (text/plain, inline)]
On Mon, 2016-06-20 at 15:59 -0600, Andrew Patterson wrote:
> Well. It seems that I can no longer reproduce this issue. Furthermore,
> it seems that that the patched rule is not even triggered.  The rule is on
> line #47 of /lib/udev/rules.d/60-kpartx. Running udevadm trigger does
> not show that line being called.
> 
> # ls -l /dev/mapper/mpatha*
> lrwxrwxrwx 1 root root 7 Jun 20 15:13 /dev/mapper/mpatha -> ../dm-0
> lrwxrwxrwx 1 root root 7 Jun 20 15:13 /dev/mapper/mpatha-part1 -> ../dm-8
> # ls -l /dev/disk/by-id/*mpath*
> lrwxrwxrwx 1 root root 10 Jun 20 15:13 /dev/disk/by-id/dm-name-mpatha ->
> ../../dm-0
> lrwxrwxrwx 1 root root 10 Jun 20 15:13 /dev/disk/by-id/dm-name-mpatha-part1 ->
> ../../dm-8
> lrwxrwxrwx 1 root root 10 Jun 20 15:13 /dev/disk/by-id/scsi-mpatha ->
> ../../dm-0
> lrwxrwxrwx 1 root root 10 Jun 20 15:13 /dev/disk/by-id/scsi-mpatha-part1 ->
> ../../dm-8
> 


Thanks for the update. So I'll drop this patch in my git changes, for now. I'm
marking this bug closed. If this issue pops up again, we can re-open this bug
report.


> udevadm test --action remote /sys/block/dm-8

This command is good. Pretty good debug information you shared.

Thanks.

-- 
Ritesh Raj Sarraf | http://people.debian.org/~rrs
Debian - The Universal Operating System
[signature.asc (application/pgp-signature, inline)]

Bug archived. Request was from Debbugs Internal Request <owner@bugs.debian.org> to internal_control@bugs.debian.org. (Wed, 20 Jul 2016 07:26:26 GMT) (full text, mbox, link).


Send a report that this bug log contains spam.


Debian bug tracking system administrator <owner@bugs.debian.org>. Last modified: Sun Aug 20 18:44:07 2023; Machine Name: buxtehude

Debian Bug tracking system

Debbugs is free software and licensed under the terms of the GNU Public License version 2. The current version can be obtained from https://bugs.debian.org/debbugs-source/.

Copyright © 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson, 2005-2017 Don Armstrong, and many other contributors.