NetBSD-Users archive
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]
nullfs: contents under mount point not visible via null mount
Hi,
Say, if I have the following:
- a path a/b/c/d
- a/b/c/d is a mount point for some filesystem
- an alternate path alt-hier/c, which is a null mount for a/b/c
Then, listing alt-hier/c/d won't show the content of the filesystem
mounted on a/b/c/d. This is surprising, since I thought that I'd see the
content of a/b/c/d. Is this a bug, or my misunderstanding of how the
nullfs is supposed to work? I also tried this on FreeBSD 7.1 and got the
same behavior; hmmpfh.
Anyone?
Thanks,
Toby
PS:
The following shows what I meant in a pseudo trace/sh
# mkdir testdir
# cd testdir
# mkdir -p a/b/c/d
# # Now create some test fs.
# dd if=/dev/zero of=d-data.img bs=1m count=4
# # Find a free vnd device
# vnconfig -l
vnd0: not in use
vnd1: not in use
vnd2: not in use
vnd3: not in use
# vnconfig vnd0 d-data.img
# newfs /dev/rvnd0a
# mount /dev/vnd0a a/b/c/d
# (cd a/b/c/d && touch d1 d2 d3)
# ls a/b/c/d
d1 d2 d3
# # Now create the null mount point
# mkdir -p alt-hier/c
# mount -t null $(pwd)/a/b/c alt-hier/c
# ls alt-hier/c/d
#
# # What? I'm expecting same result as 'ls a/b/c/d'
#
# # Alright, let's cleanup
# umount alt-hier/c
# umount a/b/c/d
# vnconfig -u vnd0
# cd ..
# # rm -rf testdir
Home |
Main Index |
Thread Index |
Old Index