Just wanted to do a quick post about Unisphere showing LUN in two pools after migrating LUN from one pool to another. There is also a quick fix for it: close your browser window and log back in to Unisphere. This small glitch rose my blood pressure for a while and I already started thinking through all kinds of data corruption issues that it might cause.
Here is what happened: I have two pools, Pool 0 and Pool 1. Using Unisphere GUI I migrated LUN from Pool 0 to Pool 1 and the migration went throught just fine. After the migration I noticed that the migrated LUN was showing up in both pools. I tried refreshing both ‘Pools’ and ‘Detailed’ views, I also went to different tabs and back to the ‘Pools/RAID Groups’ view and refreshed views again. LUN was still in both pools. Properties for that specific LUN were identical on both pools. Luckily closing the browser window and logging back in to Unisphere solved this issue.
I’ve been using Unisphere since FLARE 30 was released and haven’t seen this kind of behaviour before. I’ve seen Unisphere to hang (just showing white screen) and crash several times but nothing like this has ever happened.
Have you ever lost a file that you certainly didn’t delete? Well that might happen with vmdk-files if datastore is not unpresented and virtual disk deleted in the right order.
Lets say that you have a virtual machine with two virtual disks in two different datastores; vmfs_a and vmfs_b. You then unpresent from ESX the LUN containing vmfs_b and vmdk-file of hard disk 2. After the LUN is unpresented the second virtual disk (which is still visible on vm’s settings) is pointing to the first virtual disk’s vmdk. So if you now remove the second virtual disk with the option ‘remove from virtual machine and delete files from disk’ it actually deletes the vmdk of the first virtual disk.
Vm with two virtual disks:
After unpresenting the datastore vmfs_b from ESX the second virtual disk’s disk file is pointing to the first virtual disk’s vmdk:
Removing ‘hard disk 2’ from vm with option ‘Remove from virtual machine and delete from disk’:
After removing the second virtual disk the first virtual disk still points to its original location:
When browsing to the vmfs_a datastore the test-vm.vmdk file is no longer there:
It’s this easy to unintentionally delete the wrong vmdk-file. So before unpresenting LUN from ESX make sure that the datastore is empty to avoid this kind of a situation. I would also suggest masking LUN before unpresenting it because all paths-down condition might occur when LUN is unpresented without masking.
VMware kb about all paths-down condition:
VMware kb about unpresenting LUN from ESX: