Q: (RFE?) How do you specify the 'no-canonicalize' option in fstab?
While it works interactively, that leaves out using it when most of the file systems are loaded -- how can one specify -no-canonicalize in /etc/fstab?
Thx!
Linda
Karel Zak
maintainerQuoted 2 lines · Linda A. Walsh
While it works interactively, that leaves out using it when most of the file systems are loaded -- how can one specify -no-canonicalize in
/etc/fstab?
Why do you want something like this?
The option --no-canonicalize has very special purpose (e.g. when mount.<type> helper calls mount(8)).
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Quoted 8 lines · Karel Zak
Quoted 3 lines · Linda A. Walsh
While it works interactively, that leaves out using it when most of the file systems are loaded -- how can one specify -no-canonicalize in
/etc/fstab?Why do you want something like this?
----
Why wouldn't I?
Quoted 4 lines
The option --no-canonicalize has very special purpose (e.g. when mount.<type> helper calls mount(8)).
The default canonicalization has a very special purpose to the kernel/dm, but it is not necessarily what a user wants to see when they type 'mount'.
Is there a reason NOT to give the option to user to display it as they wish, or is there some reason to force the user into using the kernel/lvm internal format?
Karel Zak
maintainerQuoted 8 lines · Linda A. Walsh
Quoted 5 lines · Karel Zak
Quoted 2 lines · Linda A. Walsh
While it works interactively, that leaves out using it when most of the file systems are loaded -- how can one specify -no-canonicalize in
/etc/fstab?Why do you want something like this?
----
Why wouldn't I?
Well, I'm trying to help you, so it would be nice to have more information about your use-case...
Quoted 5 lines
Quoted 2 lines
The option --no-canonicalize has very special purpose (e.g. when mount.<type> helper calls mount(8)).
The default canonicalization has a very special purpose to the kernel/dm, but it
is not necessarily what a user wants to see when they type 'mount'.
Do you mean that you want to see kernel device names for DM when you list all mountpoint by 'mount'?
Quoted 3 lines
Is there a reason NOT to give the option to user to display it as they wish, or is there some reason to force the user into using the kernel/lvm internal format?
/dev/dm-0 is internal format that is unexpected for users, DM guys don't want to see these names in the df, mount, .. outputs.
Anyway, the goal is to keep device names and mounpoints paths for mount(2) syscall in some well know (canonical) format, to make it fast to search in mount tables, etc.
You can use "lsblk -o+KNAME" if you want to see the kernel device names.
Maybe we can add KNAME also to findmnt(8) to make the name accessible from list of the mounted filesystem, but don't expect any change in mount(8). It's bad idea to change the way how we use devices for mounting just for reason that you want to see something else in 'mount' output. It's better to improve things like findmnt(8).
Karel
Signature · 2 lines
Karel Zak <[email protected]> http://karelzak.blogspot.com
Quoted 2 lines · Karel Zak
Do you mean that you want to see kernel device names for DM when you list all mountpoint by 'mount'?
---
That would be worse (I think).
Quoted 1 line
/dev/dm-0is internal format that is unexpected for users, DM guys
----
The time it takes for a computer to translate between formats is
negligible compared to the time it takes for users to find ways to work around the name mangling.
What I'd like seems completely straight forward. Use the names the user
used in their /etc/fstab or their mount line. Don't convert it. MS has been doing this on Windows at least since Vista -- in regards to 'case' -- they preserve the case the user uses, but ignore it for looking up file names.
Here, if the user uses the suggested lvm names of /dev/VG/LV, then
I would want to see those names when I type "mount".
Example from "bash" and path following in presence of symlinks.
If I am in /home/user and cd to "work", where "work" is a symlink pointing to /Data/Work, if I type "cd .." in work, I want to be back in the directory I started from not "/Data".
Honoring user-symbolic names has become the "default" case, because it's user friendly -- it's what users expect to see. I hold that doing the same thing in lvm volume names as in filesystem paths including symlinks, would be consistency -- using the "user's input" to generate and follow state.
Forcing users into some arbitrary nomenclature which changes over the years as new features are implemented, isn't especially user friendly.
So I want to be able to use "no-canonicalize" to KEEP the names I use -- the *preferred* names, I am told, for the product (lvm).
Ask yourself this question, if you use bash, do you turn on physical path resolution (set -P in your .bashrc?) (the default is to emulate a symlinked-structure). If you don't use -P there, why would you want to force a physical name on your logical volumes?
Quoted 4 lines · Karel Zak
Quoted 2 lines
Quoted 2 lines
Quoted 1 line
no-canonicalize in
/etc/fstab?Why do you want something like this?
Well, I'm trying to help you, so it would be nice to have more information about your use-case...
---
Was my description still unclear? when I use a "symbolic link"
to a file or to a device, when I look at where I am, I want to see what I typed in as part of the path.
If I'm in my home dir, I can cd into
bin/audio to work on scripts. If I want to test with large files, they are in /Audio, where the scripts dir is under /Audio/scripts.
If I am making a short change and not testing, I usually work by cd'ing into the local path ~/bin/audio -- I wouldn't be real happy if it dumped me in /Audio/scripts each time, even though that would be a canonical name.
Same with Devnames -- If I use the standard /dev/VG/LV in constructing a name, being passed a mutated form forces an automated script to go belly up -- looking for the VG after /dev/, and looking for LV's under the VG.
So in my usecase, I'd like to mount the volumes using /etc/fstab and still be able to use the no-canonicalize option.
?? Reasonable to be able to specify the switch via fstab and provide consistency with the command line option?