[lug] /etc/fstab in the modern world
David Anselmi
anselmi at anselmi.us
Sun Oct 24 12:40:38 MDT 2004
P. Scott DeVos wrote:
[...]
> My problem comes in a system with a variety of hot-swappable devices
> which I may not know at any given time to what device they are assigned.
> I'de like to be able to say, 'which of these many devices holds a
> partition with a file system labelled x?'
So you replace my /dev/hda* with your list of many devices, don't you?
> Obviously mount knows how to find this information, so it probably
> isn't difficult. In fact, I use mount to find the information now,
> but I would really like to do it without mounting and would also like
> to be able to see when two file systems have the same label.
Does mount do something smarter than iterate through devices? What does
mount do if there are duplicate labels? Hmmm, looks like mount might
use /proc/partitions--does that help you any? I can't tell, I don't
have a bunch of hotswap stuff.
Perhaps devfs helps you figure out your list of devices by eliminating
unused devices. Perhaps udev solves the labeling problem more elegantly
(or more usefully) than e2label. There still may be limits--you can't
get info about a device if the driver isn't loaded, or if the device
isn't connected/turned on/whatever. But maybe udev helps with those as
well.
HTH,
Dave
More information about the LUG
mailing list