시작 시 NFS 마운트 실패

시작 시 NFS 마운트 실패

여러 개의 Ubuntu 서버가 있고 최근에 몇 개의 11.04 서버(및 1개의 데스크탑)를 설치했는데 재부팅 시 nfs 마운트가 마운트되지 않는 것을 발견했습니다.

nfs-common을 최신 버전으로 업그레이드하려고 시도했지만(작은 개정판이 하나밖에 없음) 오류가 약간 변경되었습니다. 문제가 있는 이러한 서버는 모두 제가 예전에 만든 서버 템플릿의 복제물(vmWare)이므로 템플릿 및 모든 복제물에 문제가 있을 수 있다고 생각했습니다. 그런 다음 Desktop 11.04에서 동일한 마운트를 시도했지만 동일한 문제가 발생했습니다. 약 절반의 시간은 "S"를 눌러 건너뛸 수 있지만 나머지 절반의 시간은 서버가 정지됩니다(그리고 최근 스냅샷에서 복원합니다). 또한 이상한 점은 내가~이다시스템에 들어갈 수 있게 되면 "mount -a"를 실행하면 모든 것이 마운트됩니다. 이로 인해 nfs가 마운트를 시도하기 위해 네트워크가 나타날 때까지 기다리지 않는다는 것이 문제라고 생각됩니다. 호스트가 /etc/hosts에 있음에도 불구하고 "호스트를 확인할 수 없음"(NFS 지점까지) 오류가 발생한다고 생각하게 만드는 또 다른 이유가 있습니다.

여기 내 /var/log/boot.log가 있습니다.

fsck from util-linux-ng 2.17.2
fsck from util-linux-ng 2.17.2
/dev/sda1 was not cleanly unmounted, check forced.
/dev/mapper/php53x-root: clean, 75641/1032192 files, 492673/4126720 blocks (check in 5 mounts)
init: portmap-wait (statd) main process (373) killed by TERM signal
init: statd main process (402) terminated with status 1
init: statd main process ended, respawning
init: statd-mounting main process (355) killed by TERM signal
mount.nfs: Failed to resolve server NFSSERVER-priv: Name or service not known
init: statd-mounting main process (416) killed by TERM signal
mount.nfs: Failed to resolve server NFSSERVER-priv: Name or service not known
init: statd main process (435) terminated with status 1
init: statd main process ended, respawning
init: statd main process (459) terminated with status 1
init: statd main process ended, respawning
mountall: mount /var/www [410] terminated with status 32
mountall: mount /var/users [436] terminated with status 32
init: statd-mounting main process (448) killed by TERM signal
init: statd main process (468) terminated with status 1
init: statd main process ended, respawning
init: statd main process (498) terminated with status 1
init: statd main process ended, respawning
/dev/sda1: 226/124496 files (1.3% non-contiguous), 39133/248832 blocks
mountall: fsck /boot [268] terminated with status 1
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified
mountall: mount /var/users [583] terminated with status 32
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified
mountall: mount /var/www [575] terminated with status 32
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified
mountall: mount /var/www [638] terminated with status 32
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified
mountall: mount /var/users [645] terminated with status 32
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified
mountall: mount /var/www [724] terminated with status 32
mount.nfs: rpc.statd is not running but is required for remote locking.
mount.nfs: Either use '-o nolock' to keep locks local, or start statd.
mount.nfs: an incorrect mount option was specified
mountall: mount /var/users [729] terminated with status 32 Skipping /var/www at user request
 * Starting AppArmor profiles        [80G  [74G[ OK ]
 * Starting Name Service Cache Daemon nscd        [80G  [74G[ OK ]
FATAL: Module vmhgfs not found.
FATAL: Module vmsync not found.
FATAL: Module vmblock not found.
 * Loading open-vm-tools modules        [80G  [74G[ OK ]
 * Starting open-vm daemon vmtoolsd        [80G  [74G[ OK ]

글이 길어져서 죄송합니다. 최대한 많은 정보를 전달하고 싶었습니다. 누구든지 이것에 대한 제안이 있습니까? 나는 하루 종일 인터넷 검색을 했고 _netdev로 시도하고 statd의 구성을 변경했지만 아무것도 작동하지 않았습니다. 이것이 영향을 미치는 서버가 6개 있습니다. :\

/etc/fstab: (문제 줄만 해당 - 이를 제거하면 나머지 nfs가 마운트될 수 있습니다)

NFSSERVER-priv:/vol/vol1_isp/eshowcase/sites      /var/www       nfs     ro,defaults        0       0
NFSSERVER-priv:/vol/vol1_isp/vusers      /var/users       nfs     defaults        0       0

/etc/hosts (관련 항목):

10.1.1.43 NFSSERVER-priv

답변1

다른 사람이 이 문제에 직면하여 여기에서 해결책을 찾는 경우를 대비하여 제가 수행한 작업은 다음과 같습니다.

/etc/init.d/에 스크립트(mountall.sh)를 생성했습니다.

#!/bin/bash

mount -r NFSSERVER-priv:/vol/vol1_isp/eshowcase/sites /var/www
mount    NFSSERVER-priv:/vol/vol1_isp/vusers          /var/users

시스템이 새 스크립트를 인식하도록 합니다.

update-rc.d mountall.sh defaults

"defaults" 옵션은 실행 레벨 2, 3, 4 및 5에서 mountall.sh를 시작하기 위한 링크를 넣습니다. (그리고 mountall.sh를 중지하기 위한 링크를 0, 1 및 6에 넣습니다.)

실행할 수 있는 파일을 Chmod로 지정

chmod +x mountall.sh

이제 6을 초기화하면 마운트 지점이 있어야 합니다. 또한 fstab에 "주석"을 작성하여 사람들이 모든 것이 실제로 마운트되는 위치를 가장 먼저 보게 될 위치를 알 수 있도록 하는 것도 좋은 생각입니다.

답변2

이것이 귀하에게 해당되는지 확실하지 않지만 문제는나는 가지고 있었다내가 마운트하려고 했던 디렉토리가 부팅 시 사용할 수 없다는 점이었습니다. 대신에 마운트를 시도했는데 /mnt작동했습니다.

답변3

우분투 14.04를 14.10으로 업그레이드한 후에도 동일한 문제가 발생했습니다. 나를 위해 문제를 해결한 방법은 다음과 같습니다.

편집하여 /etc/default/nfs-common다음과 같이 표시되는지 확인하세요.

NEED_STATD=yes

다시 시작한 후 NFS 마운트가 작동했습니다.

답변4

Windows 8을 사용하는 경우 nfs 형식의 디스크는 마운트되지 않으며 이 문제에 대한 대답은 "Windows 8을 다시 설치하고 설정에서 최대 절전 모드 옵션을 비활성화"입니다. 그런 다음 nfs 형식의 디스크만 마운트할 수 있습니다.

관련 정보