I have nfs share mounted to RedHat server.

server:/NFS/Test on /test/test/nfs type nfs (ro,n......

Now I want bind mount each folder inside this share to other place.

sudo mount --bind /test/test/nfs/dir1 /test/test/dir1/dir1

And receiving this error:

mount: block device /test/test/nfs/dir1 is write-protected, mounting read-only
mount: cannot mount block device /test/test/nfs/dir1 read-only

I want to mount as read-only not rw. But, it is not mounting, all permissions are okay. Do you have any suggestions? Or are there any requirements for mount --bind? Thanks

  • No explanation, but I would simply directly mount server:/NFS/Test/dir1 /test/test/dir1/dir1 rather than using a bind mount – HBruijn Jun 26 '19 at 10:55
  • I have already mounted this share to local directory with the command you provided, Now I am going to mount subfolders to another directory for another purposes. with bind option – nu110rz3r0 Jun 26 '19 at 11:11

Not sure what you are trying to do is possible, from the manpage:

The bind mount call attaches only (part of) a single filesystem, not possible submounts. The entire file hierarchy including submounts is attached a second place by using:

mount --rbind olddir newdir
  • Thanks for reply. I have tried this one as well and the result is the same. I am mounting already mounted nfs share to local directory with bind option. – nu110rz3r0 Jun 26 '19 at 11:04

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.