0

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

0

2 Answers 2

1

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.

0

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.

1
  • 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, 2012 at 0:34

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .