I have mounted nfs volume in my /etc/fstab
as
nfshost.com:/path/dir /mount/point nfs rw,sync,hard,intr 0 0
I'd like to mount another nfs volume
nfshost.com:/completely/different/path /mount/point/subdirectory nfs rw,sync,hard,intr 0 0
However, it doesn't seem to work, I get the error message
mount.nfs: mount point /mount/point/subdirectory does not exist
I also can't mount it manually with sudo mount nfshost.com:/completely/different/path /mount/point/subdirectory
. Mounting it anywhere else, e.g. sudo mount nfshost.com:/completely/different/path /tmp/test
works.
I suspect that the problems are that I neither have write access to the originally mounted /path/dir
, nor does it have the subdirectory to which I'd mount the other volume. Creating the directory structure /mount/point/subdirectory
locally, mounting first into subdirectory
then into mount/point
works, but then mount/point
contains the mounted volume and I can't access subdirectory
.
ls /mount/point/subdirectory
ls: cannot access '/mount/point/subdirectory': No such file or directory
Is there a way to mount these volumes to achieve this directory structure?
sudo mount -o bind nfshost.com:/completely/different/path /mount/point/subdirectory
mount: mount point /mount/point/subdirectory does not exist
mkdir /mount/point/subdirectory