Re: Remount root RO after the root dentry drops from the namespace

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 2009-11-18 at 12:50 +0100, Miklos Szeredi wrote:
> You can easily make a directory a root of a mount with
> 
>  mount --bind $DIR $DIR
> 
> In your example, add this before 5.

Thanks for the suggestion! And following on from that, we would do
"mount -o remount,ro /path/to/realroot" during shutdown
where /path/to/realroot is the bind mount that we created based on your
advice?

Unfortunately, that approach doesn't solve the problem. If you remount a
bind-mount as read only then the "real" underlying mount is unaffected.
See the code flow in do_remount() :

	if (flags & MS_BIND)
		err = change_mount_flags(path->mnt, flags);
	else
		err = do_remount_sb(sb, flags, data, 0);

Any other ideas?

Thanks,
Daniel


--
To unsubscribe from this list: send the line "unsubscribe linux-fsdevel" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Linux Ext4 Filesystem]     [Union Filesystem]     [Filesystem Testing]     [Ceph Users]     [Ecryptfs]     [AutoFS]     [Kernel Newbies]     [Share Photos]     [Security]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux Cachefs]     [Reiser Filesystem]     [Linux RAID]     [Samba]     [Device Mapper]     [CEPH Development]
  Powered by Linux