Thursday, May 17, 2012

Detect tape drive after replacement HP-UX 11.31

There are two ways we can do this.

1. Complex way :)

root @ uxmemoirs01[/root]
#  ioscan -fnC tape
Class     I  H/W Path  Driver S/W State   H/W Type     Description
==================================================================
tape      0  3/0/12/1/0/4/0.36.17.255.0.0.0  stape   CLAIMED     DEVICE       HP      Ultrium 3-SCSI
                      /dev/rmt/0m             /dev/rmt/0mn            /dev/rmt/c23t0d0BEST    /dev/rmt/c23t0d0BESTn
                      /dev/rmt/0mb            /dev/rmt/0mnb           /dev/rmt/c23t0d0BESTb   /dev/rmt/c23t0d0BESTnb
tape      1  3/0/12/1/0/4/0.36.17.255.0.0.1  stape   CLAIMED     DEVICE       HP      Ultrium 3-SCSI
                      /dev/rmt/1m             /dev/rmt/1mn            /dev/rmt/c23t0d1BEST    /dev/rmt/c23t0d1BESTn
                      /dev/rmt/1mb            /dev/rmt/1mnb           /dev/rmt/c23t0d1BESTb   /dev/rmt/c23t0d1BESTnb
tape      5  3/0/14/1/0/4/0.35.17.255.0.0.1  stape   NO_HW       DEVICE       HP      Ultrium 3-SCSI
                      /dev/rmt/5m             /dev/rmt/5mn            /dev/rmt/c56t0d1BEST    /dev/rmt/c56t0d1BESTn
                      /dev/rmt/5mb            /dev/rmt/5mnb           /dev/rmt/c56t0d1BESTb   /dev/rmt/c56t0d1BESTnb
tape      6  3/0/14/1/0/4/0.35.17.255.0.0.2  stape   CLAIMED     DEVICE       HP      Ultrium 3-SCSI
                      /dev/rmt/6m             /dev/rmt/6mn            /dev/rmt/c56t0d2BEST    /dev/rmt/c56t0d2BESTn
                      /dev/rmt/6mb            /dev/rmt/6mnb           /dev/rmt/c56t0d2BESTb   /dev/rmt/c56t0d2BESTnb


Error in dmesg
class : lunpath, instance 332
Evpd inquiry page 83h/80h failed or the current page 83h/80h data do not match the previous known page 83h/80h data on LUN id 0x0 probed beneath the target path (class = tgtpath, instance = 28) The lun path is (class = lunpath, instance 332).Run 'scsimgr replace_wwid' command to validate the change

class : lunpath, instance 332
An attempt to probe existing LUN id 0x1000000000000 failed with errno of 14.

Get hardware path using Instance number

root @ uxmemiors01[/root]
# scsimgr -p get_attr -C lunpath -I 332 -a hw_path
3/0/14/1/0/4/0.0x100000e002235993.0x1000000000000

Get Lun H/W path , Lunpath H/W path, Legacy H/W path using above

root @ uxmemiors01[/root]
# ioscan -m hwpath -H 3/0/14/1/0/4/0.0x100000e002235993.0x1000000000000
Lun H/W Path      Lunpath H/W Path                 Legacy H/W Path
====================================================================
64000/0xfa00/0xa0
                  3/0/14/1/0/4/0.0x100000e002235993.0x1000000000000   3/0/14/1/0/4/0.35.17.255.0.0.1

Replace WWID using Lun H/W path

root @uxmemiors01[/root]
# scsimgr -f replace_wwid -H 64000/0xfa00/0xa0
scsimgr: Successfully validated binding of LUN paths with new LUN.

root @ uxmemiors01[/root]
# ioscan -fnC tape
Class     I  H/W Path  Driver S/W State   H/W Type     Description
==================================================================
tape      0  3/0/12/1/0/4/0.36.17.255.0.0.0  stape   CLAIMED     DEVICE       HP      Ultrium 3-SCSI
                      /dev/rmt/0m             /dev/rmt/0mn            /dev/rmt/c23t0d0BEST    /dev/rmt/c23t0d0BESTn
                      /dev/rmt/0mb            /dev/rmt/0mnb           /dev/rmt/c23t0d0BESTb   /dev/rmt/c23t0d0BESTnb
tape      1  3/0/12/1/0/4/0.36.17.255.0.0.1  stape   CLAIMED     DEVICE       HP      Ultrium 3-SCSI
                      /dev/rmt/1m             /dev/rmt/1mn            /dev/rmt/c23t0d1BEST    /dev/rmt/c23t0d1BESTn
                      /dev/rmt/1mb            /dev/rmt/1mnb           /dev/rmt/c23t0d1BESTb   /dev/rmt/c23t0d1BESTnb
tape      5  3/0/14/1/0/4/0.35.17.255.0.0.1  stape   CLAIMED     DEVICE       HP      Ultrium 3-SCSI
                      /dev/rmt/5m             /dev/rmt/5mn            /dev/rmt/c56t0d1BEST    /dev/rmt/c56t0d1BESTn
                      /dev/rmt/5mb            /dev/rmt/5mnb           /dev/rmt/c56t0d1BESTb   /dev/rmt/c56t0d1BESTnb
tape      6  3/0/14/1/0/4/0.35.17.255.0.0.2  stape   CLAIMED     DEVICE       HP      Ultrium 3-SCSI
                      /dev/rmt/6m             /dev/rmt/6mn            /dev/rmt/c56t0d2BEST    /dev/rmt/c56t0d2BESTn
                      /dev/rmt/6mb            /dev/rmt/6mnb           /dev/rmt/c56t0d2BESTb   /dev/rmt/c56t0d2BESTnb

root @ uxmemiors01[/root]



2. Simple way to accomplish the above

 Error in dmesg output

class : lunpath, instance 8
Evpd inquiry page 83h/80h failed or the current page 83h/80h data do not match the previous known page 83h/80h data on LUN id 0x0 probed beneath the target path (class = tgtpath, instance = 7) The lun path is (class = lunpath, instance 8).Run 'scsimgr replace_wwid' command to validate the change


# ioscan -fnC tape
Class     I  H/W Path  Driver S/W State   H/W Type     Description
==================================================================
tape      4  0/0/14/1/0/4/1.36.17.255.0.0.0  stape   CLAIMED     DEVICE       HP      Ultrium 3-SCSI
                      /dev/rmt/4m              /dev/rmt/4mn             /dev/rmt/c108t0d0BEST    /dev/rmt/c108t0d0BESTn
                      /dev/rmt/4mb             /dev/rmt/4mnb            /dev/rmt/c108t0d0BESTb   /dev/rmt/c108t0d0BESTnb
tape      5  0/0/14/1/0/4/1.36.17.255.0.0.1  stape   CLAIMED     DEVICE       HP      Ultrium 3-SCSI
                      /dev/rmt/5m              /dev/rmt/5mn             /dev/rmt/c108t0d1BEST    /dev/rmt/c108t0d1BESTn
                      /dev/rmt/5mb             /dev/rmt/5mnb            /dev/rmt/c108t0d1BESTb   /dev/rmt/c108t0d1BESTnb
tape      0  1/0/4/1/0/4/1.35.17.255.0.0.1   stape   NO_HW       DEVICE       HP      Ultrium 3-SCSI
                      /dev/rmt/0m             /dev/rmt/0mn            /dev/rmt/c19t0d1BEST    /dev/rmt/c19t0d1BESTn
                      /dev/rmt/0mb            /dev/rmt/0mnb           /dev/rmt/c19t0d1BESTb   /dev/rmt/c19t0d1BESTnb
tape      1  1/0/4/1/0/4/1.35.17.255.0.0.2   stape   CLAIMED     DEVICE       HP      Ultrium 3-SCSI
                      /dev/rmt/1m             /dev/rmt/1mn            /dev/rmt/c19t0d2BEST    /dev/rmt/c19t0d2BESTn
                      /dev/rmt/1mb            /dev/rmt/1mnb           /dev/rmt/c19t0d2BESTb   /dev/rmt/c19t0d2BESTnb


Replace wwid

# scsimgr -f replace_wwid -C lunpath -I 8
Binding of LUN path 1/0/4/1/0/4/1.0x100000e002235993.0x1000000000000 with new LUN validated successfully
# ioscan -fnC tape
Class     I  H/W Path  Driver S/W State   H/W Type     Description
==================================================================
tape      4  0/0/14/1/0/4/1.36.17.255.0.0.0  stape   CLAIMED     DEVICE       HP      Ultrium 3-SCSI
                      /dev/rmt/4m              /dev/rmt/4mn             /dev/rmt/c108t0d0BEST    /dev/rmt/c108t0d0BESTn
                      /dev/rmt/4mb             /dev/rmt/4mnb            /dev/rmt/c108t0d0BESTb   /dev/rmt/c108t0d0BESTnb
tape      5  0/0/14/1/0/4/1.36.17.255.0.0.1  stape   CLAIMED     DEVICE       HP      Ultrium 3-SCSI
                      /dev/rmt/5m              /dev/rmt/5mn             /dev/rmt/c108t0d1BEST    /dev/rmt/c108t0d1BESTn
                      /dev/rmt/5mb             /dev/rmt/5mnb            /dev/rmt/c108t0d1BESTb   /dev/rmt/c108t0d1BESTnb
tape      0  1/0/4/1/0/4/1.35.17.255.0.0.1   stape   CLAIMED     DEVICE       HP      Ultrium 3-SCSI
                      /dev/rmt/0m             /dev/rmt/0mn            /dev/rmt/c19t0d1BEST    /dev/rmt/c19t0d1BESTn
                      /dev/rmt/0mb            /dev/rmt/0mnb           /dev/rmt/c19t0d1BESTb   /dev/rmt/c19t0d1BESTnb
tape      1  1/0/4/1/0/4/1.35.17.255.0.0.2   stape   CLAIMED     DEVICE       HP      Ultrium 3-SCSI
                      /dev/rmt/1m             /dev/rmt/1mn            /dev/rmt/c19t0d2BEST    /dev/rmt/c19t0d2BESTn
                      /dev/rmt/1mb            /dev/rmt/1mnb           /dev/rmt/c19t0d2BESTb   /dev/rmt/c19t0d2BESTnb
#

No comments:

Post a Comment