Thursday, June 19, 2008

VMWare ESX lunreset cliffnotes

We had a path failover that caused one of the ESX boxes to not be happy with one of the LUNs (shown as zero bytes in VIC).
Cliffnotes as to what the steps were to remedy it. *This worked fine on our environment with other ESX hosts in the cluster actively using this LUN with running windows and linux guests. Posts in the vmware forum have a warning that this could hoze you. I agree to tread lightly with these commands (I called vmware for the below solution, I didn't want my head on the chopping block if an oracle vm crashed).

Find the LUN that is showing 0.00B:

    71  esxcfg-vmhbadevs
  72  ls /vmfs/devices/disks/

Kick it while watching it's progress:

77  vmkfstools -L lunreset /vmfs/devices/disks/vmhba0:1:1:0
  78  tail vmkernel
  79  vmkfstools -L targetreset /vmfs/devices/disks/vmhba0:1:1:0
  80  tail vmkernel
  81  vmkfstools -L busreset /vmfs/devices/disks/vmhba0:1:1:0
  82  tail vmkernel

Make sure it's there in one spot:
  83  esxcfg-vmhbadevs
  84  less vmkernel

rescan to find it in another:
  85  esxcfg-rescan vmhba0

In VIC, refresh on storage page (not rescan on storage controllers) to have it
really available to the host.

1 comment:

  1. Associated with this problem is guest VMs showing as invalid in VIC.
    452 service vmware-vpxa status
    453 service vmware-vpxa restart
    454 service mgmt-vmware status
    455 service mgmt-vmware restart
    456 service mgmt-vmware status

    I'm pretty sure restarting the mgmt-vmware is the service that needs bumped to make it work, more testing needed.