esx沒法刪除lun處理

esx沒法刪除lun處理
esx沒法刪除lun處理

上述操做建議在維護模式下操做,操做前重啓esxi。若是失敗再次重啓esxi。
若是仍是刪除不掉,能夠將硬盤拔下,安裝到其餘服務器上進行清除分區。而後安裝回原服務器,若是發現自動掛載,請進行重啓esxi,掛載會自動取消。服務器

上述環境是在vsan集羣的esxi。app

參考文檔
Cannot remove datastore because file system is busy.
時間 2014-02-04 03:40:33 Virten
原文
  http://www.virten.net/2014/02/cannot-remove-datastore-because-file-system-is-busy/
主題 文件系統 vSphere
The following error message appears when you try to delete or unmount a VMFS datastore:
The resource Datastore Name:
VMFS uuid: is in use.
Cannot remove datastore ‘Datastore Name:
VMFS uuid: *’ because file system is busy. Correct the problem and retry the operation.

ESXi 5.5 has a new feature to store coredumps in a file residing on a datastore. It may sometimes create this file automatically and thus blocking datastores from being deleted.
Check for dump files. You can run this command from any ESXi host with access to the datastore:
~ # esxcli system coredump file list
Path Active Configured Sizeide


/vmfs/volumes/Datastore/vmkdump/684938663845.dumpfile false false 1714421760
/vmfs/volumes/Datastore/vmkdump/684938663233.dumpfile false false 1714421760
/vmfs/volumes/Datastore/vmkdump/684938663533.dumpfile false false 1714421760
The output shows that I have 3 dump files which are blocking my datastore. Only the owning ESXi host can disable and delete them, so you have to find out which ESXi is responsible for each file:
~ # vmkfstools -D /vmfs/volumes/Datastore/vmkdump/684938663845.dumpfile
Lock [type 10c00001 offset 200392704 v 10, hb offset 3875328
gen 3, mode 1, owner 52ebd042-43b191f0-0173-005056871792 mtime 250
num 0 gblnum 0 gblgen 0 gblbrk 0]
Addr <4, 447, 0>, gen 1, links 1, type reg, flags 0, uid 0, gid 0, mode 600
len 1714421760, nb 1635 tbz 0, cow 0, newSinceEpoch 1635, zla 3, bs 1048576
You can see the UUID from the ESXi host that has locked the file. (Side note: The last part of the UUID is determined by the MAC address of vmnic0. 005056871792 = 00:50:56:87:17:92). To quickly identify the host, you can use the following PowerCLI Script to list all ESXi hosts, with their UUID:
Get-View -ViewType HostSystem -Propert Name, hardware.systeminfo | select { $.name, $.hardware.systeminfo.uuid }
To remove the coredump file, connect to the ESXi host with SSH and use the esxli system coredump file remove command. This will remove the configured active coredump file:
~ # esxcli system coredump file remove --force
If you have many hosts, you can also use this little PowerCLI script to quickly remove all coredump files. You have to be connected to the vCenter:
Get-VMHost | % {
$esxcli = get-esxcli -vmhost $_
$esxcli.system.coredump.file.remove($null, $true)
}
If the coredump file was not the reason for the lock, use the following checklist to ensure that the datastore can be removed properly:
LUN removal checklist
No virtual machine, template, snapshot or CD/DVD image resides on the datastore
The datastore is not part of a Datastore Cluster
Storage I/O Control is disabled for the datastore
The datastore is not used for vSphere HA heartbeat
The LUN is not used as a RDM
The Datastore is not used as a scratch location
The Datastore is not used as VMkernel Dump file location (/vmkdump/)
The Datastore is not used as active vsantraced location (/vsantrace/)
VMware KB2004605 also assists on removing datastores in ESXi 5.xui

相關文章
相關標籤/搜索