View previous topic :: View next topic |
Author |
Message |
jwpaine n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Oct 2011 Posts: 10
|
Posted: Tue Oct 11, 2011 3:59 am Post subject: diskless node unable to mount root filesystem via NFS |
|
|
Hey...not sure what part of the forums I should put this on. Will try here =)
I'm using TFTP, NFS and DHCP to boot a diskless node using PXELinux.
Each node has a basic root filesystem which resides in
/diskless/ip_address on the server
Right now, my node acquires an IP from my DHCP server, which instructs the bootrom to download a file called pxelinux.0, and the default pxelinux config file (/diskless/pxelinux.conf/default ) is shown below:
Code: |
DEFAULT /bzImage
APPEND ip=dhcp root=/dev/nfs nfsroot=192.168.1.1:/diskless/192.168.1.21
|
The node downloads the bzImage via tftp (INTFTPD_PATH="/diskless") and boots the kernel. It goes through its hardware detection and all that fun stuff, and then the message:
Quote: |
VFS: cannot open root device "nfs" or unknown block(2,0)
|
The root device that it is refering to "nfs" is that which is defined in the pxelinux default config as root = /dev/nfs
[NOTE: Modern kernels recognize root=/dev/nfs as a command-line argument] Which leads me to think that I am possibly missing something in the kernel (bzImage) that the client node is booting. Here is a grep NFS of the kernel .config file:
Code: |
CONFIG_NFS_FS=y
CONFIG_NFS_V3=y
CONFIG_NFS_V3_ACL=y
CONFIG_NFS_V4=y
# CONFIG_NFS_V4_1 is not set
CONFIG_ROOT_NFS=y
# CONFIG_NFS_USE_LEGACY_DNS is not set
CONFIG_NFS_USE_KERNEL_DNS=y
# CONFIG_NFS_USE_NEW_IDMAPPER is not set
CONFIG_NFSD=y
CONFIG_NFSD_DEPRECATED=y
CONFIG_NFSD_V3=y
# CONFIG_NFSD_V3_ACL is not set
# CONFIG_NFSD_V4 is not set
CONFIG_NFS_ACL_SUPPORT=y
CONFIG_NFS_COMMON=y
|
From what I can see, everything is enabled that needs to be enabled. Maybe a missing kernel option isn't the answer.
ANY suggestions would be awesome! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
nativemad Developer
![Developer Developer](/images/ranks/rank-dev.gif)
![](images/avatars/gallery/Simpsons/Simpsons_-_Krusty.jpg)
Joined: 30 Aug 2004 Posts: 918 Location: Switzerland
|
Posted: Tue Oct 11, 2011 5:04 am Post subject: |
|
|
Hi,
the pxeconfig looks good.
Do you see that the kernel tries to gain an ip through dhcp (yes, a second time) after booting, just before the mount attempt? If there is no such info, then you probably miss the network driver IN kernel (not as module).
If that is fine, you should see a mount attempt in the servers logfile which could probably tell you why the mount fails.
HTH, Cheers _________________ Power to the people! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jwpaine n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Oct 2011 Posts: 10
|
Posted: Tue Oct 11, 2011 7:49 pm Post subject: |
|
|
Thanks for the reply.
On the server, I did to see all active DHCP requests. When I boot the machine, the node initiates a dhcp request, AND half way through booting the kernel it makes another request, before saying Quote: | VFS: Unable to mount root fs via NFS , VFS: Cannot open root device "nfs" |
should the machine be able to respond to ping after a kernel panic?
If I change the line "root=/dev/nfs" in the pxeconfig to, say root=/dev/foobar , I get "VFS: Cannot open root device "foobar" , which makes me think that the kernel isn't properly identifying the line root=/dev/nfs
I have also tried tcpdump port 2049 (NFS) and do not see any incoming connections on this port.
Hmmm ![Confused :?](images/smiles/icon_confused.gif) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jwpaine n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Oct 2011 Posts: 10
|
Posted: Tue Oct 11, 2011 9:08 pm Post subject: |
|
|
OK, checking /var/log/messages while the client boots, I am getting:
Quote: | refused mount request from 192.168.1.145 for /diskless/192.168.1.21 (/): no export entry |
For some reason my node is being offered an IP of 192.168.1.145 (which is the IP of my server)
/var/log/messages shows: dhcpd: DHCPREQUEST for 192.168.1.145 (192.168.1.1) from 00:0b:db:2a:65:55 via eth0: lease 192.168.1.145 unavailable.
This looks like it's the problem...because in my /etc/exports file I have it specified that only a host with ip 192.168.1.21 can access the /diskless/192.168.1.21 share
NO idea why it's trying to get an ip of 192.168.1.145
Last edited by jwpaine on Tue Oct 11, 2011 9:48 pm; edited 1 time in total |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
dmpogo Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 02 Sep 2004 Posts: 3468 Location: Canada
|
Posted: Tue Oct 11, 2011 9:29 pm Post subject: |
|
|
jwpaine wrote: | OK, checking /var/log/messages while the client boots, I am getting:
Quote: | refused mount request from 192.168.1.145 for /diskless/192.168.1.21 (/): no export entry |
This is what my /etc/exports file looks like:
Code: | # /etc/exports: NFS file systems being exported. See exports(5).
# one line like this for each slave
/diskless/192.168.1.21 192.168.1.21(sync,rw,no_root_squash,no_all_squash)
# common to all slaves
/opt 192.168.1.0/24(sync,ro,no_root_squash,no_all_squash)
/usr 192.168.1.0/24(sync,ro,no_root_squash,no_all_squash)
/home 192.168.1.0/24(sync,rw,no_root_squash,no_all_squash)
# if you want to have a shared log
/var/log 192.168.1.21(sync,rw,no_root_squash,no_all_squash) |
SO the problem must be in /etc/exports |
Could you have problems with premissions on your server ? the export line should have a list of machines from which mount is allowed, no ?
I would expect it to be
/diskless/192.168.1.21 192.168.1.145(sync,rw,no_root_squash,no_all_squash)
to be able to mount from 192.168.1.145
or, more generally, something like
/diskless/192.168.1.21 192.168.1.0/24(sync,rw,no_root_squash,no_all_squash) |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jwpaine n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Oct 2011 Posts: 10
|
Posted: Tue Oct 11, 2011 9:57 pm Post subject: |
|
|
For some reason the first time my dhcp server is providing it with a lease of 192.168.1.21, and the second time (once the kernel boots) it is aquiring an ip of 192.168.1.145... I will figure this out later. I changed the entry in /etc/exports to allow access from 192.168.1.145
/var/log/messages now shows:
authenticated mount request from 192.168.1.145:667 for /diskless/192.168.1.21 (/diskless/192.168.1.21)
so it was authenticated.... BUT
server kernel: [ 8254.772548] svc: 192.168.1.145, port=683: unknown version (3 for prog 100003, nfsd)
perhaps is what's causing the issue.... perhaps the client is using a different version of NFS? I have NFS v3 enabled and v4 not set in the client's kernel
EDIT: Code: | cat /proc/fs/nfsd/versions | gives "+2"
WHY is this using version to and not version 3? I recently emerged the nfs deamon. isn't 2 really outdated? Looks like I need to compile in version 2 support, unless I can find a way to enable version 3 |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
dmpogo Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 02 Sep 2004 Posts: 3468 Location: Canada
|
Posted: Tue Oct 11, 2011 10:03 pm Post subject: |
|
|
jwpaine wrote: | For some reason the first time my dhcp server is providing it with a lease of 192.168.1.21, and the second time (once the kernel boots) it is aquiring an ip of 192.168.1.145... I will figure this out later. I changed the entry in /etc/exports to allow access from 192.168.1.145
/var/log/messages now shows:
authenticated mount request from 192.168.1.145:667 for /diskless/192.168.1.21 (/diskless/192.168.1.21)
so it was authenticated.... BUT
server kernel: [ 8254.772548] svc: 192.168.1.145, port=683: unknown version (3 for prog 100003, nfsd)
perhaps is what's causing the issue.... perhaps the client is using a different version of NFS? I have NFS v3 enabled and v4 not set in the client's kernel |
add "vers=3" to the nfs mount options on the client. Or compile nfs server without v4 support.
With dhcp, unless you configure dhcp server to give specific IP for a given MAC, you are never sure what IP you'll get. So one would have to open exports to the whole network, or something, to avoid failures. But then you name the images by IP, which is again problematic, without static assignment |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jwpaine n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Oct 2011 Posts: 10
|
Posted: Tue Oct 11, 2011 10:19 pm Post subject: |
|
|
The client's kernel is already configured to use NFS version 3.0
NFS V4 is not configured in the client OR server kernel. cat /proc/fs/nfds/versions shows only support for version 2. I have no idea how to enable the server NFS version 3, as server kernel already has CONFIG_NFS_V3=y |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
dmpogo Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 02 Sep 2004 Posts: 3468 Location: Canada
|
Posted: Tue Oct 11, 2011 10:32 pm Post subject: |
|
|
jwpaine wrote: | The client's kernel is already configured to use NFS version 3.0
NFS V4 is not configured in the client OR server kernel. cat /proc/fs/nfds/versions shows only support for version 2. I have no idea how to enable the server NFS version 3, as server kernel already has CONFIG_NFS_V3=y |
vers=3 is the MOUNT option, to be set in your /etc/fstab on the client or whereever your nfs mount is described on the client.
I see
CONFIG_NFS_V4=y
in one of your previous messages, was it on the client or server ? I understood it is the client machine, so kernel options say that nfs client V3 and V4 and nfsserver V3 (but not V4) are configured in this kernel.
Can you post all NFS kernel config options from the server kernel ?
To have version 3 support your server kernel must have
CONFIG_NFSD_V3=y
If you server supports only version 2 and you can't change it, then you should perhaps give vers=2 option when you mount from the client. |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
jwpaine n00b
![n00b n00b](/images/ranks/rank_rect_0.gif)
Joined: 11 Oct 2011 Posts: 10
|
Posted: Tue Oct 11, 2011 10:59 pm Post subject: |
|
|
CONFIG_NFSD_V2_ACL=y is the only thing I see that could be causing the issue. Removing and re-compiling.....
now /proc/fs/nfsd/versions shows +2 +3 Thanks a lot.... not sure how I missed that. Now to see if my client boots
It works! Kernel fully boots and I get a login prompt. lots to work on, from here... but at least the nfs share is working thanks! |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
|
|
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
|
|