Take the 2-minute tour ×
Server Fault is a question and answer site for professional system and network administrators. It's 100% free, no registration required.

This question may be simple but I couldn't figure out and was stuck here for the whole day already. Any suggestions are appreciated.

I have two boxes, one as the server and other one running as the client.

Server running Ubuntu 11.04, root fs on LVM2 logical volume, static IP 192.168.2.20. After installing the clean system I copied the complete root partition to another LV, say /dev/data/root. All files are under /nfsroot folder on that LV. I made two snapshot of /dev/data/root (with lvcreate -s) as /dev/data/master and /dev/data/node1. I mounted these two LVs on the server as /mnt/{master,node1} and created both /mnt/master/nfsroot/master and /mnt/node1/nfsroot/node1 files so I won't get lost. Then I shared both two mounts via NFS (nfs-kernel-server) as

/mnt/master/nfsroot     192.168.2.0/24(rw,no_root_squash,async,insecure,no_subtree_check)
/mnt/node1/nfsroot      192.168.2.0/24(rw,no_root_squash,async,insecure,no_subtree_check)

I mounted these NFS shares and saw the right files in the right place.

I then installed other components for networking boot following Diskless Ubuntu Howto https://help.ubuntu.com/community/DisklessUbuntuHowto. My PXElinux config for box 2 is

DEFAULT linux

LABEL linux
KERNEL vmlinuz-2.6.38-8-server
APPEND root=/dev/nfs initrd=initrd.img-2.6.38-8-server nfsroot=192.168.2.20:/mnt/node1/nfsroot ip=dhcp rw

Box 2 was boot successfully but when I looked at / I saw /master file. I checked /proc/cmdline and nfsroot was nfsroot=192.168.2.20:/mnt/node1/nfsroot and mount | grep ' / ' also shows 192.168.2.20:/mnt/node1/nfsroot

I then mount both shared on box 2 under /mnt/{master,node1}. Even when mounting different server shares, two filesystems appears to be mapped to the same (master) share on the server.

Any one have any ideas why?

For a image of screen shot describing the problem please see http://ww3.sinaimg.cn/large/64b3c41egw1do3ftklgshj.jpg

share|improve this question
add comment

2 Answers 2

In case anyone come for an answer, I would like to put my fix here.

I got around this problem by changing from nfs-kernel-server to unfsd. Without changing anything in the PXE configuration or on the client the problem disappeared.

Didn't try Fox's fix for fsid though.

share|improve this answer
add comment

It really seems, you're missing fsid=0 export and using NFS4. So you should add something like /mnt 192.168.2.0/24(ro,fsid=0,no_subtree_check,sync) as first export in your /etc/exports and reexport ...

Some info on nfs4 is here.

share|improve this answer
    
I got around the problem by using unfsd instead, which might switch me back to NFSv3? Thanks for the info though I didn't get to try this. –  Ryan Jan 20 '12 at 0:34
add comment

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.