Starting with LTO-5 drives a new technology called Linear Tape File System (LTFS) was introduced which allows for accessing tape media through a file-system interface. This is acheived by partitioning the tape into two, namely the data partition and the index partition. While the data partition contains the user data, the index partition can be thought of the partition containing metadata about the user data.
This article assumes that you have downloaded and installed the LTFS software for your tape drive. An example to install the LTFS tools for HP tape drives is below
# cd / # tar xvzf /home/sprillion/HP-SOS_2.1.0_RHEL5.5_x64.tar.gz usr/local/bin/ltfs usr/local/bin/ltfsck usr/local/bin/ltfs_limit_dumps.sh usr/local/bin/mkltfs usr/local/bin/unltfs .... usr/local/etc/ltfs.conf usr/local/etc/ltfs.conf.local
Ensure that you a valid LTO catridge loaded into the tape drive
# mt -f /dev/st0 status .. File number=-1, block number=-1, partition=0. Tape block size 262144 bytes. Density code 0x5a (no translation). ...
Create the LTFS filesystem using the mkltfs utility
mkltfs -d <tape device> Examples: # mkltfs -d /dev/IBMtape0 # mkltfs -d /dev/st0 LTFS15000I Starting mkltfs, LTFS version 2.1.0, log level 2 LTFS15041I Launched by "/usr/local/bin/mkltfs -d /dev/st0" ... LTFS11100I Writing label to partition b LTFS11278I Writing index to partition b LTFS11100I Writing label to partition a LTFS11278I Writing index to partition a LTFS15013I Volume UUID is: cd8a4d9a-7bd9-4525-ae9d-3c2102005f22 LTFS15019I Volume capacity is 2453 GB ... LTFS15024I Medium formatted successfully
ltfs -o devname=<tape device> <mount point> Examples # ltfs -o devname=/dev/IBMtape 0/mnt/ltfs # ltfs -o devname=/dev/st0 /mnt/ltfs LTFS14000I LTFS starting, LTFS version 2.1.0, log level 2 LTFS14058I LTFS Format Specification version 2.1.0 ... LTFS17160I Maximum device block size is 524288 LTFS11005I Mounting the volume LTFS14111I Initial setup completed successfully LTFS14112I Invoke 'mount' command to check the result of final setup LTFS14113I Specified mount point is listed if succeeded # df Filesystem 1K-blocks Used Available Use% Mounted on ltfs:/dev/st0 2395832320 0 2395832320 0% /mnt/ltfs
If devname is not specified, the default is /dev/IBMtape0 for IBM LTFS and to /dev/st0 for the others
unmount <mount point> For Example umount /mnt/ltfs
The unltfs utility will remove all LTFS partitions from a tape and create a default single partition on the tape.
unltfs will remove all data on the tape
Examples: # unltfs -d /dev/IBMtape0 # unltfs -d /dev/st0 LTFS Unformat Utility ... Cartridge in device /dev/st0 will be unformatted Are you sure? All data on this volume will be destroyed... (y/N): y Removing LTFS format... ... Operation succeeded. Cartridge no longer contains a valid LTFS volume.