Thursday, January 17, 2013

Virtual SCSI - PowerVM

Commands for VIO Server : 

To view the current reserve policy of a disk :
# lsdev -dev hdisk2 -attr reserve_policy

To set the reservice policy of a disk :
# chdev -dev hdisk2 -attr reserve_policy=no_reserve -P

To view the current values of all the attribtues of a FC adapter :
# lsdev -dev fcs0 -attr

To modify the attributes of a FC adapter :
# chdev -dev fcs0 -attr fc_err_recov=fast_fail dyntrk=yes -P

To map a disk to a Virtual Server SCSI adapter :
# mkvdev -vdev hdisk2 -vadapter vhost0 -dev lpar1_vtd

Note: "-dev lpar1_vtd" is an option to specify the VTD name.
If not specified, it would take a default name.

To unmap a disk fro a Virtual Server SCSI adapter (Technically removing a VTD device) :
# rmvdev -vtd lpar1_vtd

To list all the backing device and Virtual Server SCSI adapter mapping :
# lsmap -all

To list all the backing devices mapped to a Virtual Server SCSI adapter :
# lsmap -vadapter vhost0


Commands for AIX sever :

To list the atttributes of a virtual disk :
# lsattr -El hdisk0

To set the necessary attributes of a virtual disk :
# chdev -l hdisk0 -a hcheck_mode=nonactive hcheck_interval=20 algorithm=fail_over

To list all the paths for the virtual disks :
# lspath

To list the parent device of a virtual disk :
# lsparent -CH -l hdisk1

To display more details for virtual disks :
# lspath -H -F "status name parent path_id connection"

No comments: