[REVIEW v4] Storage mounting API
Karel Zak
kzak at redhat.com
Tue Mar 26 13:03:19 UTC 2013
On Mon, Mar 25, 2013 at 10:20:38AM +0100, Jan Safranek wrote:
> > [ Key, Description (
> > "Filesystem specification. Corresponds to the device field in "
> > "/etc/fstab." ) ]
> > string FileSystemSpec;
>
> I would write that the MountedFileSystem can represent both /etc/mtab
> and /etc/fstab entry, depending on its associated Settings.
Note, maybe one day you will find that mtab format does not provide enough
information and you will want to use /proc/self/mountinfo :-)
The ideal solution is to use libmount abstraction to transparently
work with old systems where is /etc/mtab as well with new systems
where we prefer /proc/self/mountinfo.
On systems without mtab the libmount library also maintains some
information in userspace (for filesystems like NFS) in *private*
libmount file /run/mount/utab. All this is accessible by findmnt(8)
(see --kernel and --mtab).
Anyway, for now it's probably good enough to follow mtab to keep it
simple and stupid :-)
Karel
--
Karel Zak <kzak at redhat.com>
http://karelzak.blogspot.com
More information about the openlmi-devel
mailing list