ltfs

How to mount tape media by using the ltfs command and its command options.

Note: When a medium is formatted to a 2.x.x version, it cannot be mounted on an older version of LTFS or converted to an older format. From more information, see LTFS tape format compatibility.
Enter ltfs from the command line to mount media for use with the IBM Spectrum® Archive.
Table 1. Command line entries for ltfs
Operating system Command line entry
Linux®
$ mkdir /mnt/ltfs
$ ltfs -o devname=/dev/sg10 /mnt/ltfs
macOS With LTFS version 1.2.5 or later:
$ mkdir /mnt/ltfs
$ ltfs /mnt/ltfs -o devname=0
With LTFS version 1.2.0 or earlier:
$ mkdir /mnt/ltfs
$ ltfs /mnt/ltfs -f -o devname=0

More command options for ltfs

-a
Advanced help, including standard Filesystem in Userspace (FUSE) options.
-h
Help. Displays this help.
-o device_list
Show available tape devices.
-o devname=<dev>
For Linux, the <dev> is the tape device name. The default for this field is /dev/sg10.
For macOS, the <dev> is the tape device enumerator. The default for this field is 0. The enumerator is generated sequentially starting with 0, and is automatically assigned to each tape device.
For both Linux and macOS, <dev> can accept the tape device serial number also. In this case, the ltfs command searches the tape device that is specified and tries to use it.
-o eject
Eject the tape medium after unmount. This option must be specified when you want to enable -o scsi_append_only_mode.
-o force_mount_no_eod
When this option is specified, the end-of-data (EOD) mark check is not done while you are doing a mount operation. The volume becomes read-only.
-o gid=N
Set the group of the file or directory in the tape medium to mount. The default is the group to which the user who is running the ltfs command belongs.
Specify the group ID (GID) for N. Obtain the GID by running the id command with the -g option. For example, id -g root returns the GID of the root group.
-o rollback_mount=<gen>
Attempt to mount on previous index generation (read-only mount).
-o scsi_append_only_mode=off
Disables data-safe mode (default: enabled).
-o scsi_append_only_mode=on
Enables data-safe mode (default). The -o eject option must also be specified to use this option.
-o scsi_lbprotect=off
Disable logical block protection (default).
-o scsi_lbprotect=on
Enable logical block protection (default: disabled).
-o symlink_type=live
Live link mode. For more information, see Enabling symbolic links.
-o symlink_type=posix
Standard symbolic link (default).
-o sync_type=<type>
The type of automatic synchronization that generates a new index file and writes it to the tape medium. The default for this field is time@5. One of the following values can be specified:
time@MIN
LTFS attempts to write down an index periodically. MIN is the interval in minutes between synchronization operations. @MIN can be omitted. The default value is 5 minutes.
close
LTFS attempts to write down an index when a file is written and closed.
unmount
LTFS does not attempt to write down any index automatically, except to unmount the tape medium.
-o trace
Enable diagnostic output (same as verbose=3).
-o syslogtrace
Enable diagnostic output to stderr and syslog (same as verbose=303).
-o uid=N
Set the owner of the file or directory in the tape medium to mount. The default is the user who is running the ltfs.
Specify the user ID (UID) for N. Obtain the UID by running the id command with the -u option. For example, id -u root returns the UID of the root user.
-o umask=MASK
Set the mask for the file or directory permission. The default is no mask. The value for MASK is a three-digit octal number.
-o work_directory=<dir>
The LTFS work directory. The default for this field is /tmp/ltfs. If the specified directory does not exist, LTFS creates it.
-o verbose=<num>
Override output verbosity directly. Specify the verbose level of stderror output with the digits in the tens place and ones place. Specify the verbose level of syslog output with the digit in the hundreds place. The verbose level of stderror must be equal to or greater than the verbose level of syslog. Otherwise, LTFS sets the verbose level of syslog to the verbose level of stderror automatically (default: 2).
Possible verbose level values are 1, 2, or 3:
  • 1: Warning only.
  • 2: Info.
  • 3: Debug.
For example, setting verbose=303 enable diagnostic output to stderr and syslog.
-V
Output version information and exit.

FUSE options (Linux only)

-o gid=N
Set file group.
-o noforget
Option for FUSE to support NFS.
-o uid=N
Set file owner.
-o umask=M
Set file permissions (octal).

Mounting LTFS by a user other than root

To mount LTFS by a normal user, check the following conditions:
  1. For macOS only, the user logs on as an administrator.
  2. The user has write permission for the work directory (default: /tmp/ltfs).
  3. The user has write permission for the mount point.
  4. For Linux only, the file mode /usr/bin/fusermount is set to chmod 4755.
  5. For Linux only, user_allow_other is added to the file /opt/ibm/ltfssde/etc/fuse.conf.