In most cases you will add VMFS volumes (LUNs) to your vSphere environment, because most of the time your environment will grow. Adding a LUN is very simple: Just configure the masking correctly on your SAN, carry out a rescan on your ESXi server (or the entire cluster) and voilá you have your LUN/volume available.
But what about removing a LUN from your environment. This is a bit more tricky, you have to think about:
- No virtual machines are using the LUN you want to remove. The LUN should not be used as a RDM;
- The LUN should not be a part of a datastorecluster and storage DRS should not be active on the LUN;
- Storage IO Control should be disabled for the LUN;
- The LUNs should not be used as a HA heartbeat datastore;
- And the LUN should not be used as persistent scratch partition.
On top of that, you cannot just remove the LUN, even when it’s not used anymore by virtual machines. It’s very important to first unmount the LUN and then detach the LUN from your ESXi server.
Luckily VMware described a clear procedure in the following two KB articles:
- Removing a LUN containing a datastore from VMware ESXi/ESX 4.x – KB 1029786
- Unpresenting a LUN in ESXi 5: KB 2004605
It’s very important that you follow this procedure to prevent an All Paths Down (APD) situation on your ESXi server. APD may result in a non-responsive hostd deamon, especially on ESXi 4.
2 Comments
osama
I have 2 hosts esxi 5, the scenario for both the second is mirror for first one so I have Vm1 database on host1, and Vm2 database on the host2, and there is FC connection to SAN storage already I created LUN0 TB and my question how can add this Lun0 for both VM1,2 database and make clustering on that storage.
viktorious
I would suggest to read this document:
http://pubs.vmware.com/vsphere-55/topic/com.vmware.ICbase/PDF/vsphere-esxi-vcenter-server-55-setup-mscs.pdf