刪除 ESXi 中無效的 NFS 設定檔

中午本來想在存儲伺服器上看看 rsync 的記錄,結果意外地在 /var/log/messages 裏看到了一坨 NFS 連線失敗的日誌:

Jan 27 16:48:01 storage-01 mountd[2341]: mount request denied from 192.168.55.2 for /mnt/STAGE_LSI_Pool
Jan 27 16:48:31 storage-01 mountd[2341]: mount request from 192.168.55.2 for non existent path /mnt/STAGE_LSI_Pool

這個 STAGE_LSI_Pool 是一個很古老的池,看名字就知道早已經放棄不用了。日誌中報的 192.168.55.2 是 ESXi 在存儲網路中的 IP 位置,所以第一反應是去 ESXi Web Console 中看存儲相關的設定,然而並沒有看到這個已經被棄用的 NFS 掛載點。聯想到最開始建置 ESXi 時確實有使用過這個存儲池,於是打算直接 SSH 到 ESXi 內解決問題。首先用 ESXCLI 看一下資料存儲:

[root@vmx-1:~] esxcli storage nfs list
Volume Name     Host          Share                       Accessible  Mounted  Read-Only   isPE  Hardware Acceleration
--------------  ------------  --------------------------  ----------  -------  ---------  -----  ---------------------
NFS VM Storage  192.168.55.1  /mnt/SAKURAGAWA_POOL_1/VMs        true     true      false  false  Not Supported
NAS             192.168.55.1  /mnt/SAKURAGAWA_POOL_1/NAS        true     true      false  false  Not Supported

並沒有看到相關的卷,那麼直接找相關的設定檔吧。一般來說,Linux 下的 NFS 設定會寫在 /etc/fstab 或者 AutoFS 內。然而 ESXi 雖然看起來像 Linux,卻與標準 Linux 區別甚大:它既沒有 fstab,也沒找到對應 NFS 的設定檔案。。一番瞎猜搜尋無果後,乾脆直接 grep。

[root@vmx-1:~] grep -rn STAGE_LSI_Pool /etc/
/etc/vmware/esx.conf:246:/nas/VM ISO/share = "/mnt/STAGE_LSI_Pool/NAS/Systems"

果然找到了對應的設定檔案,打開之後發現 242-246 行有相關的設定:

/nas/VM ISO/readOnly = "false"            
/nas/VM ISO/host = "192.168.55.1"                           
/nas/VM ISO/enabled = "true"                                           
/nas/VM ISO/share = "/mnt/STAGE_LSI_Pool/NAS/Systems"

刪除了事。考慮到還有資料存儲在 NFS 上,暫時先不重啓 NFS 服務了,就當作垃圾清理好了。

Comments

發佈留言

發佈留言必須填寫的電子郵件地址不會公開。 必填欄位標示為 *

This site uses Akismet to reduce spam. Learn how your comment data is processed.

To respond on your own website, enter the URL of your response which should contain a link to this post’s permalink URL. Your response will then appear (possibly after moderation) on this page. Want to update or remove your response? Update or delete your post and re-enter your post’s URL again. (Find out more about Webmentions.)