Current-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: mount_union info (was mount_overlay info)



Well, this gets me really close to what I actually want to do   ;-)

What I'm actually attempting to do is the reverse of what _union does. 
I want to mount a directory <under> another.

In other words, I want to have a directory tree where files come from
another directory if they are not found in the directory I'm in (not
sure I explained that correctly, but playing with the command seems to
allow what I'm looking for, just in the wrong order).

David

>>> Jukka Salmi <j+nbsd%2008.salmi.ch@localhost> 11/12/2008 2:31 PM >>>
David Dudley --> current-users (2008-11-12 14:03:45 -0600):
> Yes, looking through general info, I found that command.
> 
> Can mount_union mount a directory above a device?  I mean mount a
> read-write mount point above a read-only CD?

Yes:

$ mount /mnt/cdrom
$ mount
[...]
/dev/cd0a on /mnt/cdrom type cd9660 (read-only, local)
$ echo test >/mnt/cdrom/file
ksh: cannot create /mnt/cdrom/file: Read-only file system
$ mkdir /var/tmp/test
$ mount_union /var/tmp/test /mnt/cdrom
$ mount
[...]
/dev/cd0a on /mnt/cdrom type cd9660 (read-only, local)
<above>:/var/tmp/test on /mnt/cdrom type union (local)
$ cat /mnt/cdrom/test
cat: /mnt/cdrom/test: No such file or directory
$ echo test >/mnt/cdrom/file
$ cat /mnt/cdrom/file
test


Regards, Jukka

-- 
bashian roulette:
$ ((RANDOM%6)) || rm -rf ~
BEGIN:VCARD
VERSION:2.1
X-GWTYPE:USER
FN:David Dudley
TEL;WORK:826-1265
ORG:;MIS
TEL;PREF;FAX:880-3741
EMAIL;WORK;PREF;NGW:DavidDu%cctexas.com@localhost
N:Dudley;David
TITLE:Functional Analyst
END:VCARD



Home | Main Index | Thread Index | Old Index