When trying to troubleshoot storage issues like, SAN, iSCSI, etc. it may be necessary to increase the logging levels for these components on the ESX host. An increase to logging causes the system to write more detailed information in the logs which may be helpful in diagnosing or troubleshooting.
Warning: When increasing logging, the log file sizes increase at a more rapid rate. Ensure that you have adequate disk space to accommodate the extra messages that are logged.
ESX 3.5
To enable the logging of SCSI command errors, aborts, and multi-pathing (at the VMkernel level):
-
Connect to the ESX host with the VMware Infrastructure Client or VirtualCenter.
-
Click the ESX host.
-
Click the Configuration tab.
-
Click Advanced. This creates a new window.
-
Click SCSI to expand the SCSI options tree.
-
Change scsi.PrintCmdErrors to 1 .
-
Change scsi.LogAborts to 1.
-
Change scsi.LogMultiPath to 1.
This procedure does not require a reboot.
To increase Service Console SCSI logging levels, a dd a boot parameter to COS. In /boot/grub/grub.conf, add scsi_logging_level=6 to the kernel line either immediately before or after the root= entry.
For example:
title VMware ESX Server
#vmware:autogenerated esx
root (hd0,0)
uppermem 277504
kernel --no-mem-option /vmlinuz-2.4.21-47.0.1.ELvmnix ro root=UUID=51beafbf-b273-4195-9a2c-04dd3b7d7786 scsi_logging_level=6 mem=272M
initrd /initrd-2.4.21-47.0.1.ELvmnix.i
Modifying grub.conf requires a reboot to take affect.
ESX/ESXi 4.x
In ESX/ESXi 4.x there are 4 logging settings:
Setting | Default value (1=enabled) | Description |
Scsi.LogCmdErrors | 1 | Log SCSI Device command errors |
Scsi.LogMPCmdErrors | 1 | Log SCSI Multi-path plugin command errors |
Scsi.MaxReserveBacktrace | 0 | Log a backtrace if caller exceeds SCSI_MAX_RESERVE_TIME or SCSI_MAX_RESERVE_TOTALTIME (debug only) |
Scsi.ReserveBacktrace | 0 | Log a backtrace for all Reserve/Release pairs (debug only) |
Scsi.LogCmdErrors and Scsi.LogMPCmdErrors are enabled by default. Scsi.MaxReserveBacktrace and Scsi.ReserveBacktrace are for debug purposes only. Unlike in ESX 3.x, you do not need to modify these settings to increase storage logging.
To view the settings:
-
Connect to the ESX host with the vSphere Client or vCenter Server.
-
Click the ESX host.
-
Click the Configuration tab.
-
Click Advanced. This creates a new window.
-
Click SCSI to expand the SCSI options tree.