Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using mount --bind to attach a certain directory under another path (it is part of a system that holds multiple copies of mirrors where some copies are slightly different then others but I don't want some parts to be duplicated, such as ISOs).

The problem is that I would really like the bind mounts to be read-only, but when I write in /etc/fstab that these mounts have the options ro,bind and issue mount -a, I get this:

mount: warning: /some/target/path seems to be mounted read-write.

And indeed it is - it looks like the ro option is being ignored and the warning is probably because mount rechecks the mount after its done.

According to the mount man page:

Note that the filesystem mount options will remain the same as those on the original mount point, and cannot be changed by passing the -o option along with --bind/--rbind. The mount options can be changed by a separate remount command

And the solution given is to issue the mount command followed by mount -o remount,ro - which doesn't work well when using /etc/fstab for mounting. Any ideas how to work around that?

share|improve this question
up vote 8 down vote accepted

I found the answer which works for me on debian. It's from:

/source/dir            /destination/dir    none  bind            0 0
/source/dir            /destination/dir    none  remount,bind,ro 0 0

If that doesn't work, you could do put the mount commands in rc.local. Which is ugly.

share|improve this answer
It looks to be working. Thanks for the answer. – Guss Apr 4 '12 at 22:19
Works for me too. Thanks a lot. – Doc Feb 20 '13 at 0:11
the mount manual recommends this solution under the bind section (man mount) – Thomas Jun 19 '15 at 18:51

I would say it'd be easiest to get over your desire to have the mounts read-only. Based on the information provided I see no reason why they need to be so.

share|improve this answer
Granted, but I'm stubborn that way ;-) – Guss Jul 27 '11 at 11:12
Unfortunately, all that gets you is an ulcer and a hatred of your job; it doesn't get you read-only bind mounts. – womble Jul 27 '11 at 11:21
Got your point, thanks. – Guss Jul 27 '11 at 20:45
/source/dir  /destination/dir  none  bind            0 0
/source/dir  /destination/dir  none  remount,bind,ro 0 0

by i test this is not use on ubuntu 14.04 X 64 OS

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

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