原文来自:LIUBINGLIN ---- http://blog.itpub.net/23135684/viewspace-1307626/

《在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 <slot号> <driver号>

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平台使用mhVTL虚拟化磁带库的更多相关文章

  1. Linux平台oracle 11g单实例 + ASM存储 安装部署 快速参考

    操作环境:Citrix虚拟化环境中申请一个Linux6.4主机(模板)目标:创建单机11g + ASM存储 数据库 1. 主机准备 2. 创建ORACLE 用户和组成员 3. 创建以下目录并赋予对应权 ...

  2. Virtio:针对 Linux 的 I/O 虚拟化框架

    Virtio:针对 Linux 的 I/O 虚拟化框架 --http://www.ibm.com/developerworks/cn/linux/l-virtio/#ibm-pcon 使用 KVM 和 ...

  3. Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part3:db安装和升级

    Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part3:db安装和升级 环境:OEL 5.7 + Oracle 10.2.0.5 RAC 5.安装Database软件 5. ...

  4. Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part1:准备工作

    Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part1:准备工作 环境:OEL 5.7 + Oracle 10.2.0.5 RAC 1.实施前准备工作 1.1 服务器安装操 ...

  5. Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part2:clusterware安装和升级

    Linux平台 Oracle 10gR2(10.2.0.5)RAC安装 Part2:clusterware安装和升级 环境:OEL 5.7 + Oracle 10.2.0.5 RAC 3.安装Clus ...

  6. 在linux平台实现atosl

    ➠更多技术干货请戳:听云博客 序言 怎么在linux 平台下实现一个类似于mac 平台下的 atos 工具( iOS 符号化解析)? 分析问题 在github上找到了几年前的开源实现,[https:/ ...

  7. Linux平台 Oracle 11gR2 RAC安装Part1:准备工作

    一.实施前期准备工作 1.1 服务器安装操作系统 1.2 Oracle安装介质 1.3 共享存储规划 1.4 网络规范分配 二.安装前期准备工作 2.1 各节点系统时间校对 2.2 各节点关闭防火墙和 ...

  8. Linux平台 Oracle 11gR2 RAC安装Part2:GI安装

    三.GI(Grid Infrastructure)安装 3.1 解压GI的安装包 3.2 安装配置Xmanager软件 3.3 共享存储LUN的赋权 3.4 使用Xmanager图形化界面安装GI 3 ...

  9. Linux平台 Oracle 11gR2 RAC安装Part3:DB安装

    四.DB(Database)安装 4.1 解压DB的安装包 4.2 DB软件安装 4.3 ASMCA创建磁盘组 4.4 DBCA建库 4.5 验证crsctl的状态 Linux平台 Oracle 11 ...

随机推荐

  1. HTML 空格的表示符号 nbsp / ensp / emsp 的区别

    HTML 空格的表示符号 nbsp / ensp / emsp 的区别?     半角的不断行的空白格(推荐使用)    半角的空格    全角的空格

  2. ssl_error_rx_record_too_long

    Linux下安装SSL 当使用https访问时出现: SSL 接收到一个超出最大准许长度的记录. (错误码: ssl_error_rx_record_too_long) 网上说修改虚拟机 vi /et ...

  3. Storm Topology及分组原理

    Storm的通信机制,需要满足如下一些条件以满足Storm的语义. 1.建立数据传输的缓冲区.在通信连接没有建立之前把发送的数据缓存起来.数据发送方可以在连接建立之前发送消息,而不需要等连接建立起来, ...

  4. python中threading模块详解(一)

    python中threading模块详解(一) 来源 http://blog.chinaunix.net/uid-27571599-id-3484048.html threading提供了一个比thr ...

  5. NHibernate和 FluentNHibernate

    NHibernate有两类配置文件,一个是数据库连接配置文件(一般写到程序配置文件里),另一个是数据表和实体的映射文件(实体类.hbm.xml) 开源的框架Fluent NHibernate,有了它, ...

  6. 技术那么多,你想看看JSON Schema的测试吗?

    目录 1. 什么是JSON Schema? 2. 如何定义一个JSON Schema 3. 如何测试JSON Schema a) 使用JSON Schema validator GUI b) 在Jav ...

  7. 从Windows 2012标准版升级到数据中心版,标准评价版本升级到标准体验版本并激活

    对于Windows 7.Windows 8操作系统,可以在图形界面中通过输入序列号,从低版本直接升级到高的版本,例如从Windows 7家庭版升级到专业版或旗舰版.而对于Windows Server ...

  8. 转:Connection: close和Connection: keep-alive有什么区别?

    原文:http://www.cnblogs.com/TinyMing/p/4597136.html 一.问题现象: 一个JSP页面,居然要耗时40多秒.网页中有大量的图片的CSS问题解决: 原因也找了 ...

  9. [前端_EasyUI]给easyui的datebox设置默认值,获取不到 的解决方法

    //给eayui datebox设置初始值 $("#ctime").datebox("setValue", function(){ var date = new ...

  10. Reactjs 入门基础(一)

    实例中我们引入了三个库: react.min.js .react-dom.min.js 和 browser.min.js: 1,react.min.js -React 的 核心库 2,react-do ...