Working with vSCSI: Best practices
It is important that you understand the following information when working with virtual SCSI (vSCSI) attached storage.
It is recommended that you adhere to the following best practices when using vSCSI attached
storage.
- After a volume is attached to a virtual machine, log onto that virtual machine
and discover the disk by running the appropriate command:
- On AIX®, run
cfgmgr
. - On Linux®, run
ls /sys/class/scsi_host/ | while read host ; do echo "- - -" > /sys/class/scsi_host/$host/scan ; done
- On AIX®, run
- Before you detach a volume from a virtual machine, that virtual machine should stop using the disk device for the volume. If a file system is mounted on the disk device on the virtual machine, that file system should first be unmounted and the disk device closed.
- After you detach a volume from the virtual machine, a disk device is left on the virtual
machine. This device can be removed by running the appropriate command:
- On AIX, run
rmdev -l hdisk
. - On Linux, run this command, where
device-name is the name of the disk to
delete.
echo 1 > /sys/block/<device-name>/device/delete
- On AIX, run
- Turn off disconnected ports. Using disconnected Fibre Channel ports for vSCSI
operations might cause volume attach or detach operations to take longer because the Virtual I/O Servers might try
to discover the attached volume on the disconnected ports. To turn off ports, follow these steps:
- From the PowerVC user interface, select .
- For each port you want to turn off, select None for Connectivity.
- After making all necessary changes, click Save.
-
Run the following command on each Virtual I/O Server. This command tells the Virtual I/O Server to use all available paths to send I/O requests. The default setting is
failover
, which means that Virtual I/O Server uses a single path until it fails.chdef -a algorithm=round_robin -c PCM -s friend -t fcpother
- To detect failures in the Fibre Channel fabric faster, run the following command on each Virtual I/O Server for each
Fibre Channel adapter:
chdev -l fscsiX -a fc_err_recov=fast_fail
- To detect when Fibre Channel cables are moved, the following command should be run on each Virtual I/O Server for each
Fibre Channel adapter:
chdev -l fscsiX -a dyntrk=yes