Thanks for these scripts...
I ran it against our clusters and because we have some LUNs mapped to the cluster but not used as vmfs or rdms we got odd results. Basically we got false positives on one of the if statements causing the wrong volume name etc...
I have reversed the test to a negative test and this seems to have sorted the issue. The clip below doesnt do anything is positive however you might want to set the Volume name to "Unused" or something.
if ($vol.extent | % { $_.diskname -ne $Lun.CanonicalName}) {
#Do Nothing
} ELSE {
$objVolume.VolumeName = $vol.Name
$objVolume.BlockSizeMb = $vol.BlockSizeMb
$objVolume.VMFSVersion = $vol.Version
$objVolume.VolumeType = $vol.Type
}
Thanks again
Regards
Mark