[linux-lvm] Inconsistent naming needs to be fixed (was Re: Inconsistent naming...?)
Linda A. Walsh
lvm at tlinx.org
Mon Jul 18 02:38:33 UTC 2011
Linda A. Walsh wrote:
> Alasdair G Kergon wrote:
>> On Sun, Jul 10, 2011 at 06:31:27PM -0700, Linda A. Walsh wrote:
>>> Notice the device name. notice how the single dashes are now
>>> displayed as two dashes?!?!
>> Roughly: a dash is the separator we chose, and we double it to escape a
>> real dash. But we still need to extend our escaping mechanism to handle
>> characters that udev states it doesn't support in primary device names
>> but which the old /dev did used to support (and so we still do).
> Roughly, if I give a script the mount point of a logical device, how
> can I find out the name of the LV it is on?
Ok, I think I bass-ackwards way of hacking around this -- but my
solution is unique to my usage and conventions.
In my 'application' (meaning 'usage'), I start with a mount-point
of a volume I want to take a snapshot of. I want to map that mount
point back to the original dev. It's not straightforward when the
device in /proc/mounts, isn't the real device NOR is it the name I
used! I.e. real dev = /dev/dm-[0-x], name i used /dev/VG/LV.
What /proc/mounts shows: /mapper/dev/<mangled VG>-<mangled LV>.
So who's responsible for that mess of code so we can get /proc to
either, show the value I used (when I mount by LABEL I see the 'real'
devices in mounts -- not /dev/disk-by-label/<label>. It isn't consistent
but it's worse, as it choose a name that's gone through some
Am I being more clear about why this create problems (besides
being confusing and just looking bad (because my computer has
to come up with it's own name for a dev -- neither the one
I used nor the real name?
Now, I can kludge around this, by knowing some different pieces
of information unique to my app/situation, but in the general case,
it would be unpredictable, and that's bad, as I'd like to release these
scripts if I can get them working to my satisfaction.
Can the situation with /proc/mounts be fixed?
More information about the linux-lvm