《在Linux平台安装mhVTL虚拟化磁带库》:http://blog.itpub.net/23135684/viewspace-768302/

在mhvtl中,操作磁带库主要使用mtx工具控制机械手放磁带,换磁带等操作。

1.查看磁带库设备相关信息。

[root@centos1 opt]# lsscsi -g

[0:0:0:0]    disk    ATA      VBOX HARDDISK    1.0   /dev/sda  /dev/sg0

[1:0:0:0]    mediumx STK      L700             0104  -         /dev/sg9

[1:0:1:0]    tape    IBM      ULT3580-TD5      0104  /dev/st0  /dev/sg1

[1:0:2:0]    tape    IBM      ULT3580-TD5      0104  /dev/st1  /dev/sg2

[1:0:3:0]    tape    IBM      ULT3580-TD4      0104  /dev/st2  /dev/sg3

[1:0:4:0]    tape    IBM      ULT3580-TD4      0104  /dev/st3  /dev/sg4

[1:0:8:0]    mediumx STK      L80              0104  -         /dev/sg10

[1:0:9:0]    tape    STK      T10000B          0104  /dev/st4  /dev/sg5

[1:0:10:0]   tape    STK      T10000B          0104  /dev/st5  /dev/sg6

[1:0:11:0]   tape    STK      T10000B          0104  /dev/st6  /dev/sg7

[1:0:12:0]   tape    STK      T10000B          0104  /dev/st7  /dev/sg8

一般磁带库有两个机械手(sg),八个驱动器(st),多个插槽(slot),插槽中的磁带被放入了驱动之后才能被正常的读写,每盘磁带读写完毕,或读写满了需要手动更换下一盘磁带。

2.装载磁带操作。

装载磁带命令格式:mtx -f load

1).查看sg9机械手状态:

[root@centos1 ~]# mtx -f /dev/sg9 status

Storage Changer /dev/sg9:4 Drives, 43 Slots ( 4 Import/Export )

Data Transfer Element 0:Empty

Data Transfer Element 1:Empty

Data Transfer Element 2:Empty

Data Transfer Element 3:Empty

Storage Element 1:Full :VolumeTag=E01001L4

Storage Element 2:Full :VolumeTag=E01002L4

Storage Element 3:Full :VolumeTag=E01003L4

Storage Element 4:Full :VolumeTag=E01004L4

Storage Element 5:Full :VolumeTag=E01005L4

Storage Element 6:Full :VolumeTag=E01006L4

Storage Element 7:Full :VolumeTag=E01007L4

Storage Element 8:Full :VolumeTag=E01008L4

Storage Element 9:Full :VolumeTag=E01009L4

Storage Element 10:Full :VolumeTag=E01010L4

Storage Element 11:Full :VolumeTag=E01011L4

Storage Element 12:Full :VolumeTag=E01012L4

Storage Element 13:Full :VolumeTag=E01013L4

Storage Element 14:Full :VolumeTag=E01014L4

Storage Element 15:Full :VolumeTag=E01015L4

Storage Element 16:Full :VolumeTag=E01016L4

Storage Element 17:Full :VolumeTag=E01017L4

Storage Element 18:Full :VolumeTag=E01018L4

Storage Element 19:Full :VolumeTag=E01019L4

Storage Element 20:Full :VolumeTag=E01020L4

Storage Element 21:Empty

Storage Element 22:Full :VolumeTag=CLN101L4

Storage Element 23:Full :VolumeTag=CLN102L5

Storage Element 24:Empty

Storage Element 25:Empty

Storage Element 26:Empty

Storage Element 27:Empty

Storage Element 28:Empty

Storage Element 29:Empty

Storage Element 30:Full :VolumeTag=F01030L5

Storage Element 31:Full :VolumeTag=F01031L5

Storage Element 32:Full :VolumeTag=F01032L5

Storage Element 33:Full :VolumeTag=F01033L5

Storage Element 34:Full :VolumeTag=F01034L5

Storage Element 35:Full :VolumeTag=F01035L5

Storage Element 36:Full :VolumeTag=F01036L5

Storage Element 37:Full :VolumeTag=F01037L5

Storage Element 38:Full :VolumeTag=F01038L5

Storage Element 39:Full :VolumeTag=F01039L5

Storage Element 40 IMPORT/EXPORT:Empty

Storage Element 41 IMPORT/EXPORT:Empty

Storage Element 42 IMPORT/EXPORT:Empty

Storage Element 43 IMPORT/EXPORT:Empty

4个驱动器中没有磁带。

2).将磁带从39号插槽装入0号驱动器:

[root@centos1 ~]# mtx -f /dev/sg9 load 39 0

[root@centos1 ~]# mtx -f /dev/sg9 status

Storage Changer /dev/sg9:4 Drives, 43 Slots ( 4 Import/Export )

Data Transfer Element 0:Full (Storage Element 39 Loaded):VolumeTag = F01039L5

Data Transfer Element 1:Empty

Data Transfer Element 2:Empty

Data Transfer Element 3:Empty

.....

成功将39号槽位的磁带装入0号磁带驱动器。

3).检查0号驱动器里磁带的状态:

[root@centos1 ~]# mt -f /dev/st0 status

SCSI 2 tape drive:

File number=0, block number=0, partition=0.

Tape block size 0 bytes. Density code 0x58 (no translation).

Soft error count since last status=0

General status bits on (41010000):

BOT ONLINE IM_REP_EN

4).检查0号驱动器中磁头的位置:

[root@centos1 ~]# mt -f /dev/st0 tell

At block 0.

5).向磁带中写入数据:

[root@centos1 ~]# ls

anaconda-ks.cfg  Desktop  install.log  install.log.syslog

[root@centos1 ~]# tar -cvf /dev/st0 Desktop

Desktop/

[root@centos1 ~]# mt -f /dev/st0 tell

At block 0.

st打头的表示写入完成后会自动倒带,下次写入会覆盖之前的数据。

[root@centos1 ~]# tar -cvf /dev/nst0 Desktop

Desktop/

[root@centos1 ~]# mt -f /dev/st0 tell

At block 2.

nst打头的表示写入完成后不会自动倒带。

4.卸载磁带库操作。

将磁带从0号驱动器拔出放入39号插槽:

[root@centos1 ~]# mtx -f /dev/sg9 unload 39 0

Unloading Data Transfer Element into Storage Element 39...done

以上是一些简单的基本操作。

--end--

linux下扫描带库命令,在Linux平台使用mhVTL虚拟化磁带库(1)相关推荐

  1. Linux下查看带库路径,Linux挂载LTO6磁带库.docx

    Linux挂载LTO6磁带库 Linux 挂载LTO6 磁带库Version: 1.0作者:朱晓凯时间:2014/9/22一.环境介绍操作系统:RHEL 5.3 32位磁带库:腾保T40 LTO6 双 ...

  2. Linux下自带的regex

    Linux下自带的regex Linux下可直接用regex.h来支持正则表达式. Android同样也有该头文件,可认为Android也是支持的. #include <sys/types.h& ...

  3. 用C语言Linux下打印带颜色的字符串

    用C语言Linux下打印带颜色的字符串 字背景颜色范围:40----49 40:黑 41:深红 42:绿 43:黄色 44:蓝色 45:紫色 46:深绿 47:白色  字颜色:30---------- ...

  4. 我的世界服务器linux加mod,在Linux下搭建带MOD 我的世界(Minecraft)服务器

    在Linux下搭建带MOD 我的世界(Minecraft)服务器 系统要求 官方服务器推荐配置要求如下: CPU:Intel Core-Based CPUs or AMD K8-Based CPUs ...

  5. 在Linux下搭建带MOD 我的世界(Minecraft)服务器

    在Linux下搭建带MOD 我的世界(Minecraft)服务器 系统要求 官方服务器推荐配置要求如下: CPU:Intel Core-Based CPUs or AMD K8-Based CPUs ...

  6. linux格式化大于2t硬盘分区,linux下大于2tb硬盘格式化及挂载,linux下大于2t的分区方法,linux gpt分区表 管理 自动挂载分区...

    linux下大于2tb硬盘格式化及挂载,linux下大于2t的分区方法,linux gpt分区表 管理 自动挂载分区 (7页) 本资源提供全文预览,点击全文预览即可全文预览,如果喜欢文档就下载吧,查找 ...

  7. linux 下查看应用版本信息,Linux下查看版本信息

    Linux下如何查看版本信息, 包括位数.版本信息以及CPU内核信息.CPU具体型号等. 1.# uname -a   (Linux查看版本当前操作系统内核信息) 2.# cat /proc/vers ...

  8. linux下能运行python,(转)Linux下运行python

    原文: http://blog.csdn.net/jackywgw/article/details/48847187 在linux命令行下运行python,可以直接输出hello world jack ...

  9. linux下查看文件的权限,Linux下查看文件权限、修改文件权限的方法

    查看权限命令查看目录的相关权限可以采用命令ls -lD,或者直接用ls -la 如 ls -l www.jb51.net  //这里表示查看www.jb51.net目录 修改权限命令 chmod 77 ...

最新文章

  1. 从FCKEDITOR到ckeditor(二) 撰写自定义对话框,增加数学公式(与webEq的结合)
  2. MODIS(TerraAqua)陆地标准产品
  3. Python读写json文件中文编码问题
  4. 字节月薪6万招 kubernetes 开发,看到要求我傻眼了……
  5. 表白和被表白时遇到的骚操作,最后一个天秀!| 今日最佳
  6. string.length_C.中的String.Length属性示例
  7. 面向知识图谱的信息抽取
  8. 线性/非线性规划问题求解
  9. python加密狗的制作_制作u盘加密狗图文教程
  10. 火星坐标系转北京54坐标方法
  11. 台式计算机如何双屏显示,电脑怎么分屏?|台式电脑双显示器连接方法
  12. 视频编解码器讲解-H.264、VP9、HEVC、AV1
  13. 静态库与动态库的区别与优缺点
  14. token验证失败 java_“Token校验失败,请检查确认”解决方法
  15. xctf攻防世界 REVERSE 高手进阶区 re2-cpp-is-awesome
  16. 快速锁定计算机的按键的快捷键,win7系统如何设置锁定计算机快捷键
  17. Unity3d简谐运动振屏效果实现
  18. HikariCP配置max-lifetime
  19. 有效解决Adobe Acrobat XI 闪退问题
  20. 【手把手】RPA机器人商城应用:工资单发送机器人

热门文章

  1. KF/UKF/EKF
  2. 我国量子态隐形传输获突破 超越时空或成真
  3. 数学建模——多元线性回归 /多元线性拟合 (工具:matlab)
  4. 如何选型电源SPD后备保护器
  5. 如何分析项目中的数据库
  6. 地铁惊现招聘程序员广告
  7. 清华大学 Ubuntu 镜像使用帮助
  8. 用Python绘制表白代码
  9. 任正非,在华为究竟是什么职务?
  10. 如何判断链表是否有环的存在