* Failed to use read-only NFS as the root filesystem
@ 2010-07-04 16:48 Min Jun,Xi
[not found] ` <AANLkTimW2-WTf1oqheGOQgfIHcUVpFOEakpnAO8aiQGf-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
0 siblings, 1 reply; 3+ messages in thread
From: Min Jun,Xi @ 2010-07-04 16:48 UTC (permalink / raw)
To: initramfs-u79uwXL29TY76Z2rM5mHXA; +Cc: Harald Hoyer
Hi All,
there's one problem here.
I tried to set one read-only NFS directory as the root filesystem, but
there're several problems, and lead to one situation that the root
filesystem is remounted using read-write option.
The kernel parameter is here:
+++++++++++
append="root=nfs:192.168.11.107:/install/netboot/rhel6/ppc64/compute/rootimg:ro
STATEMNT= XCAT=192.168.11.107:3001 ip=dhcp"
+++++++++++
#please ignore STATEMNT and XCAT, which are the OPTIONS created by myself.
Before "switch_root" command is running, we can see the root
filesystem is mounted read-only, you can find it here:
++++++++++++
192.168.11.107:/install/netboot/rhel6/ppc64/compute/rootimg on
/sysroot type nfs (ro,nolock,nfsvers=3,addr=192.168.11.107)
++++++++++++
However, after "switch_root" is running, all have been changed like this:
+++++++++++++++++++++++++++++++++++++++++
dracut: Switching root
Welcome to Red Hat Enterprise Linux Server
Press 'I' to enter interactive startup.
Starting udev: [ OK ]
Setting hostname ca4dsls02: [ OK ]
Setting up Logical Volume Management: No volume groups found
[ OK ]
Checking filesystems
Checking all file systems.
[ OK ]
Remounting root filesystem in read-write mode: [ OK ]
Mounting local filesystems: [ OK ]
++++++++++++++++++++++++++++++++++++++++++
Can you find it? "Remounting root filesystem in read-write mode: [ OK ]"
Finally, I found something related with it.
In "/etc/init.d/rc.sysinit", the code looks like this:
+++++
639 Remount the root filesystem read-write.
640 update_boot_stage RCmountfs
641 if remount_needed ; then
642 action $"Remounting root filesystem in read-write mode: " mount
-n -o rem ount,rw /
643 fi
+++++
It seems the "update_boot_state" function tells us we need to remount
the NFS directory, then it remounts the root filesystem with
read-write option.
Is there any option or flag which can be used to disable it? I think
the developers from redhat should know about it.
Thank you!
^ permalink raw reply [flat|nested] 3+ messages in thread[parent not found: <AANLkTimW2-WTf1oqheGOQgfIHcUVpFOEakpnAO8aiQGf-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>]
* Re: Failed to use read-only NFS as the root filesystem [not found] ` <AANLkTimW2-WTf1oqheGOQgfIHcUVpFOEakpnAO8aiQGf-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org> @ 2010-07-04 17:16 ` David Dillow [not found] ` <1278263760.4311.59.camel-1q1vX8mYZiGLUyTwlgNVppKKF0rrzTr+@public.gmane.org> 0 siblings, 1 reply; 3+ messages in thread From: David Dillow @ 2010-07-04 17:16 UTC (permalink / raw) To: Min Jun,Xi; +Cc: initramfs-u79uwXL29TY76Z2rM5mHXA, Harald Hoyer On Mon, 2010-07-05 at 00:48 +0800, Min Jun,Xi wrote: > Hi All, > there's one problem here. > I tried to set one read-only NFS directory as the root filesystem, but > there're several problems, and lead to one situation that the root > filesystem is remounted using read-write option. > Is there any option or flag which can be used to disable it? I think > the developers from redhat should know about it. Search /etc/rc.d/rc.sysinit for /etc/sysconfig/readonly-root. I don't know if it is well documented or not. You can also use "readonlyroot" on the command line I think, but using the file lets you set more options. Expect more issues related to this, the last time I looked at it, it took some tweaking to make work well. ^ permalink raw reply [flat|nested] 3+ messages in thread
[parent not found: <1278263760.4311.59.camel-1q1vX8mYZiGLUyTwlgNVppKKF0rrzTr+@public.gmane.org>]
* Re: Failed to use read-only NFS as the root filesystem [not found] ` <1278263760.4311.59.camel-1q1vX8mYZiGLUyTwlgNVppKKF0rrzTr+@public.gmane.org> @ 2010-07-05 9:23 ` Steffen Maier 0 siblings, 0 replies; 3+ messages in thread From: Steffen Maier @ 2010-07-05 9:23 UTC (permalink / raw) To: David Dillow; +Cc: Min Jun,Xi, initramfs-u79uwXL29TY76Z2rM5mHXA, Harald Hoyer On 07/04/2010 07:16 PM, David Dillow wrote: > On Mon, 2010-07-05 at 00:48 +0800, Min Jun,Xi wrote: >> Hi All, >> there's one problem here. >> I tried to set one read-only NFS directory as the root filesystem, but >> there're several problems, and lead to one situation that the root >> filesystem is remounted using read-write option. > >> Is there any option or flag which can be used to disable it? I think >> the developers from redhat should know about it. > > Search /etc/rc.d/rc.sysinit for /etc/sysconfig/readonly-root. I don't > know if it is well documented or not. You can also use "readonlyroot" on > the command line I think, but using the file lets you set more options. > Expect more issues related to this, the last time I looked at it, it > took some tweaking to make work well. Even thought it focuses on a specific use case on s390x, the following document for readonly root-fs on RHEL 5.3 might help you with some more background information: http://www.linuxvm.org/Present/misc/ro-root-RH5.pdf Steffen Linux on System z Development IBM Deutschland Research & Development GmbH Vorsitzender des Aufsichtsrats: Martin Jetter Geschäftsführung: Dirk Wittkopp Sitz der Gesellschaft: Böblingen Registergericht: Amtsgericht Stuttgart, HRB 243294 ^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2010-07-05 9:23 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-07-04 16:48 Failed to use read-only NFS as the root filesystem Min Jun,Xi
[not found] ` <AANLkTimW2-WTf1oqheGOQgfIHcUVpFOEakpnAO8aiQGf-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2010-07-04 17:16 ` David Dillow
[not found] ` <1278263760.4311.59.camel-1q1vX8mYZiGLUyTwlgNVppKKF0rrzTr+@public.gmane.org>
2010-07-05 9:23 ` Steffen Maier
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.