machspeed n00b
Joined: 21 Aug 2012 Posts: 11
|
Posted: Wed Dec 12, 2012 6:26 am Post subject: NFS Gotcha! Simple Export Problem was a Big Headache! |
|
|
Hey guys,
Wanting to share an experience I've just had working with NFS and diskless nodes. I've resolved the problem as it was a bit of a noob moment but nowhere else is there any information or help to determine the solution of the issue or help debug it!
Basically I'm working with diskless nodes. A Gentoo server with NFS and the whole shebang that boots Ubuntu nodes. Everything was pointing towards the fact that the nodes should boot! But no matter what I tried from various forums and websites it still didn't work! I tried all the suggested tools to check network status, NFS status, exports...
The symptom looked thus
Code: | #/etc/exports
/media/diskless *(sync,ro,no_root_squash)
|
Code: | # showmount 172.16.1.1 --directories
Directories on 172.16.1.1:
/media/diskless
|
Network definitely checked out as the kernel was PXE booting and getting valid IP address 172.16.1.2 but once the kernel got to mounting the root, all I got was (note directory /media/diskless/172.16.1.2 existed on the server):
Code: | Looking up port of RPC 100003/2 on 172.16.1.1
Looking up port of RPC 100005/1 on 172.16.1.1
Root-NFS: Server returned error -13 while mounting /media/diskless/172.16.1.2
|
AND THEN! In the midst of trial and error I altered the root path in the PXE boot config and got something that resembled it working! (I changed the line from nfsroot=172.16.1.1:/media/diskless/172.16.1.2 to nfsroot=172.16.1.1:/media/diskless). I looked back at my exports file and then it clicked. I hadn't specified the mount point correctly!
Working, it looks like
Code: | # /etc/exports
/media/diskless/172.16.1.2 *(sync,ro,no_root_squash)
|
And the nodes boot fine!
To reiterate: I wanted to share this because as noobish and as basic of an error it is. When your frantically searching forums for an answer, this never came up! So to summarise to myself and linux beginners messing with diskless nodes: You must export THE EXACT MOUNT POINT in order for your node to be allowed to mount it! That goes for every other node you add if they don't share the same mount point! |
|