On Sat, Nov 30, 2024 at 4:26 PM Steve Litt <[email protected]>
wrote:
> Does OpenBSD have the equivalent of Linux Bind Mounts?
>
You can use NFS to do something like this. For example, if you have in
fstab(5):
{duid}.a /nfs/archive ffs rw,noatime,nodev,nosuid 1 3
localhost:/nfs/archive/dist/OpenBSD /var/www/ftp/pub/OpenBSD nfs
ro,nodev,nosuid 0 0
And you have in exports(5):
/nfs/archive/dist/OpenBSD -maproot=root -ro 127.0.0.1
Then you could have this arrangement showing via df(1)
/dev/sd2a 28.9T 11.3T 16.1T 41%
/nfs/archive
localhost:/nfs/archive/dist/OpenBSD 28.9T 11.3T 16.1T 41%
/var/www/ftp/pub/OpenBSD
In this example I have the second mount read-only, but this is not required.
-ken