Mounting and Reading LTFS tapes on a StorNext Appliance |
Mounting and Reading LTFS tapes on a StorNext Appliance
Background
StorNext can write tapes in one of 2 formats, The Quantum defined ANTF format (default) or the open, portable LTFS format. (See http://www.quantum.com/products/tapedrives/ltoultrium/lto-5/ltfs/index.aspx and http://www.lto.org/technology/ltfs for details on LTFS on LTO media).
ANTF tapes can be scanned and read by fsmedscan and fsmedread on systems regardless of whether they have StorNext installed or not. These utilities however do not support the LTFS format which is intended to be accessed by LTFS. In order to read tapes
StorNext generally operates on the SCSI generic drivers, “sg”, whist the LTFS utilities use the tape drivers, “st”.
Some of the following actions can be modified to operate on LTFS tapes on RYO and non-StorNext systems.
Checking you have the LTFS utilities
Check we have the rpm already installed. Note that the exact version and OS may vary:
# rpm -qa | egrep qtmltfs
qtmltfs-2.2.0-1.x86_64
Check we have the mount command :
# ls -l /opt/QUANTUM/ltfs/bin/ltfs-singledrive
-rwxr-xr-x 1 root root 106789 Oct 15 2015 /opt/QUANTUM/ltfs/bin/ltfs-singledrive
If the rpm isn't installed, is an earlier version lacking the ltfs-singledrive executable or you're on a RYO system the latest version can be downloaded from the Quantum CSWeb site : https://qsweb.quantum.com/wiki/tiki-index.php?page=Quantum%20Software%20-%20LTFS.
Mounting the tape
Mount the tape you wish to list and read and note the device that its loaded into (in this example we’re loading media id S00103 into drive /dev/sg68). Note that during the operation the tape will not be available for use by the normal StorNext workflow :
# fsmount S00103
FS0589 03 0233203212 fsmount interim: Tertiary Manager software request received.
FS0670 03 0233203212 fsmount interim: Media mounted on device /dev/sg68.
FS0000 03 0233203212 fsmount completed: Command Successful.
We now need to work out what tape device the generic device maps on to by loading the tape driver and mapping from the generic to the tape device.
Load the st module :
# modprobe st
Determine which tape device is mapped to the drive our tape was loaded into, in the example the genertic device is mapped to no-rewind device /dev/nst9 :
# sg_map | egrep /dev/sg68
/dev/sg68 /dev/nst9
Now create a mount point for the tape and mount it, the example below shows the output you should see from the LTFS utility :
# mkdir /mnt/ltfs
# /opt/QUANTUM/ltfs/bin/ltfs-singledrive /mnt/ltfs -o devname=/dev/nst9
30ed LTFS14000I LTFS starting, QUANTUMLTFS Standalone version 2.2.0, log level 2
30ed LTFS14058I LTFS Format Specification version 2.2.0
30ed LTFS14104I Launched by "/opt/QUANTUM/ltfs/bin/ltfs-singledrive /mnt/ltfs -o devname=/dev/nst9"
30ed LTFS14105I This binary is built for Linux (x86_64)
30ed LTFS14106I GCC version is 4.4.7 20120313 (Red Hat 4.4.7-16)
30ed LTFS17087I Kernel version: Linux version 2.6.32-504.el6.x86_64 (mockbuild@x86-023.build.eng.bos.redhat.com) (gcc version 4.4.7 20120313 (Red Hat 4.4.7-11) (GCC) ) #1 SMP Tue Sep 16 01:56:35 EDT 2014 x86_64
30ed LTFS17089I Distribution: Red Hat Enterprise Linux Server release 6.6 (Santiago)
30ed LTFS17089I Distribution: Red Hat Enterprise Linux Server release 6.6 (Santiago)
30ed LTFS14063I Sync type is "time", Sync time is 300 sec
30ed LTFS17085I Plugin: Loading "ltotape" driver
30ed LTFS17085I Plugin: Loading "unified" iosched
30ed LTFS20013I Drive type is ULTRIUM-HH6, serial number is 10WT025692, firmware revision is F9A1
30ed LTFS17160I Maximum device block size is 1048576
30ed LTFS11005I Mounting the volume
30ed LTFS17302W Cannot retrieve attribute (Application Format Version=0x80b)
30ed LTFS17302W Cannot retrieve attribute (User Medium Text Label=0x803)
30ed LTFS17095W The index read from the tape uses an old version of the LTFS format. If this tape is modified, the index upgrades format version to 2.2.0 from 2.0.0.
30ed LTFS10023I LTFS volume information:
30ed LTFS10031I Volume Name : (null)
30ed LTFS10024I Volser(Barcode) : 5
30ed LTFS10025I Volume UUID : 22c94053-47ad-4c68-b26a-4a1c2636694e
30ed LTFS10026I Format Time : 2016-09-23 10:31:05.162403255 CDT
30ed LTFS10027I Block Size : 524288
30ed LTFS10028I Compression : Disabled
30ed LTFS10029I Index Partition : ID = a, SCSI Partition = 0, Total Capacity = 35060 MiB, Available Space = 35057 MiB
30ed LTFS10030I Data Partition : ID = b, SCSI Partition = 1, Total Capacity = 2296532 MiB, Available Space = 2296526 MiB
30ed LTFS14111I Initial setup completed successfully
30ed LTFS14112I Invoke 'mount' command to check the result of final setup
30ed LTFS14113I Specified mount point is listed if succeeded
Listing and Reading the Tape
You should now have the tape mounted as a filesystem :
# df -h /mnt/ltfs
Filesystem Size Used Avail Use% Mounted on
ltfs:/dev/nst9 2.2T 6.0M 2.2T 1% /mnt/ltfs
You can now access the files on the tape as if it were a filesystem to search for the files using standard Unix commands such as “ls” and “find” then read and copy the files using “cat” and “cp”.
Tidying Up
After you’ve finished using the tape it will need to be unmounted from the drive after you’ve unmounted the LTFS filesystem so that StorNext can use it normally:
# umount /mnt/ltfs
# rmdir /mnt/ltfs
# fsdismount -m S00103
Finally, unload the tape driver from the configuration. This is a precaution to avoid the unintentional use of the tape drives outside of StorNext control which could result in rewinds, overwrites and data loss :
# modprobe -r st
This page was generated by the BrainKeeper Enterprise Wiki, © 2018 |