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

From: Phillip Susi <[email-masked]>
Date: Wed, 02 Oct 2013 15:13:26 -0400

On 10/2/2013 2:45 PM, Brian C. Lane wrote:
> I think parted should always stick with the name the user gives it.
> I'm not sure what side-effects that would have so that's why I only
> changed it for /dev/md/

I kind of like the fact that it tells you what the "real" device is
when you run it on a symlink.

> I don't think looking up specific majors is useful here, the
> actual problem is that when something uses libparted (eg. anaconda)
> to open a device and then later tries to look it up by that same
> path it won't find it if the symlink is followed and the name
> changed.

I don't follow.

> Personally, I can't think of a situation where I'd ever want the
> name I give it to be changed, whether I'm using the cli or
> libparted. Maybe we should drop that whole bit and just use the
> path we're given?

Just because you have a symlink to a disk doesn't mean the partitions
will follow suit.  For instance, if you look at /dev/disk/by-id/foo,
you don't have /dev/disk/by-id/foo1.  That means that we at least
internally have to canonicalize the name to open the correct partition
node.  Would calling tools then be confused and try to look for the
partition in /dev/disk/by-id?