LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   diskless node mounts / as read-only (https://www.linuxquestions.org/questions/linux-software-2/diskless-node-mounts-as-read-only-696445/)

wizumwalt 01-11-2009 01:11 AM

diskless node mounts / as read-only
 
I've got a machine that boots via nfs and / is being mounted as readonly. The other partitions listed in the fstab aren't mounting at all.

I found the following in 'dmesg' output.
Code:

Root-NFS: unknown option: rw
...
VFS: Mounted root (nfs filesystem) readonly.
Freeing unused kernel memory: 436k freed.

Here's it's fstab.
Code:

10.0.0.10:/diskless/10.0.1.1    /      nfs    sec=sys,sync,hard,intr,rw,nolock,rsize=8192,wsize=8192,nfsvers=3        0      0
10.0.0.10:/opt                  /opt    nfs    sync,hard,intr,rw,nolock,rsize=8192,wsize=8192  0      0
10.0.0.10:/usr                  /usr    nfs    sec=sys,sync,hard,intr,ro,nolock,rsize=8192,wsize=8192,nfsvers=3        0      0
10.0.0.10:/home                /home  nfs    sync,hard,intr,rw,nolock,rsize=8192,wsize=8192  0      0
10.0.0.10:/var/log              /var/log nfs    sync,hard,intr,rw      0 0

I am curious why / in the fstab above shows nfsvers=3, yet /proc/mounts below shows /dev/root as vers=2 ... is that right?

And here's /proc/mounts.
Code:

$ cat /proc/mounts
rootfs / rootfs rw 0 0
/dev/root / nfs ro,vers=2,rsize=4096,wsize=4096,namlen=255,hard,nointr,nolock,proto=udp,timeo=11,retrans=2,sec=sys,mountproto=udp,addr=10.0.0.10 0 0
proc /proc proc rw,nosuid,nodev,noexec 0 0
sysfs / sys sysfs rw,nosuid,nodev,noexec 0 0
udev /dev/ tmpfs rw,nosuid,size=1024k,mode=755 0 0
devpts /dev/pts devpts rw,nosuid,noexec,gid=5,mode=620 0 0
usbfs /proc/bus/usb usbfs rw,nosuid,noexec 0 0

I am using PXE and I see that I already have the 'rw' in the append option.
Code:

DEFAULT /bzImage
APPEND ip=dhcp rootfstype=nfs root=/dev/nfs nfsroot=10.0.0.10:/diskless/10.0.1.1,nolock,rw

However, what I don't understand is why I'm seeing the 'Root-NFS: unknown option: rw' in my dmesg output as listed above. So I think my client is seeing the 'rw', but it's not accepting it.

Another thing I see when it boots is the following ...
Code:

(can't see/copy what's on the screen at this point, then I see the following)
/lib64/udev/shell-compat.sh: line 6: /dev/null: Read-only file system
/lib64/udev/shell-compat.sh: line 6: /dev/null: Read-only file system
/lib64/udev/shell-compat.sh: line 6: /dev/null: Read-only file system
/lib64/udev/shell-compat.sh: line 6: /dev/null: Read-only file system
* Mounting /dev ...                                                    [ ok ]
* Starting udevd ...                                                    [ ok ]
* Populating /dev with existing devices through uevents                [ ok ]
* Waiting for uevents to be processed ...                               
udevd-event][1426]: rename_netif: error changing netif name eth0 to eth2: Device or resource busy
                                                                        [ ok ]
Mounting devpts at /dev/pts ...                                        [ ok ]
* Skipping /etc/mtab initialization (ro root?)
* Updating modules.dep ...
FATAL: Could not open /lib/modules/2.6.26-gentoo-r4/modules.dep.temp for writing: Read-only file system
rm: cannot remove '/fastboot': Read-only file system
* Failed to start /etc/init.d/checkfs

* One or more critical sstartup scripts failed to start!
* Please correct this, and reboot ...

Give root password for maintenance
(or type Control-D to continue):

Any help much appreciated.

dogrusty 02-22-2009 01:45 AM

I had the same problem
I changed my prelinux.cfg/default from

APPEND ip=dhcp rootfstype=nfs root=/dev/nfs nfsroot=10.0.0.10:/diskless/10.0.1.1

to

APPEND ip=dhcp rootfstype=nfs root=/dev/nfs nfsroot=10.0.0.10:/diskless/10.0.1.1 rw

and it at least solved that problem.

Rusty

gkrellm 01-26-2010 12:46 AM

I have the same problem.

I also followed dogrusty's post but without result. It only changed some messages on booting but root mounts read-only.

I noticed than IP-Config output contains string
Code:

rootpath=
though /etc/dhcpd.conf on main server contains
Quote:

option root-path "192.168.0.1:/xfs/dirinstall";
(192.168.0.1 is my server IP).

gkrellm 01-26-2010 01:25 AM

WTF

I totally rewrited all pxebootsh*t and dhcpsh*t and now during boot I see

Quote:

rootpath=/clientroot (this is my shared nfs-dir for client root mount)

rootserver=192.168.0.1 (my main nfs server)
All seems to be nice but then I see a lot of read-only errors and I get login prompt that does not work at all.


All times are GMT -5. The time now is 03:22 AM.