@pitti,

I believe the following clarifies things, but it'd be better to get an
opinion from someone who knows better of multipath than I do.

>>

Hi Lekshmi,

Unfortunately, this is the way it works with multipath devices. Not a bug.
The changes to the partition table are not automatically reflected in 
/dev/mapper.

You must request/inform the OS/kernel of such changes.

You can do this in 2 ways:
1) kpartx
2) partprobe

For 1) kpartx,
$ sudo kpartx -d -p -part /dev/mapper/mpathX
$ sudo kpartx -a -p -part /dev/mapper/mpathX

See the kpartx manpage for more details [1] (man kpartx).

For 2) partprobe

David is correct on the assumption about mpathXpY and mpathX-partY.
partprobe is based on parted, which hardcodes the 'p' partition separator for 
device-mapper based devices (e.g., multipath).
So, it will try with the sys/function calls with 'p' disk-partition separator, 
but won't find any device, because the '-part' one is used.

I'll check whether the partprobe code may get a patch easily, but if I'm not 
mistaken, it will boil down to their very general functions of device-mapper on 
linux, which hard-codes p.
(so it's not just 'try p and -part').  Hopefully I may be wrong; will check..

In short, please use kpartx. It's how it's done.
If you can make that work in any other distro, I'd be glad to know and check 
what's done.

Best regards

[1] http://manpages.ubuntu.com/manpages/trusty/man8/kpartx.8.html

-- 
You received this bug notification because you are a member of Ubuntu
Bugs, which is subscribed to Ubuntu.
https://bugs.launchpad.net/bugs/1427333

Title:
  ISST_SAN:ls -l /dev/mapper/mpath output showing the deleted partitions
  even after the removal of partitions

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/devmapper/+bug/1427333/+subscriptions

-- 
ubuntu-bugs mailing list
[email protected]
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs

Reply via email to