nbu WIN平台下面(mtx/robtest/tar/nt_ttu)手动测试driver是否正常

   在这里介绍一下WIN平台上面怎么测试带库是否可以正常的读写数据库。

     WIN这个是个好东西,但是在用于服务器方案,我切不会的。

     这里不介绍厂商自己提供的软件来测试带库。

     WIN下面同样用两种方案:

     方案一:使用mtx与tar来实现

     方案二:使用robtest与nt_ttu工具

方案一:

     方案一需要用到两个工具,mtx与tar,这两个工具都需要到第三方去下载。

mtx下载地址http://sourceforge.net/projects/mtx/files/Windows/

tar下载地址http://sourceforge.net/projects/guntar/?source=directory

软件安装完成后记得在PATH里面增加好环境变量。

 
 
  1. 1.1 查看已经配置的设备的状态 
  2. C:\Documents and Settings\Administrator>tpconfig -l 
  3. Device Robot Drive       Robot                    Drive                Device 
  4.  
  5. Type     Num Index  Type DrNum Status  Comment    Name                 Path 
  6.  
  7. robot      0    -    TLD    -       -  -          -                    {3,0,0,0} 
  8.  
  9.   drive    -    0  hcart    1      UP  -          IBM.ULTRIUM-TD1.000  {3,0,0,1} 
  10.  
  11.   drive    -    1  hcart    2      UP  -          IBM.ULTRIUM-TD1.001  {3,0,0,2} 
  12.  
  13. 1.2 查看机械手的状态 
  14. C:\Documents and Settings\Administrator>mtx -f 3:0:0:0 status 
  15.   Storage Changer 3:0:0:0:2 Drives, 40 Slots ( 20 Import/Export ) 
  16. Data Transfer Element 0:Empty 
  17. Data Transfer Element 1:Full (Storage Element 2 Loaded):VolumeTag = 00580001 
  18.       Storage Element 1:Full :VolumeTag=00580000 
  19.       Storage Element 2:Empty 
  20.       Storage Element 3:Full :VolumeTag=00580002 
  21.       Storage Element 4:Full :VolumeTag=00580003 
  22.       Storage Element 5:Full :VolumeTag=00580004 
  23. 1.3 加载槽位3的磁带到driver 0 
  24. C:\Documents and Settings\Administrator>mtx -f 3:0:0:0 load 3 0 
  25. Loading media from Storage Element 3 into drive 0...done 
  26.  
  27. C:\Documents and Settings\Administrator>mtx -f 3:0:0:0 status|more 
  28.   Storage Changer 3:0:0:0:2 Drives, 40 Slots ( 20 Import/Export ) 
  29. Data Transfer Element 0:Full (Storage Element 3 Loaded):VolumeTag = 00580002 
  30. Data Transfer Element 1:Full (Storage Element 2 Loaded):VolumeTag = 00580001 
  31.       Storage Element 1:Full :VolumeTag=00580000 
  32.       Storage Element 2:Empty 
  33.       Storage Element 3:Empty 
  34.       Storage Element 4:Full :VolumeTag=00580003 
  35.       Storage Element 5:Full :VolumeTag=00580004 
  36.       Storage Element 6:Full :VolumeTag=00580005 
  37.       Storage Element 7:Full :VolumeTag=00580006 
  38.       Storage Element 8:Full :VolumeTag=00580007 
  39.       Storage Element 9:Full :VolumeTag=00580008 
  40.       Storage Element 10:Empty 
  41.  
  42. 1.4 查看tape的名字 
  43. C:\Documents and Settings\Administrator>scan -tape 
  44. ************************************************************ 
  45. *********************** SDT_TAPE    ************************ 
  46. ************************************************************ 
  47. ------------------------------------------------------------ 
  48. Device Name  : "Tape0" 
  49. Passthru Name"Tape0" 
  50. Volume Header: "" 
  51. Port: 3; Bus: 0; Target: 0; LUN: 1 
  52. Inquiry    : "IBM     ULTRIUM-TD1     18N2" 
  53. Vendor ID  : "IBM     " 
  54. Product ID : "ULTRIUM-TD1     " 
  55. Product Rev: "18N2" 
  56. Serial Number: "92FUC00601" 
  57. WWN          : "" 
  58. WWN Id Type  : 0 
  59. Device Identifier: "IBM     ULTRIUM-TD1     92FUC00601  " 
  60. Device Type    : SDT_TAPE 
  61. NetBackup Drive Type: 3 
  62. Removable      : Yes 
  63. Device Supports: SCSI-3 
  64. Flags : 0x0 
  65. Reason: 0x0 
  66. ------------------------------------------------------------ 
  67. Device Name  : "Tape1" 
  68. Passthru Name"Tape1" 
  69. Volume Header: "" 
  70. Port: 3; Bus: 0; Target: 0; LUN: 2 
  71. Inquiry    : "IBM     ULTRIUM-TD1     18N2" 
  72. Vendor ID  : "IBM     " 
  73. Product ID : "ULTRIUM-TD1     " 
  74. Product Rev: "18N2" 
  75. Serial Number: "92FUC00602" 
  76. WWN          : "" 
  77. WWN Id Type  : 0 
  78. Device Identifier: "IBM     ULTRIUM-TD1     92FUC00602  " 
  79. Device Type    : SDT_TAPE 
  80. NetBackup Drive Type: 3 
  81. Removable      : Yes 
  82. Device Supports: SCSI-3 
  83. Flags : 0x0 
  84. Reason: 0x0 
  85. 1.5 向tape 0写数据 
  86. C:\Documents and Settings\Administrator>tar -cvf Tape0 "C:\Program Files\mtx" 
  87. C:\\Program Files\\mtx/ 
  88. C:\\Program Files\\mtx/loaderinfo.exe 
  89. C:\\Program Files\\mtx/mtx.exe 
  90. C:\\Program Files\\mtx/README.win32 
  91. C:\\Program Files\\mtx/scsieject.exe 
  92. C:\\Program Files\\mtx/scsitape.exe 
  93. C:\\Program Files\\mtx/tapeinfo.exe 
  94. 1.6 查看已经备份的数据 
  95. C:\Documents and Settings\Administrator>tar -tvf Tape0 "C:\Program Files\mtx" 
  96. drw-rw-rw- Administrator/0   0 2012-10-13 18:33 C:\\Program Files\\mtx/ 
  97. -rwxrwxrwx Administrator/0 77824 2008-08-20 23:52 C:\\Program Files\\mtx/loaderinfo.exe 
  98. -rwxrwxrwx Administrator/0 90112 2008-08-20 23:52 C:\\Program Files\\mtx/mtx.exe 
  99. -rw-rw-rw- Administrator/0  1360 2008-08-20 23:53 C:\\Program Files\\mtx/README.win32 
  100. -rwxrwxrwx Administrator/0 81920 2008-08-20 23:52 C:\\Program Files\\mtx/scsieject.exe 
  101. -rwxrwxrwx Administrator/0 81920 2008-08-20 23:52 C:\\Program Files\\mtx/scsitape.exe 
  102. -rwxrwxrwx Administrator/0 81920 2008-08-20 23:52 C:\\Program Files\\mtx/tapeinfo.exe 

方案二:

   要使用此方案,是需要安装NBU软件与配置设备的

 
 
  1. 2.1 robtest测试带库 
  2. C:\Documents and Settings\Administrator>robtest 
  3. Configured robots with local control supporting test utilities: 
  4.   TLD(0)     robotic path = {3,0,0,0} 
  5.  
  6. Robot Selection 
  7. --------------- 
  8.   1)  TLD 0 
  9.   2)  none/quit 
  10. Enter choice: 1 
  11.  
  12. Robot selected: TLD(0)   robotic path = {3,0,0,0} 
  13.  
  14. Invoking robotic test utility: 
  15. C:\Program Files\Veritas\Volmgr\bin\tldtest.exe -rn 0 -r {3,0,0,0} 
  16.  
  17. Opening {3,0,0,0} 
  18. MODE_SENSE complete 
  19. Enter tld commands (? returns help information) 
  20.  
  21. To exit the utility, type q or Q. 
  22.  
  23. init                      - Initialize element status 
  24. initrange <d#|s#|p#|t> [#]- Init element status range 
  25. allow                     - Allow media removal 
  26. prevent                   - Prevent media removal 
  27. extend                    - Extend media access port 
  28. retract                   - Retract media access port 
  29. mode                      - Mode sense 
  30. m <from> <to>             - Move medium 
  31. pos <to>                  - Position to drive or slot 
  32. s [d|p|t|s [n]] [raw]      - Read element status 
  33. inquiry                   - Display vendor and product ID 
  34. rezero                    - Rezero unit 
  35. inport                    - Ready inport (media access port) 
  36. debug                     - Toggle debug mode for this utility 
  37. test_ready                - Send a TEST UNIT READY to the device 
  38.  
  39.    <from> <to> specifies drive (d#), slot (s#), media access port (p#), 
  40.            or transport (t#) 
  41.    <d#|s#|p#|t#> is drive #, slot #, media access port #, or transport # 
  42.            [#] is number of elements for d, s, p, or t 
  43.     NOTE - drive # is 1 - Number of drives 
  44.            slot # is 1 - Number of slots 
  45.            media access port # is 1 - Number of media access port elements 
  46.            transport # is 1 - Number of transports 
  47.    <type> = (d)rive, (s)lot, media access (p)ort, or (t)ransport 
  48.  
  49. unload <drive>           - Issue SCSI unload 
  50.    <drive> = d1 or 1, d2 or 2, d3 or 3 ... d648 or 648 
  51.  
  52. multipath [enable|disable]             - turn multipathing on/off 
  53. multipath [auto|manual]                - turn auto path discovery on/off 
  54. multipath [addpath|removepath] [path]  - for manual mode, add/remove path 
  55. multipath [showpaths]      - show currently configured paths for auto or manual 
  56. mode 
  57.  
  58. s d 
  59. drive 1 (addr 500) access = 1 Contains Cartridge = no 
  60. drive 2 (addr 501) access = 1 Contains Cartridge = no 
  61. READ_ELEMENT_STATUS complete 
  62. s s 
  63. slot 1 (addr 1000) contains Cartridge = yes 
  64. Source address = 500 
  65. Barcode = 00580000 
  66. slot 2 (addr 1001) contains Cartridge = yes 
  67. Source address = 500 
  68. Barcode = 00580002 
  69. slot 3 (addr 1002) contains Cartridge = yes 
  70. Source address = 501 
  71. Barcode = 00580001 
  72. slot 4 (addr 1003) contains Cartridge = yes 
  73. Source address = 0 
  74. Barcode = 00580003 
  75. slot 5 (addr 1004) contains Cartridge = yes 
  76. Source address = 0 
  77. Barcode = 00580004 
  78. slot 6 (addr 1005) contains Cartridge = yes 
  79. Source address = 0 
  80. Barcode = 00580005 
  81. slot 7 (addr 1006) contains Cartridge = yes 
  82. Source address = 0 
  83. Barcode = 00580006 
  84. << Press return to continueor q and return to stop >> 
  85. READ_ELEMENT_STATUS complete 
  86. m s1 d1 
  87. Initiating MOVE_MEDIUM from address 1000 to 500 
  88. MOVE_MEDIUM complete 
  89. s d 
  90. drive 1 (addr 500) access = 0 Contains Cartridge = yes 
  91. Source address = 1000 (slot 1) 
  92. Barcode = 00580000 
  93. drive 2 (addr 501) access = 1 Contains Cartridge = no 
  94. READ_ELEMENT_STATUS complete 
  95.  
  96. Robot Selection 
  97. --------------- 
  98.   1)  TLD 0 
  99.   2)  none/quit 
  100. Enter choice: 2 
  101.  
  102. 2.2 向tape0写数据 
  103. C:\Documents and Settings\Administrator>nt_ttu -f Tape0 
  104.  
  105. Welcome to nt_ttu, h[elp] or ? for help. 
  106.  
  107. Data Buffer Initial Address - 0000000002164000 
  108.  
  109. nt_ttu> open t 
  110. OPEN elapsed time = 16 msecs. 
  111.  
  112. nt_ttu> ioctl c=rew 
  113. cmd = rew 
  114. now rewinding the tape 
  115.  
  116. nt_ttu> write t b=65536 
  117. WRITE time=0 msec; records=1; bytes/record=65536; bytes/msec=65536.000 
  118.  
  119. nt_ttu> c t 
  120. CLOSE elapsed time = 0 msecs. 
  121.  
  122. nt_ttu> exit 

    已经成功。





     本文转自7343696 51CTO博客,原文链接:http://blog.51cto.com/luoping/1027147,如需转载请自行联系原作者




  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值