由Unable to open device 的 想到 (删除 库的操作)

今天在原来有库的 tsm 上有建了一个库,重新启动tsm ,发现问题了:

 

ANR8840E Unable to open device /dev/tsmscsi/lb0 with file handle 16.
ANR8440E Initialization failed for SCSI library VTL02; will retry in 2 minute(s).
ANR8840E Unable to open device /dev/tsmscsi/lb0 with file handle 6.
ANR8440E Initialization failed for SCSI library VTL01; will retry in 2 minute(s).

而且: tsm:> show slots vtl01, 还有show slots vtl02 也没有任何信息。

 

原因是 库中只有一个机械臂, /dev/tsmscsi/lb0, 所以,只能建一个库:

 

删除一个带库,碰到问题,
发现要先删除 path

删除path 的是时候, 要删除 library path 和 drive path:

看一下原来的:

TSM:TSM_SVR1>
q path
ANR2017I Administrator SERVER_CONSOLE issued command: QUERY PATH

Source Name     Source Type     Destination     Destination     On-Line
                                Name            Type           
-----------     -----------     -----------     -----------     -------
TSM_SVR1        SERVER          VTL01           LIBRARY         Yes   
TSM_SVR1        SERVER          DRV1            DRIVE           Yes   
TSM_SVR1        SERVER          DRV2            DRIVE           Yes   
TSM_SVR1        SERVER          DRV3            DRIVE           Yes   
TSM_SVR1        SERVER          DRV4            DRIVE           Yes   
TSM_SVR1        SERVER          VTL02           LIBRARY         Yes   
TSM_SVR1        SERVER          DRV1            DRIVE           Yes   
TSM_SVR1        SERVER          DRV2            DRIVE           Yes   
TSM_SVR1        SERVER          DRV3            DRIVE           Yes   
TSM_SVR1        SERVER          DRV4            DRIVE           Yes   
TSM_SVR1        SERVER          DRV5            DRIVE           Yes   
TSM_SVR1        SERVER          DRV6            DRIVE           Yes   

看一下命令:
TSM:TSM_SVR1>
delete path tsm_svr1 vtl01 srctype=server desttype=library
ANR2017I Administrator SERVER_CONSOLE issued command: DELETE PATH tsm_svr1 vtl01 srctype=server
desttype=library
ANR1721I A path from TSM_SVR1 to VTL01 has been deleted.

TSM:TSM_SVR1>
q path
ANR2017I Administrator SERVER_CONSOLE issued command: QUERY PATH

Source Name     Source Type     Destination     Destination     On-Line
                                Name            Type           
-----------     -----------     -----------     -----------     -------
TSM_SVR1        SERVER          DRV1            DRIVE           Yes   
TSM_SVR1        SERVER          DRV2            DRIVE           Yes   
TSM_SVR1        SERVER          DRV3            DRIVE           Yes   
TSM_SVR1        SERVER          DRV4            DRIVE           Yes   
TSM_SVR1        SERVER          VTL02           LIBRARY         Yes   
TSM_SVR1        SERVER          DRV1            DRIVE           Yes   
TSM_SVR1        SERVER          DRV2            DRIVE           Yes   
TSM_SVR1        SERVER          DRV3            DRIVE           Yes   
TSM_SVR1        SERVER          DRV4            DRIVE           Yes   
TSM_SVR1        SERVER          DRV5            DRIVE           Yes   
TSM_SVR1        SERVER          DRV6            DRIVE           Yes

好,下面来删除drive;

记住,删除 drive 的时候,还要带vtl01 带库的参数的。
TSM:TSM_SVR1>
del path tsm_svr1 drv1 srctype=server desttype=drive library=vtl01
ANR2017I Administrator SERVER_CONSOLE issued command: DELETE PATH tsm_svr1 drv1 srctype=server
desttype=drive library=vtl01
ANR1721I A path from TSM_SVR1 to VTL01 DRV1 has been deleted.

同样的方法 delete drive : drv2, drv3,drv4 ,看一下:

TSM:TSM_SVR1>
q path
ANR2017I Administrator SERVER_CONSOLE issued command: QUERY PATH

Source Name     Source Type     Destination     Destination     On-Line
                                Name            Type           
-----------     -----------     -----------     -----------     -------
TSM_SVR1        SERVER          VTL02           LIBRARY         Yes   
TSM_SVR1        SERVER          DRV1            DRIVE           Yes   
TSM_SVR1        SERVER          DRV2            DRIVE           Yes   
TSM_SVR1        SERVER          DRV3            DRIVE           Yes   
TSM_SVR1        SERVER          DRV4            DRIVE           Yes   
TSM_SVR1        SERVER          DRV5            DRIVE           Yes   
TSM_SVR1        SERVER          DRV6            DRIVE           Yes  

好下面来删除 vtl01 带库

TSM:TSM_SVR1>
del library vtl01
ANR2017I Administrator SERVER_CONSOLE issued command: DELETE LIBRARY vtl01
ANR8411E DELETE LIBRARY: One or more drives are still defined in library VTL01.

看一下drive :确实存在:
TSM:TSM_SVR1>
q drive
ANR2017I Administrator SERVER_CONSOLE issued command: QUERY DRIVE

Library Name     Drive Name       Device Type     On-Line           
------------     ------------     -----------     -------------------
VTL01            DRV1             LTO             Yes               
VTL01            DRV2             LTO             Yes               
VTL01            DRV3             LTO             Yes               
VTL01            DRV4             LTO             Yes               
VTL02            DRV1             LTO             Yes               
VTL02            DRV2             LTO             Yes               
VTL02            DRV3             LTO             Yes               
VTL02            DRV4             LTO             Yes               
VTL02            DRV5             LTO             Yes               
VTL02            DRV6             LTO             Yes               

TSM:TSM_SVR1>

下面来吧drive 給删了:
TSM:TSM_SVR1>
del drive vtl01 drv1
ANR2017I Administrator SERVER_CONSOLE issued command: DELETE DRIVE vtl01 drv1
ANR8412I Drive DRV1 deleted from library VTL01.

同样的方法:把 drv2 drv3 drv4 给删除了:

TSM:TSM_SVR1>
q drive
ANR2017I Administrator SERVER_CONSOLE issued command: QUERY DRIVE

Library Name     Drive Name       Device Type     On-Line           
------------     ------------     -----------     -------------------
VTL02            DRV1             LTO             Yes               
VTL02            DRV2             LTO             Yes               
VTL02            DRV3             LTO             Yes               
VTL02            DRV4             LTO             Yes               
VTL02            DRV5             LTO             Yes               
VTL02            DRV6             LTO             Yes  

好下面终于可以吧library vtl01给删除了;
TSM:TSM_SVR1>
delete library vtl01
ANR2017I Administrator SERVER_CONSOLE issued command: DELETE LIBRARY vtl01
ANR8410I Library VTL01 deleted.
TSM:TSM_SVR1>
q library
ANR2017I Administrator SERVER_CONSOLE issued command: QUERY LIBRARY

         Library Name: VTL02
         Library Type: SCSI
               ACS Id:
     Private Category:
     Scratch Category:
WORM Scratch Category:
     External Manager:
               Shared: No
              LanFree:
   ObeyMountRetention:


TSM:TSM_SVR1>

好,重新启动tsm 看看:
没有报错了。
tsm:>show slots vtl02 也可以看到了。
通俗的讲,一个library 就是一个机械臂,看一看:
/dev/tsmscisi/scsi 有几个lb0,如果是一个的话,就只能定义path.

你可能感兴趣的:(TSM)