Mac OS Sierra 10.12 autofs 僅掛載第一個指定的 NFS 卷

Mac OS Sierra 10.12 autofs 僅掛載第一個指定的 NFS 卷

我在使用 Mac OS Sierra 時遇到問題。我在 auto_nfs 中為 2 個 NFS 共享添加了一個 NFS 配置,並且 autofs 僅選擇第一個。

這是我的 auto_master:

#
# Automounter master map
#
+auto_master        # Use directory service
/net            -hosts      -nobrowse,hidefromfinder,nosuid
/home           auto_home   -nobrowse,hidefromfinder
/Network/Servers    -fstab
/-              auto_nfs    -nosuid
/-          -static

這是我的 auto_nfs:

/build/mount1       -fstype=nfs,noowners,nolockd,noresvport,hard,bg,intr,ro,tcp,nfc nfs://<some hostname>:/mount1 
/build/mount2       -fstype=nfs,noowners,nolockd,noresvport,hard,bg,intr,ro,tcp,nfc nfs://<some hostname>:/mount2

當我用這個重新啟動 autofs 服務時須藤自動掛載-cv我收到以下訊息:

automount: /net updated
automount: /home updated
automount: /build/mount1 updated
automount: no unmounts

並且 mount2 沒有安裝在我的建置目錄下。如果我將 auto_nfs 中的順序改為 mount2 後接 mount1,那麼我只會安裝 mount2。

如果我把

/-              auto_nfs    -nosuid

在 auto_mount 末尾的行然後什麼都不起作用。

答案1

整理完所有內容後,我能夠解決我的問題。我給了我的自動nfs配置給我的一個同事。為了讓事情變得更簡單,我透過 Skype 發送配置。當他應用它時,一切對他來說都很順利。考慮到這一點,我重新創建了我的自動nfs使用我剛剛透過 Skype 發送的內容建立文件,然後我致電

須藤自動掛載-cv

再次一切正常。原始文件中的編碼和/或空格似乎有某種問題。

相關內容