пятница, 20 ноября 2015 г.

HP-UX переопределение драйва ленточной библиотеки после его замены

Вышел из строя драйв на ленточной библиотеке, после замены упорно не хочет определятся в операционной системе.

# 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


В 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.


Получим адрес устройства используя номер инстанса.

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


Получаем Lun H/W path, Lunpath H/W path, Legacy H/W .

# 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



Переопределяем WWID используя Lun H/W path.

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



Проверяем.

# 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

Описанную выше последовательность действий можно сократить.

Ошибка в dmesg.

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

NO_HW в ioscan.

# 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



Переопределяем 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


Оригинал статьи тут.