IBMのLTOチェンジャーを使ってLTFSを構築することになったので、やってみた。
用意するもの
・Linux用LTOドライバ lin_tape
配布はlin_tape-バージョン.src.rpmという形のsource rpmなので、rpmbuildでコンパイルする
・IBM版LTFS LE(Library Edition)
IBMページを起点に入手・・・と行きたいところだが、実際には気軽に入手できないので注意。
IBM LTOチェンジャーを買うと、IBM営業経由でSoftware CDを入手することができる。
Webで入手できるのはCDに対するアップデータで、ベースがないと動作しない。
手順
1. lin_tapeをインストール
インストール後、/dev/st0、/dev/nst0という形だったLTOドライブは
/dev/IBMTape0という名前になる。
2. 現状のデバイス名確認
# ls -l /dev/IBM*
「IBMChanger0」はLTOチェンジャー部分のデバイス
「IBMtape0」はLTOテープドライブ分のデバイス
3. LTFS LEをインストール
まぁ、普通にRPMをインストール
・LTFS LEの起動
チェンジャーデバイスが「/dev/IBMchanger0」
LTFSのマウントポイントを「/ltfs」とする場合、以下の様に起動する。
2 | LTFS14000I LTFS starting, LTFS version 2.1.2.0 (2501), log level 2 |
3 | LTFS14058I LTFS Format Specification version 2.1.0 |
4 | LTFS14104I Launched by "ltfs /ltfs -o changer_devname=/dev/IBMchanger0" |
5 | LTFS14105I This binary is built for Linux (x86_64) |
6 | LTFS14106I GCC version is 4.1.2 20080704 (Red Hat 4.1.2-52) |
7 | LTFS17087I Kernel version: Linux version 2.6.18-194.el5 (mockbuild@x86-005.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) |
8 | LTFS17089I Distribution: Red Hat Enterprise Linux Server release 5.5 (Tikanga) |
9 | LTFS14063I Sync type is "time" , Sync time is 300 sec |
10 | LTFS17085I Plugin: Loading "ibmtape" driver |
11 | LTFS17085I Plugin: Loading "unified" iosched |
12 | LTFS17085I Plugin: Loading "ibmtape" changer |
13 | LTFS17085I Plugin: Loading "ondemand" dcache |
14 | LTFS11593I LTFS starts with a product license version (20120712_1200) |
15 | LTFS12165I lin_tape version is 1.74.0 |
16 | LTFS12118I Changer identification is '3572-TL ' |
17 | LTFS12162I Vendor ID is IBM |
18 | LTFS12159I Firmware revision is 0021 |
19 | LTFS12160I Changer serial is 00000XXXXXXXXXXX |
20 | LTFS12196E IOCTL: INQUIRY PAGE -1056947426 failed -20501 (err 22) 00000XXXXXXXXXXX |
21 | LTFS12165I lin_tape version is 1.74.0 |
22 | LTFS12158I Opening a device through ibmtape driver (/dev/IBMtape0) |
23 | LTFS12118I Drive identification is 'ULT3580-HH5 ' |
24 | LTFS12162I Vendor ID is IBM |
25 | LTFS12159I Firmware revision is BBNF |
26 | LTFS12160I Drive serial is 1068082305 |
27 | LTFS17160I Maximum device block size is 1048576 |
28 | LTFS13500I On-demand dentry cache is initialized |
29 | LTFS11545I Rebuilding the cartridge inventory |
30 | LTFS14506I LTFS admin server is listening on port 2112 |
31 | LTFS14111I Initial setup completed successfully |
32 | LTFS14112I Invoke 'mount' command to check the result of final setup |
33 | LTFS14113I Specified mount point is listed if succeeded |
注意:自動起動してくれないので、サーバを起動するたびに実行する必要がある。
・LTFSでのデバイス認識状況を確認
2 | 1068082305 -> Device: /dev/IBMtape0 [ULT3580-HH5] , Library address: 257, Status: Available |
ドライブが1台であるばあい、こんな風に表示される。
・LTFS上のテープメディア認識状況を確認
「ltfsadmintool -i」で確認します。
2 | BMV157L5 -> Location: Medium storage element, Address: 4095, Capacity: 0GB, Remaining: 0GB, Status: Unknown |
3 | BMV156L5 -> Location: Medium storage element, Address: 4097, Capacity: 0GB, Remaining: 0GB, Status: Unknown |
4 | BMV158L5 -> Location: Medium storage element, Address: 4099, Capacity: 0GB, Remaining: 0GB, Status: Unknown |
「Status: Unknown」となっている場合は、まだフォーマットされていないか、一度の読み込まれたことがないテープです。
・LTFSで利用するLTOテープをフォーマットする
2 | LTFS15000I Starting mkltfs, LTFS version 2.1.2.0 (2501), log level 2 |
3 | LTFS15041I Launched by "/opt/IBM/ltfs/bin/mkltfs -d /dev/IBMtape0 -s BMV157" |
4 | LTFS15042I This binary is built for Linux (x86_64) |
5 | LTFS15043I GCC version is 4.1.2 20080704 (Red Hat 4.1.2-52) |
6 | LTFS17087I Kernel version: Linux version 2.6.18-194.el5 (mockbuild@x86-005.build.bos.redhat.com) (gcc version 4.1.2 20080704 (Red Hat 4.1.2-48)) |
7 | LTFS17089I Distribution: Red Hat Enterprise Linux Server release 5.5 (Tikanga) |
8 | LTFS15003I Formatting device '/dev/IBMtape0' |
9 | LTFS15004I LTFS volume blocksize: 524288 |
10 | LTFS15005I Index partition placement policy: None |
11 | LTFS17085I Plugin: Loading "ibmtape" driver |
12 | LTFS12165I lin_tape version is 1.74.0 |
13 | LTFS12158I Opening a device through ibmtape driver (/dev/IBMtape0) |
14 | LTFS12118I Drive identification is 'ULT3580-HH5 ' |
15 | LTFS12162I Vendor ID is IBM |
16 | LTFS12159I Firmware revision is BBNF |
17 | LTFS12160I Drive serial is XXXXXXXXXX |
18 | LTFS17160I Maximum device block size is 1048576 |
19 | LTFS17157I Changing the drive setting to write-anywhere mode |
20 | LTFS15010I Creating data partition b on SCSI partition 1 |
21 | LTFS15011I Creating index partition a on SCSI partition 0 |
22 | LTFS12207I Logical block protection is disabled |
23 | LTFS17165I Resetting the medium's capacity proportion |
24 | LTFS11097I Partitioning the medium |
25 | LTFS11100I Writing label to partition b |
26 | LTFS11278I Writing index to partition b |
27 | LTFS11100I Writing label to partition a |
28 | LTFS11278I Writing index to partition a |
29 | LTFS15013I Volume UUID is: ae724b01-e9ce-40b8-8786-573eab051801 |
30 | LTFS15019I Volume capacity is 1425 GB |
31 | LTFS12207I Logical block protection is disabled |
32 | LTFS15024I Medium formatted successfully |
33 | Tape BMV157L5 successfully formatted or unformatted. |
なお、一度、LTFSでフォーマットしたことがあるメディアは、上記のコマンドではフォーマットできない。
「ltfsadmintool -t BMV157L5 -f — -f」というふうに「– -f」というオプションをつける必要がある。
・LTFSでフォーマットされ、認識されたことを確認
下記は、BMV157L5 とBMV156L5をフォーマットした後の表示です。
2 | BMV157L5 -> Location: Data transfer element, Address: 257, Capacity: 1327GB, Remaining: 1296GB, Status: Valid LTFS |
3 | BMV156L5 -> Location: Medium storage element, Address: 4097, Capacity: 1327GB, Remaining: 1296GB, Status: Valid LTFS |
4 | BMV158L5 -> Location: Medium storage element, Address: 4099, Capacity: 0GB, Remaining: 0GB, Status: Unknown |
・テープへの書き込み
/ltfs/の下を覗くと、バーコードラベルのディレクトリが表示されます。
そこにcdコマンドで移動したり、cpのコピー先として指定したりすることで
通常のファイルシステムと、ほぼ同等に使うことができます。
“IBM版LTFSをRHEL5で使ってみた” への4件の返信