nullfs
From NetBSD Wiki
The null filesystem is actually not a real filesystem type, but it allows you to mount one subtree of the filesystem onto another subtree of the filesystem. For example:
# ls test # touch foo # ls test foo # mount_null /usr test # ls test X11R6/ bin/ games/ include/ lib/ libdata/ libexec/ lkm/ local/ mdec/ obj/ pkg/ pkgsrc/ sbin/ share/ src/ xsrc/ # umount test # ls test # foo #
The unionfs filesystem is very much like nullfs, except that it will list 'foo' as well when you have mounted "/usr" over "test".
Use cases
Nullfs is very useful in the case of a chroot situation where you would need to have directories like /bin or /usr/bin copied from your base system, you can use a null mount instead, with the -o ro option to make it read-only. This saves you the hassle from copying all these files by hand and keeping them up-to-date together with the base system.
It is also useful in situations where you made a mistake in assigning partitions and have one partition with lots of room to spare and one which is (almost) full and you don't want to repartition. In that case you can mount a directory which belongs in the tree which has partition A mounted with nullfs so it actually will store files written there to partition B.
Basically, anything that requires you to rearrange the way directories are assigned within the filesystem or where you want to have different mount options (noexec, nodev, nosuid, readonly) in some directory can be done neatly with nullfs.
