Monday, June 11, 2012

ESX host Maintenance mode from ESX CLI

1) login to ESX host to execute below.


To enter Maintenance Mode, at the ESX console:
vimsh -n -e /hostsvc/maintenance_mode_enter

To exit Maintenance Mode :
vimsh -n -e /hostsvc/maintenance_mode_exit

To display whether the ESX Server is currently in maintenance mode or not type:
vimsh -n -e"hostsvc/hostsummary" | grep inMaintenanceMode

Using system libcrypto, version 90810F
inMaintenanceMode = false

(False - means "not in maintenance mode" / True - Means "in maintenance mode") 

Failed write command to write-quiesced partition

ESX box may see below errors, due to some storage box side issues.
you may observe mostly on all the ESX hosts of the VC Cluster - kind of below errors.

ALERT: ScsiDeviceIO: 2352: Failed write command to write-quiesced partition naa.50a9800064656c5a4a5a654e35594123:1 
Extract from /var/log/vmkernel - below
/var/log/vmkernel cpu21:4342)NMP: nmp_CompleteCommandForPath: Command 0x2a (0x4102ff3ac040) to  NMP device "naa.50a9800064656c5a4a5a654e35594123" failed on physical path "vmhba1:C0:T1:L1" H:0x8 D:0x0 P:0x0 Possible sense data: 0x0 0x0 0x0.

/var/log/vmkernel cpu21:4342)WARNING: NMP: nmp_DeviceRequestFastDeviceProbe:
NMP device "naa.50a9800064656c5a4a5a654e35594123" state in doubt; requested fast path state update...

/var/log/vmkernel cpu21:4342)ScsiDeviceIO: 1672: Command 0x2a to
device "naa.50a9800064656c5a4a5a654e35594123" failed H:0x8 D:0x0 P:0x0 Possible sense data: 0x0 0x0 0x0.

Solution
There may be nothing much on ESX side to resolve these errors, Involve your storage vendor to solve this - refer at below VMware KB for more details.

http://kb.vmware.com/selfservice/microsites/search.do?language=en_US&cmd=displayKC&externalId=2009482

How to identify your DATA STORE name from NAA ID - Example below
# esxcfg-scsidevs -m | grep -i "naa.50a9800064656c5a4a5a654e35594123"

How to identify you LUN ID from Data Store Name
Select ESX at VC - configuration - storage - right click - Properties