Autofs: 한 폴더는 마운트할 수 있지만 다른 폴더는 마운트할 수 없습니다.

Autofs: 한 폴더는 마운트할 수 있지만 다른 폴더는 마운트할 수 없습니다.

autofs를 사용하여 랩탑에서 LAN 서버로 두 개의 디렉토리를 마운트하고 싶습니다. 문제는 autofs가 한 디렉토리를 마운트하지만 다른 디렉토리는 마운트하지 않는다는 것입니다.

내 노트북이 디렉토리를 내보내는 방법은 다음과 같습니다.

/etc/export

/home           192.168.178.10(ro,sync,fsid=0,crossmnt,no_subtree_check,root_squash)
/home/peter      192.168.178.10(ro,sync,no_subtree_check,root_squash)
/media/peter/vm             192.168.178.10(ro,sync,fsid=1,no_subtree_check,root_squash)
/media/peter/vm/Windows_7_x64      192.168.178.10(ro,sync,no_subtree_check,root_squash)

서버는 예상되는 내보내기를 보여줍니다.

$ showmount -e peter-laptop

Export list for peter-laptop:
/media/peter/vm/Windows_7_x64 192.168.178.10
/media/peter/vm               192.168.178.10
/home/peter                   192.168.178.10
/home                         192.168.178.10

NFS 공유를 수동으로 마운트하면 정상적으로 작동합니다.

 $ sudo mount peter-laptop:/home /home/peter/test_home/
 $ sudo mount peter-laptop:/media/peter/vm /home/peter/test_vm/

이제 모든 것을 제거하고 다시 설치해 보았습니다.자동 파일 시스템:

서버에 이런게 있어요/etc/autofs.master:

/import/peter-laptop/peter     /etc/auto.peter-laptop --ghost

그리고 이것은/etc/autofs.peter-노트북:

home -fstype=nfs4,ro,retry=0,rsize=8192,wsize=8192,tcp 192.168.178.20:/peter
vm -fstype=nfs4,ro,retry=0,rsize=12288,wsize=12288,tcp 192.168.178.20:/media/peter/vm

autofs를 다시 시작하면 각 마운트에 대한 디렉터리가 생성됩니다.

/imports/peter-laptop/peter/home
/imports/peter-laptop/peter/vm

홈 디렉토리에서는 모든 것이 잘 작동하지만 홈 디렉토리로 들어가면 cd다음 vm오류가 발생합니다.

$ cd vm/
-bash: cd: vm/: No such file or directory

내가 무엇을 할 수 있는지 아시나요?

관련 정보