查看該卷狀態:ide
# esxcli storage filesystem list日誌
在iscsi出錯後在esxi中看到的存儲狀態以下:進程
Mount Point Volume Name UUID Mounted Type Size Free ------------------------------------------------- ----------- ----------------------------------- ------- ------ -------------- -------------- /vmfs/volumes/5d4bc70c-70355d08-734b-d09466821f5e iscsi-storage 5d4bc70c-70355d08-734b-d09466821f5e true VMFS-6 0
恢復步驟以下:ci
1. 要查看但願移除的數據存儲所在的 LUN 的惟一標識符,請運行如下命令:
get
# esxcfg-scsidevs -m
2. 卸載該卷it
# esxcli storage filesystem unmount [-u UUID | -l label | -p path ]
例如,使用如下命令之一卸載 LUN01 數據存儲:
class
# esxcli storage filesystem unmount -l LUN01 # esxcli storage filesystem unmount -u 4e414917-a8d75514-6bae-0019b9f1ecf4 # esxcli storage filesystem unmount -p /vmfs/volumes/4e414917-a8d75514-6bae-0019b9f1ecf4
注意:若是嘗試卸載的 VMFS 文件系統具備活動 I/O 或還沒有知足卸載 VMFS 數據存儲的必備條件,則會在 VMkernel 日誌中顯示以下錯誤:
cli
WARNING:VC:637: unmounting opened volume ('4e414917-a8d75514-6bae-0019b9f1ecf4' 'LUN01') is not allowed. VC:802: Unmount VMFS volume f530 28 2 4e414917a8d7551419006bae f4ecf19b 4 1 0 0 0 0 0 :Busy
出現上述錯誤須要查看該卷正在使用的進程,使用以下命令:
sed
# vsish -e ls /storage/scsifw/devices/naa.6842b2b00066caec000084bb4f7e9e4e/worlds/ |sed 's:/::' |while read i;do ps |grep $i;done
結束正在使用該卷的進程, 使用上述命令從新卸載該卷file
使用以下命令從新掃描ISCSI存儲卷:
# esxcli storage core adapter rescan --all
從新查看全部卷狀態:
# esxcli storage filesystem list
全部卷狀態正常