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.

Sunday 17 November 2013

HOWTO: DISK MAPPING TO CLIENT FROM DUAL VIOS USING VSCSI AND MPIO

Pre-Checks:

  • Update the adapter settings:
   # chdev -l fscsi0 -a fc_err_recov=fast_fail 
   # chdev -l fscsi0 -a dyntrk=yes
  • Make sure that exported Lun exported from SAN should be available  in both the VIOS which is going to be mapped to client lpar through vscsi.
  • Set reserve_lock  to no for the disk which was added in both the vios from SAN.
    Use the below commands to set it to no

   #chdev -l hdisk1 -a reserve_lock=no   
   #chdev -l hdisk1 -a reserve_lock=no  -P 
   #
  • Pre-check  whether disk was by mistakenly  used in any other client already 
     #lqueryvg -Atp hdisk1

     root@vio1:/ #lqueryvg -Atp hdisk1
     0516-320 lqueryvg: Physical volume hdisk1 is not  
      asigned   to  a volume group.
     0516-066 lqueryvg: Physical volume is not a volume group            member.
     Check the physical volume name specified.
     root@vio1:/ #


Map the disk to the client from both the  vios 
check the diagram

















vioa

#mkvdev -vdev hdisk1 -vadapter vhost1 -dev myvio1clivtd

Viob 

#mkvdev -vdev hdisk2 -vadapter vhost1 -dev myvio2clivtd


Now in client:


Run config manager 

#cfgmgr 

root@cli1:/ #lspv
hdisk0          0004a256f06e0c6e      rootvg        active
hdisk1          0004a25613b2835f      datavg
hdisk2          0004a25613b287f1      datavg
hdisk3          0004a2561dc9d8bd      datavg
hdisk4          0004a2561dd57f15      datavg
hdisk5          0004a2561da57f16      None
root@cli1:/ #


Check the paths 


root@orange-lpar:/ #lspath -l hdisk5
Enabled hdisk5 vscsi1
Enabled hdisk5 vscsi2



Check the path priorities

 # lspath -AE -l hdisk5 -p vscsi1
   priority 1 Priority True
 # lspath -AE -l hdisk5 -p vscsi2
   priority 1 Priority True

set path which was  from  viob to 2

 # chpath -l hdisk5 -a priority=1 -p vscsi1
 # chpath -l hdisk5 -a priority=2 -p vscsi2

Its done now ...

No comments:

Post a Comment