Skip to content

Quick start

Atsushi Abe edited this page Oct 2, 2019 · 6 revisions

Build and install from source

See README.md

Packaging

Kindly piste2750 is maintaining some packaging stuffs

Unavailable packages

  • Debian Package: Not available yet (Does someone want to do this?)

How to use

Before using ltfs, please confirm the path to ltfs, mkltfs and ltfsck is included your PATH environment.

List tape drives

# ltfs -o device_list

The output is like follows. You can have 3 drives in this example and you can use "Device Name" field, like /dev/sg43 in this case, as the argument of ltfs command to mount the tape drive.

50c4 LTFS14000I LTFS starting, LTFS version 2.4.0.0 (10022), log level 2.
50c4 LTFS14058I LTFS Format Specification version 2.4.0.
50c4 LTFS14104I Launched by "/home/piste/ltfsoss/bin/ltfs -o device_list".
50c4 LTFS14105I This binary is built for Linux (x86_64).
50c4 LTFS14106I GCC version is 4.8.5 20150623 (Red Hat 4.8.5-11).
50c4 LTFS17087I Kernel version: Linux version 3.10.0-514.10.2.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Mon Feb 20 02:37:52 EST 2017 i386.
50c4 LTFS17089I Distribution: NAME="Red Hat Enterprise Linux Server".
50c4 LTFS17089I Distribution: Red Hat Enterprise Linux Server release 7.3 (Maipo).
50c4 LTFS17089I Distribution: Red Hat Enterprise Linux Server release 7.3 (Maipo).
50c4 LTFS17085I Plugin: Loading "sg" tape backend.
Tape Device list:.
Device Name = /dev/sg43, Vender ID = IBM    , Product ID = ULTRIUM-TD5    , Serial Number = 9A700L0077, Product Name = [ULTRIUM-TD5] .
Device Name = /dev/sg38, Vender ID = IBM    , Product ID = ULT3580-TD6    , Serial Number = 00013B0119, Product Name = [ULT3580-TD6] .
Device Name = /dev/sg37, Vender ID = IBM    , Product ID = ULT3580-TD7    , Serial Number = 00078D00C2, Product Name = [ULT3580-TD7] .

Format a tape

As described into the LTFS format specifications, LTFS uses the partition feature of the tape drive. It means you can't use a tape just after you purchase a tape. You need format the tape before using int on LTFS.

To format a tape, you can use mkltfs command like

# mkltfs -d /dev/sg43

In this case, mkltfs tries to format a tape in the tape drive /dev/sg43, serial number 9A700L0077 in the "List tape drives" section.

Mount a tape through a tape drive

After you prepared a formatted tape, you can mount it through a tape drive like

# ltfs -o devname=/dev/sg43 /ltfs

In this command, the ltfs command try to mount the tape in the tape drive /dev/sg43, serial number 9A700L0077 in the "List tape drives" section, to /ltfs directory.

If mount process is successfully done, you can access to the LTFS tape through /ltfs directory.

Limitation

You must not touch any st devices (or IBMtape devices if you are using lin_tape driver) while ltfs is mounting a tape.

Linux may add /dev/stX device (or /dev/IBMtapeX) to the system. You might get a tape format corruption if you touch /dev/stX (or /dev/IBMtapeX) while you mount a tape through a sg device. Because /dev/stX (or /dev/IBMtapeX) issues REWIND command implicitly when it is opened.

On the other hand, it is safe to touch /dev/nstX (or /dev/IBMtapeXn), that isn't issue any REWIND command when it is opened.

Unmount the tape drive

You can use following command when you want to unmount the tape. The ltfs command try to write down the current meta-data to the tape and close the tape cleanly.

# umount /ltfs

One thing you need to pay attention here is it is not a unmount completion when umount command is returned. It just a finish of trigger to notify the unmount request to the ltfs command. Actual unmount is completed when the ltfs command is finished.