On Thu, May 27, 2010 at 4:33 PM, Andrew Lutomirski <luto@xxxxxxx> wrote: > # touch foo > # touch bar > # mount -n --bind foo bar > # mount -n -o remount,ro bar > mount: can't find bar in /etc/fstab or /etc/mtab > > That seems like an oversight -- why is -o remount looking at > /etc/fstab and /etc/mtab at all? Especially when I set -n. > > Oddly, this doesn't work either: > # mount -n -o remount,ro -t bind foo bar > mount: bar is busy > > Am I missing something? > > There are a few ways I can think of to fix this: > > 1. Make mount -n (or mount --use-proc) look at /proc/self/mounts > instead of /etc/mtab. That won't do it. /proc/self/mounts shows the underlying mount, not the bind mount, which makes mount set absurd options in the syscall and the syscall fails. For example: # ln -sf /proc/self/mounts /etc/mtab # cd / # mkdir foo bar # mount --bind foo bar # mount -o remount,ro bar mount: /bar is busy That seems like another bug :-/ Why doesn't --bind -o ro work? --Andy -- To unsubscribe from this list: send the line "unsubscribe util-linux-ng" in the body of a message to majordomo@xxxxxxxxxxxxxxx More majordomo info at http://vger.kernel.org/majordomo-info.html