ルートファイルシステムを持つNFS、マウントされたサブディレクトリにアクセスできない

ルートファイルシステムを持つNFS、マウントされたサブディレクトリにアクセスできない

私はこれをゆっくりあきらめた...

NFS経由でルートファイルシステムをエクスポートしようとしてマウントされた/usr/portageサブディレクトリが空です/

詳細は次のとおりです。

マスター:

mount | grep portage

/usr/portage.mount/portage.sfs on /usr/portage.mount/readonly type squashfs (ro,noatime)
unionfs on /usr/portage type fuse.unionfs (rw,nosuid,nodev,noatime,user_id=0,group_id=0,default_permissions,allow_other)

最初の方法。

マスター:

/etc/exports
/ *(sync,rw,no_root_squash,no_subtree_check,crossmnt)

ゲスト:

mount -t nfs -o rw,noatime,nocto,actimeo=60,lookupcache=positive,vers=4,fsc 192.168.1.1:/ /mnt/192.168.1.1
ls -l /mnt/192.168.1.1/usr/portage

結果 = 空のフォルダ

第二の方法。

マスター:

/etc/exports
/usr/portage *(sync,rw,no_root_squash,subtree_check,nohide,fsid=0)
/ *(sync,rw,no_root_squash,no_subtree_check,crossmnt,nohide)

ゲスト:

mount -t nfs -o rw,noatime,nocto,actimeo=60,lookupcache=positive,vers=4,fsc 192.168.1.1:/ /mnt/192.168.1.1
ls -l /mnt/192.168.1.1

結果:ホストシステムの/usr/portageコンテンツ(ルートファイルシステムにはusr / portageがマウントされている必要があります)

3番目の方法。

マスター:

mount -t bind / /media/root

/etc/exports
/media/root *(sync,rw,no_root_squash,no_subtree_check,crossmnt,nohide)

ゲスト:

mount -t nfs -o rw,noatime,nocto,actimeo=60,lookupcache=positive,vers=4,fsc 192.168.1.1:/media/root /mnt/192.168.1.1
ls /mnt/192.168.1.1
ls: cannot access 'media': Too many levels of symbolic links

私は何を見逃していますか?

ありがとう、バート

ベストアンサー1

両方のエクスポートにfsidを追加するだけです。

マスター:

cat /etc/exports

/usr/portage *(sync,rw,no_root_squash,subtree_check,nohide,fsid=1)
/ *(sync,rw,no_root_squash,no_subtree_check,crossmnt,nohide,fsid=0)

おすすめ記事