Subject: bug#15348: [PATCH 11/19] libparted: don't canonicalize /dev/md/ paths (#872361)

From: Phillip Susi <[email-masked]>
Date: Mon, 30 Sep 2013 15:29:53 -0400

Now that I look more closely at the named md situation, it seems it
doesn't quite face the same issue as dm.  With dm, you must not
canonicalize the name when generating the partition device name, since
there is no /dev/dm-0p1 ( so we would fail to open the partition dev
node ).  With md, there is a /dev/md0p1, in addition to the
/dev/md/foo1 symlink pointing to it, so either way should work.

I guess now the purpose of this patch is purely for the user
experience?  If a user runs parted on /dev/md/foo then they expect
parted to state that is what it is working on instead of /dev/md0?  Is
the reverse true, or should parted always favor the name even if run
on the number?  What if it is invoked on /dev/disk/by-id?

On 9/29/2013 10:21 PM, Phillip Susi wrote:
> I just posted a patch refactoring the existing dm fix in the way
> that I described.  I'm not sure what ioctls are needed to retrieve
> the correct name for md devices, so I haven't tried to do that part
> yet. If you know how to do that, you should be able to see the
> direction I went with the dm devices and follow suit with md.