View previous topic :: View next topic |
Author |
Message |
Wizumwalt Guru

Joined: 20 Aug 2006 Posts: 547
|
Posted: Sat Dec 20, 2008 7:34 pm Post subject: diskless client not mounting NFS filesystems |
|
|
I have a diskless node being booted from a master, and it boots w/ errors. The errors I believe are mostly due from the masters fs's not being exported properly. The / fs on the slave is completely read only.
On the diskless node, I run dmesg and see ...
Code: |
VFS: Mounted root (nfs filesystem) readonly.
Freeing unused kernel memory: 436k freed
udev: renamed network interface eth1 to eth3
|
Had some ethernet errors when booting, but I think because all the filesystems aren't mounted correctly.
This is my /etc/exports file on the master.
Code: |
/diskless/10.0.1.1 10.0.1.1(sync,rw,subtree_check,no_root_squash,no_all_squash)
/opt 10.0.0.0/16(sync,rw,subtree_check,no_root_squash,no_all_squash)
/usr 10.0.0.0/16(sync,ro,subtree_check,no_root_squash,no_all_squash)
/home 10.0.0.0/16(sync,rw,subtree_check,no_root_squash,no_all_squash)
/var/log 10.0.0.0/16(sync,rw,subtree_check,no_root_squash,no_all_squash)
|
My pxelinux.cfg node file.
Code: |
DEFAULT /bzImage
APPEND ip=dhcp root=/dev/nfs nfsroot=10.0.0.10:/diskless/10.0.1.1
|
This is run from my diskless node.
Code: |
# mount
10.0.0.10:/diskless/10.0.1.1 on / type nfs (rw,sync,remount,hard,intr,nolock,rsize=8192,wsize=8192,addr=10.0.0.10)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)
udev on /dev type tmpfs (rw,nosuid, size=10240k, mode=755)
devpts on /devpts type devpts (rw,nosuid,noexec,gid=5,mode=620)
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid)
|
Here's the mount from the master.
Code: |
# mount
/dev/sda3 on / type jfs (rw)
proc on /proc type proc (rw,nosuid,nodev,noexec)
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec)
udev on /dev type tmpfs (rw,nosuid,size=10240k,mode=755)
devpts on /dev/pts type devpts (rw,nosuid,noexec,gid=5,mode=620)
/dev/sda5 on /home type jfs (rw)
/dev/sda6 on /usr type jfs (rw)
/dev/sda7 on /var type jfs (rw)
/dev/sda8 on /opt type jfs (rw)
/dev/sda9 on /diskless type jfs (rw)
/dev/sda10 on /tmp type jfs (rw)
shm on /dev/shm type tmpfs (rw,noexec,nosuid,nodev)
usbfs on /proc/bus/usb type usbfs (rw,noexec,nosuid,devmode=0664,devgid=85)
nfsd on /proc/fs/nfs type nfsd (rw,noexec,nosuid,nodev)
|
Any ideas?
Last edited by Wizumwalt on Tue Dec 23, 2008 4:54 pm; edited 2 times in total |
|
Back to top |
|
 |
theotherjoe Guru

Joined: 22 Nov 2003 Posts: 393
|
Posted: Sun Dec 21, 2008 8:28 am Post subject: |
|
|
try to add rw flag to your pxelinux.cfg file, see if that changes anything:
Code: |
DEFAULT /bzImage
APPEND ip=dhcp root=/dev/nfs rw nfsroot=10.0.0.10:/diskless/10.0.1.1
|
|
|
Back to top |
|
 |
hpeters n00b

Joined: 26 Sep 2003 Posts: 68
|
Posted: Sun Dec 21, 2008 5:04 pm Post subject: Re: diskless client not mounting NFS filesystems |
|
|
Wizumwalt wrote: |
My pxelinux.cfg node file.
Code: |
DEFAULT /bzImage
APPEND ip=dhcp root=/dev/nfs nfsroot=10.0.0.10:/diskless/10.0.1.1
|
This is run from my diskless node.
[code]
|
Try
DEFAULT /bzImage
APPEND ip=dhcp rw root=/dev/nfs nfsroot=10.0.0.10:/diskless/10.0.1.1
in your pxelinux.cfg
Not sure that is exactly right as I haven't done it in a while.
Read write access needs to set at the kernel command line.
The rw option in the nfs mount options is ignored on root.
You should also set all your nfs mount options here for root as well. The
one's in fstab are ignored.
Harley |
|
Back to top |
|
 |
Hu Administrator

Joined: 06 Mar 2007 Posts: 23407
|
Posted: Mon Dec 22, 2008 4:52 am Post subject: |
|
|
What are the errors? As best I can tell, you have not shown anything which is clearly wrong.
Also, if you believe / is mounted read-only, it is better to nl /proc/mounts than to mount, since mount may display stale data when / is read-only. |
|
Back to top |
|
 |
Wizumwalt Guru

Joined: 20 Aug 2006 Posts: 547
|
Posted: Mon Dec 22, 2008 3:45 pm Post subject: |
|
|
So I added the 'rw' in the pxelinux.cfg file .
Code: |
DEFAULT /bzImage
APPEND ip=dhcp root=/dev/nfs rw nfsroot=10.0.0.10:/diskless/10.0.1.1
|
But I'm still seeing the same problems. My other file systems like /usr, /var, /opt, etc... aren't being mounted and their directories are empty. One thing I've noticed when the node boots is that it's (root fs) still being mounted read-only.
I must have something wrong. |
|
Back to top |
|
 |
hpeters n00b

Joined: 26 Sep 2003 Posts: 68
|
Posted: Mon Dec 22, 2008 5:13 pm Post subject: |
|
|
This works for me.
MASTER:
/etc/exports
# Diskless exports.
/mnt/diskless/htpc 192.168.1.50(sec=sys,rw,sync,no_subtree_check,no_root_squash)
pxelinux.cfg
DEFAULT /htpc/boot/bzImage
APPEND ip=dhcp rw rootfstype=nfs root=/dev/nfs nfsroot=192.168.1.100:/mnt/diskless/htpc,rsize=32768,wsize=32768,intr,nolock,nfsvers=3,acregmin=2,acregmax=3,acdirmin=3,acdirmax=3,tcp
Slave:
fstab
192.168.1.100:/mnt/diskless/htpc / nfs sec=sys,hard,intr,rw,nolock,rsize=32768,wsize=32768,nfsvers=3,actimeo=1,tcp 0 0
I just tested this and worked fine.
Harley |
|
Back to top |
|
 |
Wizumwalt Guru

Joined: 20 Aug 2006 Posts: 547
|
Posted: Mon Dec 22, 2008 5:44 pm Post subject: |
|
|
I gave that a try (and it's all very comparable to what I currently have), but I'm still getting the same problems. Only the / fs is being mounted, and mounted read only.
My filesystem is of type JFS on the master. |
|
Back to top |
|
 |
hpeters n00b

Joined: 26 Sep 2003 Posts: 68
|
Posted: Mon Dec 22, 2008 6:24 pm Post subject: |
|
|
Wizumwalt wrote: | I gave that a try (and it's all very comparable to what I currently have), but I'm still getting the same problems. Only the / fs is being mounted, and mounted read only.
My filesystem is of type JFS on the master. |
Can you give us the ouput of cat /proc/mounts.
Harley |
|
Back to top |
|
 |
theotherjoe Guru

Joined: 22 Nov 2003 Posts: 393
|
|
Back to top |
|
 |
Wizumwalt Guru

Joined: 20 Aug 2006 Posts: 547
|
Posted: Tue Dec 23, 2008 12:21 am Post subject: |
|
|
Here's a 'cat /proc/mounts' from the node.
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=10240k,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
|
|
|
Back to top |
|
 |
nativemad Developer


Joined: 30 Aug 2004 Posts: 918 Location: Switzerland
|
|
Back to top |
|
 |
Wizumwalt Guru

Joined: 20 Aug 2006 Posts: 547
|
Posted: Tue Dec 23, 2008 4:35 pm Post subject: |
|
|
I changed the /etc/init.d/checkroot file to use a mount 'rw' option instead of the 'ro' as shown in that bug report and some of the msgs of read-only went away when the node booted. But if I try a 'touch afile' on the / fs, it still tells me it's read only.
I think the biggest problem I have right now is that /usr, var/, /opt, etc... (all separate partitions) aren't being mounted at all. Does anyone have an idea on what to try to get all my filesystems mounted on the node via NFS. The /etc/exports and other files I've posted. I can't tell what could be wrong.
Towards the very end of my nodes dmesg output, there's a line like ...
Code: |
Root-NFS: unknown option: rw
|
|
|
Back to top |
|
 |
Wizumwalt Guru

Joined: 20 Aug 2006 Posts: 547
|
Posted: Wed Dec 24, 2008 5:24 pm Post subject: |
|
|
I ran this command on the node ...
Code: |
mount -n -o remount /
|
And / is now rw as I can do a 'touch filename' in / and it writes.
I then did ...
Code: |
$ mount 10.0.0.10:/usr /usr
mount.nfs; rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' ot keep locks local, or start statd.
|
But I was able to mount the partitions w/ 'mount /usr'.
But I still can't figure out why they're not mounting automatically when booted. |
|
Back to top |
|
 |
newtonian Guru


Joined: 19 Jan 2005 Posts: 465 Location: Hokkaido Japan
|
Posted: Sun Aug 30, 2009 2:33 pm Post subject: this worked for me |
|
|
I had the same problem when I upgraded the kernel.
2.6.26-gentoo-r4 booted without any problems but linux-2.6.30-gentoo-r4 fails when it tries to mount the nfs root filesystem as read/write.
I had to make the following change in /etc/init.d/checkroot
Code: | # mount -n -o remount,rw / &> /dev/null
mount -n -o remount,rw master:/diskless/myclientroot / |
where myclientroot is the folder that contains the root for my diskless client.
Now my diskless client mounts its root filesystem automatically on boot.
Hope this helps.
Cheers, |
|
Back to top |
|
 |
|
|
You cannot post new topics in this forum You cannot reply to topics in this forum You cannot edit your posts in this forum You cannot delete your posts in this forum You cannot vote in polls in this forum
|
|