Subject: Re: problem with MFS and init
To: Jachym Holecek <freza@liberouter.org>
From: Steven M. Bellovin <smb@cs.columbia.edu>
List: tech-embed
Date: 11/03/2005 14:50:28
In message <20051103191902.GB547@hanele.ics.muni.cz>, Jachym Holecek writes:
>> Cool. We could further have /dev union mounted to avoid
>> the mmap() dance + saving a few bytes of code. I'll test it
>> this night.
>
>Patch below (modified version of Dave's one).
>
>> [Steven M. Bellovin]
>> Last time I tried it, I couldn't union-mount a tmpfs over anything. It
>> would be nice if that worked.
>
>Some naive tests seem to work for me (tmpfs union-over ffs2). Do you
>see the problem in fresh -current as well?
>
Here's an example of a failure that doesn't occur with mfs:
# mount -t tmpfs /dev/wd0b /mnt
# mount
/dev/wd0a on / type ffs (local)
tmpfs on /tmp type tmpfs (local)
kernfs on /kern type kernfs (local)
procfs on /proc type procfs (local)
tmpfs on /mnt type tmpfs (local)
# mount -t union /mnt /usr/src
mount_union: /mnt on /usr/src: Operation not supported
# mount -t union /usr/src /mnt
# mount
/dev/wd0a on / type ffs (local)
tmpfs on /tmp type tmpfs (local)
kernfs on /kern type kernfs (local)
procfs on /proc type procfs (local)
tmpfs on /mnt type tmpfs (local)
<above>:/usr/src on /mnt type union (local)
# umount /usr/src
umount: /usr/src: not currently mounted
# umount /mnt
# umount /mnt
# mount -t mfs /dev/wd0b /mnt
# mount
/dev/wd0a on / type ffs (local)
tmpfs on /tmp type tmpfs (local)
kernfs on /kern type kernfs (local)
procfs on /proc type procfs (local)
mfs:1661 on /mnt type mfs (synchronous, local)
# mount -t union /mnt /usr/src
# umount /usr/src
# mount -t union /usr/src /mnt
# umount /mnt
# umount /mnt
--Steven M. Bellovin, http://www.cs.columbia.edu/~smb