* New idea for file-based mounts
@ 2003-07-03 6:56 Grant Miner
0 siblings, 0 replies; only message in thread
From: Grant Miner @ 2003-07-03 6:56 UTC (permalink / raw)
To: linux kernel
Instead of using mount/umount syscalls, have a file that exists
per-directory named, say, ..mount. Then, to mount /dev/sda at /home,
you issue the command
echo "/dev/sda rw" > /home/..mount
(Almost the same syntax as mtab.) The OS takes action (upon modification
of the ..mounts file) and attempts the mount. Reading back the file
would show:
/dev/sda rw
if the mount suceeded, otherwise it would be null if there is an error.
To unmount the file system, remove that line from the ..mounts file.
Now, if you want to do layered mounts, a la plan 9, you could search
from the top line through the last line. Say you had a directory,
/programs. You want to make a union of directories together, so you
make /programs/..mounts look like:
/home/root/bin rw
/bin ro
/sbin ro
/usr/bin ro
Since /home/root/bin rw is read-write, any newly written files in
/programs really go in /home/root/bin. But you see files from each of
the four directories (unless they have duplicate names, then higher in
the list takes precedence) due to the unioning.
Why do this? A few reasons: one could set unix permissions/acl's on the
..mounts file--you could easily let non-root users perform mount
operations on certain directories. Then you don't need mount and
unmount commands as well.
^ permalink raw reply [flat|nested] only message in thread
only message in thread, other threads:[~2003-07-03 6:41 UTC | newest]
Thread overview: (only message) (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2003-07-03 6:56 New idea for file-based mounts Grant Miner
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).