Redirect the Legacy / persistent device paths : How to ??

Scenario: Replace a failed disk on server where legacy path is used in server. After replace the disk we used to get new disk path (old- c0t0d0 ..and new disk path - c0t1d0)..at this situation we need to redirect the path to old one. 

If it is legacy path then we need to run the below commands


# sasmgr replace_tgt -D /dev/sasd0 -q old_dev=old_disk_path -q new_tgt_hwpath=newdisk_ hw_path

   (Ex :  sasmgr replace_tgt -D /dev/sasd0 -q old_dev=/dev/dsk/c0t1d0 -q new_tgt_hwpath=0/2/1/0.0.0.3.0)
and then once the new disk is rerouted use the below commands to remove the old paths 

# scsimgr replace_leg_dsf -D /dev/rdsk/c0t1d0  (consider /c0t1d0 is the old disk path)
# scsimgr replace_wwid -D /dev/rdisk/disk2  (consider the disk2 is the old Persistent path)



=========================


For Persistent Path:

If it is the Volume group -  the disk is added with persistent device path then we need to use the below command to redirect the disk paths

#ioscan -m lun  (to get the new lun path for new disk)

#io_redirect_dsf -d old_disk_path -n new_disk_path

 Ex : io_redirect_dsf  -d /dev/disk/disk2 -n /dev/disk/disk32
     (it will change the new path)




0 comments:

Post a Comment

Blogger Tips and TricksLatest Tips And TricksBlogger Tricks