That wasn't very well explained, what I mean is this:
# cd /
# mkdir foo
# mount -o union /dev/hda2 /foo
# echo foobar > foo/bar
# umount /dev/hda2
# cat foo/bar
That's what I would consider to be the most useful way to implement
union mounts - the contents of /dev/hda2 would be accessible,
read-only, at /foo/bar, with files that already exist in /foo/bar
replacing files that would otherwise be visible from /dev/hda2.
Writes would go to the directory foo, which is just an ordinary
subdirectory of the root filesystem.
This is completely different to the mount_union behavior in BSD, where
writes go to the most recently added union mount.
However, it might be best to implement things the BSD way for
compatibility reasons, but I'm not sure how widespread the use of
mount_union is. It's probably not widely used.
To unsubscribe from this list: send the line "unsubscribe linux-kernel" in
the body of a message to firstname.lastname@example.org
More majordomo info at http://vger.kernel.org/majordomo-info.html
Please read the FAQ at http://www.tux.org/lkml/