Package: mount
Version: 2.13.1.1-1
Followup-For: Bug #441375

Hello, as described in an LWN article[1], the read-only bind mounts works, BUT
one should mount the share as RW, then turn it in RO mode :
 $mount /foo /bar
 $mount /bar -o remount,ro
 $touch /bar/test
 touch: cannot touch `/bar/test': Read-only file system

I've attached a patch for the manpage regarding r/o bind mounts.

[1] http://lwn.net/Articles/281157/


-- System Information:
Debian Release: lenny/sid
  APT prefers testing
  APT policy: (500, 'testing')
Architecture: i386 (i686)

Kernel: Linux 2.6.26-1-686 (SMP w/2 CPU cores)
Locale: LANG=en_US.UTF-8, LC_CTYPE=en_US.UTF-8 (charmap=UTF-8)
Shell: /bin/sh linked to /bin/bash

Versions of packages mount depends on:
ii  libblkid1                     1.41.2-1   block device id library
ii  libc6                         2.7-14     GNU C Library: Shared libraries
ii  libselinux1                   2.0.65-5   SELinux shared libraries
ii  libuuid1                      1.41.2-1   universally unique id library

mount recommends no packages.

Versions of packages mount suggests:
ii  nfs-common                    1:1.1.2-6  NFS support files common to client

-- no debconf information
--- mount/mount.8-orig  2008-10-19 13:49:21.000000000 +0200
+++ mount/mount.8       2008-10-19 14:24:09.000000000 +0200
@@ -120,9 +120,16 @@
 .RE
 .\" available since Linux 2.4.11.
 
-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.
+Note that the filesystem mount options are the same as those on the 
+original mount point, and cannot be changed by passing the -o
+option along with --bind/--rbind. Since 2.6.24, it is possible to
+remount a bind as readonly using the following command (Note that 
+you can't mount -o ro in the first place, see bug #441375)
+.RS
+.br
+.B "mount newdir --o remount,ro"
+.RE
+
 
 Since Linux 2.5.1 it is possible to atomically move a mounted tree
 to another place. The call is

Reply via email to