这个问题可能很简单,但我不知道,已经在这里呆了一整天。 任何build议表示赞赏。
我有两个盒子,一个作为服务器,另一个作为客户端运行。
运行Ubuntu 11.04的服务器,LVM2逻辑卷上的root fs,静态IP 192.168.2.20。 在安装干净的系统之后,我将完整的根分区复制到另一个LV,比如/ dev / data / root。 所有文件都在该LV的/ nfsroot文件夹下。 我用/ dev / data / master和/ dev / data / node1做了/ dev / data / root的两个快照(用lvcreate -s)。 我把这两个LV作为/ mnt / {master,node1}挂载在服务器上,同时创build了/ mnt / master / nfsroot / master和/ mnt / node1 / nfsroot / node1文件,这样我就不会迷路了。 然后我通过NFS(nfs-kernel-server)共享这两个坐骑
/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)
我装载了这些NFS共享,并在正确的位置看到了正确的文件。
然后,我安装了其他组件,用于无盘Ubuntu如何https://help.ubuntu.com/community/DisklessUbuntuHowto 。 我的PXElinuxconfiguration框2是
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
框2启动成功,但当我看着/我看到/主文件。 我检查了/ proc / cmdline和nfsroot是nfsroot=192.168.2.20:/mnt/node1/nfsroot和mount | grep ' / ' mount | grep ' / '也显示192.168.2.20:/mnt/node1/nfsroot
然后在/ mnt / {master,node1}下的方框2上挂载共享。 即使安装不同的服务器共享,两个文件系统似乎也映射到服务器上的相同(主)共享。
任何人有任何想法为什么?
有关描述问题的屏幕截图,请参阅http://ww3.sinaimg.cn/large/64b3c41egw1do3ftklgshj.jpg
如果有人来回答,我想在这里解决我的问题。
我通过从nfs-kernel-server更改为unfsd来解决这个问题。 在不改变PXEconfiguration或客户端上的任何内容的情况下,问题就消失了。
虽然没有尝试狐狸的修复fsid。
看来,你错过了fsid = 0导出和使用NFS4。 所以你应该添加像/mnt 192.168.2.0/24(ro,fsid=0,no_subtree_check,sync) ,no_subtree_check,sync /mnt 192.168.2.0/24(ro,fsid=0,no_subtree_check,sync)作为第一次出口在你的/ etc / exports和reexport …
关于nfs4的一些信息在这里 。