Tanti Technology

My photo
Bangalore, karnataka, India
Multi-platform UNIX systems consultant and administrator in mutualized and virtualized environments I have 4.5+ years experience in AIX system Administration field. This site will be helpful for system administrator in their day to day activities.Your comments on posts are welcome.This blog is all about IBM AIX Unix flavour. This blog will be used by System admins who will be using AIX in their work life. It can also be used for those newbies who want to get certifications in AIX Administration. This blog will be updated frequently to help the system admins and other new learners. DISCLAIMER: Please note that blog owner takes no responsibility of any kind for any type of data loss or damage by trying any of the command/method mentioned in this blog. You may use the commands/method/scripts on your own responsibility. If you find something useful, a comment would be appreciated to let other viewers also know that the solution/method work(ed) for you.

Saturday, 20 June 2015

VIO scsi

Contents

·         1 Get a list of scsi adapters
·         2 Get SCSI Mapping
·         3 get list of disks
·         4 Get the size of the disk
·         5 Get the LUN id of the disk
·         6 Get the VPD of the disk
·         7 Change the reserve policy
·         10 (Optional) create an LPAR

Get a list of scsi adapters

$ lsdev -type adapter
name             status      description
ent0             Available   2-Port 10/100/1000 Base-TX PCI-Express Adapter (14104003)
ent1             Available   2-Port 10/100/1000 Base-TX PCI-Express Adapter (14104003)
ent2             Available   Virtual I/O Ethernet Adapter (l-lan)
ent3             Available   Shared Ethernet Adapter
fcs0             Available   8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
fcs1             Available   8Gb PCI Express Dual Port FC Adapter (df1000f114108a03)
pager0           Available   Pager Kernel Extension
vasi0            Available   Virtual Asynchronous Services Interface (VASI)
vbsd0            Available   Virtual Block Storage Device (VBSD)
vhost0           Available   Virtual SCSI Server Adapter
vsa0             Available   LPAR Virtual Serial Adapter
$ lsdev -virtual | grep -i scsi
vhost0           Available   Virtual SCSI Server Adapter

Get SCSI Mapping

$ lsmap -all
SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost0          U8233.E8B.1000A1P-V7-C12                     0x00000000
 
VTD                   NO VIRTUAL TARGET DEVICE FOUND
 
$

get list of disks

$ lsdev -type disk
name             status      description
hdisk0           Available   MPIO Other FC SCSI Disk Drive
hdisk1           Available   MPIO Other FC SCSI Disk Drive
hdisk2           Available   MPIO Other FC SCSI Disk Drive
hdisk3           Available   MPIO Other FC SCSI Disk Drive
hdisk4           Available   MPIO Other FC SCSI Disk Drive
hdisk5           Available   MPIO Other FC SCSI Disk Drive
hdisk6           Available   MPIO Other FC SCSI Disk Drive
hdisk7           Available   MPIO Other FC SCSI Disk Drive
$
we will use hdisk1 for this example

Get the size of the disk

echo "bootinfo -s hdisk1 " | oem_setup_env

Get the LUN id of the disk

$ lsdev -dev hdisk1 -attr
attribute       value                                               description                      user_settable
 
PCM             PCM/friend/fcpother                                 Path Control Module              False
algorithm       fail_over                                           Algorithm                        True
clr_q           no                                                  Device CLEARS its Queue on error True
dist_err_pcnt   0                                                   Distributed Error Percentage     True
dist_tw_width   50                                                  Distributed Error Sample Time    True
hcheck_cmd      test_unit_rdy                                       Health Check Command             True
hcheck_interval 60                                                  Health Check Interval            True
hcheck_mode     nonactive                                           Health Check Mode                True
location                                                            Location Label                   True
lun_id          0x1000000000000                                     Logical Unit Number ID           False
lun_reset_spt   yes                                                 LUN Reset Supported              True
max_retry_delay 60                                                  Maximum Quiesce Time             True
max_transfer    0x40000                                             Maximum TRANSFER Size            True
node_name       0x500507680100b855                                  FC Node Name                     False
pvid            none                                                Physical volume identifier       False
q_err           yes                                                 Use QERR bit                     True
q_type          simple                                              Queuing TYPE                     True
queue_depth     1                                                   Queue DEPTH                      True
reassign_to     120                                                 REASSIGN time out value          True
reserve_policy  single_path                                         Reserve Policy                   True
rw_timeout      30                                                  READ/WRITE time out value        True
scsi_id         0x4d0d25                                            SCSI ID                          False
start_timeout   60                                                  START unit time out value        True
unique_id       3321360050768019102C0F000000000032F7904214503IBMfcp Unique device identifier         False
ww_name         0x500507680140b855                                  FC World Wide Name               False
Note the 'lun_id' value.

Get the VPD of the disk

$ lsdev -dev hdisk1 -vpd
  hdisk1           U5877.001.M09J131-P1-C6-T1-W500507680140B855-L1000000000000  MPIO Other FC SCSI Disk Drive
 
        Manufacturer................IBM
        Machine Type and Model......2145
        ROS Level and ID............30303030
        Serial Number...............2145
        Device Specific.(Z0)........0000063268181002
        Device Specific.(Z1)........
        Device Specific.(Z2)........
        Device Specific.(Z3)........
 
 
  PLATFORM SPECIFIC
 
  Name:  disk
    Node:  disk
    Device Type:  block
 

Change the reserve policy

$ chdev -dev hdisk1 -attr reserve_policy=no_reserve
hdisk1 changed
verify
$ lsdev -dev hdisk1 -attr | grep -i reserve_policy
reserve_policy  no_reserve                                          Reserve Policy                   True

Create a Virtual target device

$ mkvdev -vdev hdisk1 -vadapter vhost0 -dev sys414_lpar7
sys414_lpar7 Available
Details
§  -vdev -- the backing devic for the vdev
§  -vadapter -- the virtual adapter on the VIO to bind the vscsi disk
§  -dev -- the virtual device name that you want to assign

get the device mapping details

$ lsmap -vadapter vhost0
SVSA            Physloc                                      Client Partition ID
--------------- -------------------------------------------- ------------------
vhost0          U8233.E8B.1000A1P-V7-C12                     0x00000000
 
VTD                   sys414_lpar7
Status                Available
LUN                   0x8100000000000000
Backing device        hdisk1
Physloc               U5877.001.M09J131-P1-C6-T1-W500507680140B855-L1000000000000

(Optional) create an LPAR

Create an LPAR.. Follow the Wizzard...

When it asks for the virtual devices.. create a new Vitual SCSI device. Assign the server's virtual SCSI ID to this Virtual SCSI's 'Server Adapter id'
Example:



No comments:

Post a Comment