[Bug 1427859] Comment bridged from LTC Bugzilla

2015-03-12 Thread bugproxy
--- Comment From mauri...@br.ibm.com 2015-03-11 12:50 EDT---
FYI..

Some distros change the multipath user_friendly_names wholedisks
to be mpath[a-z]+ rather than mpath[0-9]+.

This seems intentional :) and takes away the disk-partition separator.

[...] the name of a multipath device is of the form mpathn.
For the [...] release, n is an alphabetic character,
so that the name of a multipath device might be // mpatha or mpathb. //
In previous releases, n was an integer.

It's a distro design decision.
It's an interesting conversation, but requires time, since it introduces some 
level of disruption on userspace.

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to multipath-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1427859

Title:
  ISST-SAN:Need a common format for partition listing using
  kpartx,fdisk.distrib and ls -l

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/1427859/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1427859] Comment bridged from LTC Bugzilla

2015-03-12 Thread bugproxy
--- Comment From mauri...@br.ibm.com 2015-03-11 12:50 EDT---
FYI..

Some distros change the multipath user_friendly_names wholedisks
to be mpath[a-z]+ rather than mpath[0-9]+.

This seems intentional :) and takes away the disk-partition separator.

[...] the name of a multipath device is of the form mpathn.
For the [...] release, n is an alphabetic character,
so that the name of a multipath device might be // mpatha or mpathb. //
In previous releases, n was an integer.

It's a distro design decision.
It's an interesting conversation, but requires time, since it introduces some 
level of disruption on userspace.

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

Title:
  ISST-SAN:Need a common format for partition listing using
  kpartx,fdisk.distrib and ls -l

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/1427859/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1427859] Comment bridged from LTC Bugzilla

2015-03-12 Thread bugproxy
--- Comment From helle...@us.ibm.com 2015-03-11 16:16 EDT---
Hi Mauricio,

Thanks for your detailed analysis, but I think we already knew this:
that the separator was an issue, that you have submitted patches to
Ubuntu to resolve it; that we still don't know (per LP 1430074) whether
we'll end up with the 'p' separator or the '-path' separator when it all
shakes out.  And understood, most of the real issues are in udev (and
the installer), which actually affect which device nodes are created and
removed.

That's why the focus of this bug was intended to be just the
inconsistency in the way the tools report.  And I think your comments
above confirm that the default output does *not* match the device nodes
as they actually exist.

Again: this is a cosmetic issue and so not a hot bug.  But I'd like to
keep it open until the separator issues are resolved.  If we end up
with -part, there may be no work required at all.  But if we go with 'p'
as you are proposing... then I'd like to see if Canonical is willing to
fix the tools so they accurately reflect the device nodes as exist, as
they seem to do for devices other than mpath.

If you strongly disagree I'll leave it closed.  Otherwise I'd like to
reopen.  Give me your thoughts, please.  Thanks for all your work here!

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to multipath-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1427859

Title:
  ISST-SAN:Need a common format for partition listing using
  kpartx,fdisk.distrib and ls -l

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/1427859/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1427859] Comment bridged from LTC Bugzilla

2015-03-11 Thread bugproxy
--- Comment From helle...@us.ibm.com 2015-03-11 16:16 EDT---
Hi Mauricio,

Thanks for your detailed analysis, but I think we already knew this:
that the separator was an issue, that you have submitted patches to
Ubuntu to resolve it; that we still don't know (per LP 1430074) whether
we'll end up with the 'p' separator or the '-path' separator when it all
shakes out.  And understood, most of the real issues are in udev (and
the installer), which actually affect which device nodes are created and
removed.

That's why the focus of this bug was intended to be just the
inconsistency in the way the tools report.  And I think your comments
above confirm that the default output does *not* match the device nodes
as they actually exist.

Again: this is a cosmetic issue and so not a hot bug.  But I'd like to
keep it open until the separator issues are resolved.  If we end up
with -part, there may be no work required at all.  But if we go with 'p'
as you are proposing... then I'd like to see if Canonical is willing to
fix the tools so they accurately reflect the device nodes as exist, as
they seem to do for devices other than mpath.

If you strongly disagree I'll leave it closed.  Otherwise I'd like to
reopen.  Give me your thoughts, please.  Thanks for all your work here!

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

Title:
  ISST-SAN:Need a common format for partition listing using
  kpartx,fdisk.distrib and ls -l

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/1427859/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1427859] Comment bridged from LTC Bugzilla

2015-03-11 Thread bugproxy
--- Comment From mauri...@br.ibm.com 2015-03-11 12:13 EDT---
Hi,

Unfortunately this is not a bug (although it really seems so :).
The rationale..

There are 2 distinct/orthogonal things:
1) Listing the partitions in a disk
2) Creation of the block devices for them (i.e., /dev/something)

They happen to diverge with multipath because of the *option* to choose
the disk-partition separator.

This separator is introduced when the wholedisk device name's last
character is a number/digit (i.e., /dev/mpath0), so you can
differentiate 'mpath1 partition 1' from 'mpath 11 wholedisk' (that,
without a separator, are 'mpath11').

It is relatively unknown because the popular wholedisk device names are
sd[a-z] / vd[a-z] / LVM volume that ends in [a-z]).

Back to the 2 things, when a tool reads a disk's partition table, and then 
prints it, the *tool* chooses the format.
Notice that /listing/ has *nothing* to do with the actual block devices 
(/dev/something) of the disk, and must not, because the partitions may not 
exist (e.g., you're partitioning the disk for the first time, and listing the 
partitions you created).

In summary, there's no rule saying print it as it exists/or would exist in 
/dev.
With sd[a-z] et al, there's usually no mismatch, because there's no separator.

Notice kpartx has the -p option:
-p set device name-partition number delimiter

kpartx is one of the tools that gives you that option (which is great, but 
actually leads to the problems noticed)
Most other tools just hard-code 'p' and that's all.
And, on kparx, the /default/  is 'p'., but you can choose.

So, if you list multipath partitions w/ kpartx,  choose the separator:

# kpartx -l -p SEPARATOR /dev/mapper/mpath0
mpath0SEPARATOR1 : 0 14336 /dev/mapper/mpath0 2048
mpath0SEPARATOR2 : 0 64239616 /dev/mapper/mpath0 16384
mpath0SEPARATOR3 : 0 2850816 /dev/mapper/mpath0 64256000

Then, we get to thing #2, the creation of the block devices.

On multipath, again, this is different from other/non-multipath block
devices, because there must be some more talk with the kernel (to create
the device mappings, I guess, and assign them to a given block device,
/dev/something).

This is done with kpartx. See its manpage:

This  tool,  derived  from util-linux' partx, reads partition tables on
specified device  and  create  device  maps  over  partitions  segments
detected.  It  is  called  from  hotplug  upon device maps creation and
deletion.

So, it reads the partition table (which just says 'partition 1, 2, 3'; no 
separator informed, of course),
and then (different thing) creates block devices in /dev.

This also uses the '-p' option to choose a separator.
If you look at the udev rules, which create the block devices when a multipath 
disk is detected (i.e., run 'multipath'):

$ grep -H -- -part /lib/udev/rules.d/*kpartx*
/lib/udev/rules.d/95-kpartx.rules:
SYMLINK+=disk/by-id/$env{DM_TYPE}-$env{DM_NAME}-part$env{DM_PART}
/lib/udev/rules.d/95-kpartx.rules:RUN+=/sbin/dmsetup ls --target 
multipath --exec '/sbin/kpartx -a -p -part' -j %M -m %m
/lib/udev/rules.d/95-kpartx.rules:RUN+=/sbin/kpartx -a -p -part 
/dev/$kernel

Which just says:  use '-part' when creating the block devices for
multipath partitions on /dev/mapper.

Finishing..

The bug title is Need a common format for partition listing using
kpartx,fdisk.distrib and ls -l 

That's mistaken, because ls -l is not listing partitions, it is listing 
block devices in /dev/mapper/.
Sorry, but that's it. :)

It just happens to be consistent w/ partitioning tools for non-multipath
partitions for a coincidence / no need for disk-partitoin separator.
That's all.

And, BTW, *if* you want to *list* existing multipath partitions  in a way 
that's coherent w/ what's in /dev/mapper,
you have to find what's the separator adopted for udev (in this case, -part), 
and use it in kpartx -l -p -part.

$ sudo kpartx -l -p -part /dev/mapper/mpath0
mpath0-part1 : 0 14336 /dev/mapper/mpath0 2048
mpath0-part2 : 0 64239616 /dev/mapper/mpath0 16384
mpath0-part3 : 0 2850816 /dev/mapper/mpath0 64256000

But remember, those are different things :)

If some tooling broke because of that, it's not generic enough; and must be 
fixed.
(for reference, libparted has to check whether a partition/device is on 
device-mapper for listing its name.)

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

Title:
  ISST-SAN:Need a common format for partition listing using
  kpartx,fdisk.distrib and ls -l

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/1427859/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs


[Bug 1427859] Comment bridged from LTC Bugzilla

2015-03-11 Thread bugproxy
--- Comment From mauri...@br.ibm.com 2015-03-11 12:13 EDT---
Hi,

Unfortunately this is not a bug (although it really seems so :).
The rationale..

There are 2 distinct/orthogonal things:
1) Listing the partitions in a disk
2) Creation of the block devices for them (i.e., /dev/something)

They happen to diverge with multipath because of the *option* to choose
the disk-partition separator.

This separator is introduced when the wholedisk device name's last
character is a number/digit (i.e., /dev/mpath0), so you can
differentiate 'mpath1 partition 1' from 'mpath 11 wholedisk' (that,
without a separator, are 'mpath11').

It is relatively unknown because the popular wholedisk device names are
sd[a-z] / vd[a-z] / LVM volume that ends in [a-z]).

Back to the 2 things, when a tool reads a disk's partition table, and then 
prints it, the *tool* chooses the format.
Notice that /listing/ has *nothing* to do with the actual block devices 
(/dev/something) of the disk, and must not, because the partitions may not 
exist (e.g., you're partitioning the disk for the first time, and listing the 
partitions you created).

In summary, there's no rule saying print it as it exists/or would exist in 
/dev.
With sd[a-z] et al, there's usually no mismatch, because there's no separator.

Notice kpartx has the -p option:
-p set device name-partition number delimiter

kpartx is one of the tools that gives you that option (which is great, but 
actually leads to the problems noticed)
Most other tools just hard-code 'p' and that's all.
And, on kparx, the /default/  is 'p'., but you can choose.

So, if you list multipath partitions w/ kpartx,  choose the separator:

# kpartx -l -p SEPARATOR /dev/mapper/mpath0
mpath0SEPARATOR1 : 0 14336 /dev/mapper/mpath0 2048
mpath0SEPARATOR2 : 0 64239616 /dev/mapper/mpath0 16384
mpath0SEPARATOR3 : 0 2850816 /dev/mapper/mpath0 64256000

Then, we get to thing #2, the creation of the block devices.

On multipath, again, this is different from other/non-multipath block
devices, because there must be some more talk with the kernel (to create
the device mappings, I guess, and assign them to a given block device,
/dev/something).

This is done with kpartx. See its manpage:

This  tool,  derived  from util-linux' partx, reads partition tables on
specified device  and  create  device  maps  over  partitions  segments
detected.  It  is  called  from  hotplug  upon device maps creation and
deletion.

So, it reads the partition table (which just says 'partition 1, 2, 3'; no 
separator informed, of course),
and then (different thing) creates block devices in /dev.

This also uses the '-p' option to choose a separator.
If you look at the udev rules, which create the block devices when a multipath 
disk is detected (i.e., run 'multipath'):

$ grep -H -- -part /lib/udev/rules.d/*kpartx*
/lib/udev/rules.d/95-kpartx.rules:
SYMLINK+=disk/by-id/$env{DM_TYPE}-$env{DM_NAME}-part$env{DM_PART}
/lib/udev/rules.d/95-kpartx.rules:RUN+=/sbin/dmsetup ls --target 
multipath --exec '/sbin/kpartx -a -p -part' -j %M -m %m
/lib/udev/rules.d/95-kpartx.rules:RUN+=/sbin/kpartx -a -p -part 
/dev/$kernel

Which just says:  use '-part' when creating the block devices for
multipath partitions on /dev/mapper.

Finishing..

The bug title is Need a common format for partition listing using
kpartx,fdisk.distrib and ls -l 

That's mistaken, because ls -l is not listing partitions, it is listing 
block devices in /dev/mapper/.
Sorry, but that's it. :)

It just happens to be consistent w/ partitioning tools for non-multipath
partitions for a coincidence / no need for disk-partitoin separator.
That's all.

And, BTW, *if* you want to *list* existing multipath partitions  in a way 
that's coherent w/ what's in /dev/mapper,
you have to find what's the separator adopted for udev (in this case, -part), 
and use it in kpartx -l -p -part.

$ sudo kpartx -l -p -part /dev/mapper/mpath0
mpath0-part1 : 0 14336 /dev/mapper/mpath0 2048
mpath0-part2 : 0 64239616 /dev/mapper/mpath0 16384
mpath0-part3 : 0 2850816 /dev/mapper/mpath0 64256000

But remember, those are different things :)

If some tooling broke because of that, it's not generic enough; and must be 
fixed.
(for reference, libparted has to check whether a partition/device is on 
device-mapper for listing its name.)

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to multipath-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1427859

Title:
  ISST-SAN:Need a common format for partition listing using
  kpartx,fdisk.distrib and ls -l

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/1427859/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1427859] Comment bridged from LTC Bugzilla

2015-03-06 Thread bugproxy
--- Comment From helle...@us.ibm.com 2015-03-06 16:18 EDT---
*** Bug 122377 has been marked as a duplicate of this bug. ***

-- 
You received this bug notification because you are a member of Ubuntu
Server Team, which is subscribed to multipath-tools in Ubuntu.
https://bugs.launchpad.net/bugs/1427859

Title:
  ISST-SAN:Need a common format for partition listing using
  kpartx,fdisk.distrib and ls -l

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/1427859/+subscriptions

-- 
Ubuntu-server-bugs mailing list
Ubuntu-server-bugs@lists.ubuntu.com
Modify settings or unsubscribe at: 
https://lists.ubuntu.com/mailman/listinfo/ubuntu-server-bugs


[Bug 1427859] Comment bridged from LTC Bugzilla

2015-03-06 Thread bugproxy
--- Comment From helle...@us.ibm.com 2015-03-06 16:18 EDT---
*** Bug 122377 has been marked as a duplicate of this bug. ***

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

Title:
  ISST-SAN:Need a common format for partition listing using
  kpartx,fdisk.distrib and ls -l

To manage notifications about this bug go to:
https://bugs.launchpad.net/ubuntu/+source/multipath-tools/+bug/1427859/+subscriptions

-- 
ubuntu-bugs mailing list
ubuntu-bugs@lists.ubuntu.com
https://lists.ubuntu.com/mailman/listinfo/ubuntu-bugs