LTFS - Mounting tapes using IBM driver

iwalker , Thank you so much for your help. I have learn a lot.

Eventually, I have managed to mount the LTFS tape as a folder on Rocky 8.8.

Below is a newbie guide to how I did it, with your help …

IBM LTFS DRIVER LINUX INSTALL - 2023

PROCEDURE

  1. make sure that the LTO DRIVE is connected correctly, you have “mt” installed

  2. lsscsi -g will list all scsi available machines. Below are 2 tape IBM ULTRIUM-HH7 drives.

lsscsi -g
[0:2:0:0]    disk    DELL     PERC H310        2.12  /dev/sda   /dev/sg0 
[1:0:0:0]    tape    IBM      ULTRIUM-HH7      MA71  /dev/st0   /dev/sg2 
[1:0:1:0]    tape    IBM      ULTRIUM-HH7      MA71  /dev/st1   /dev/sg3 
[1:0:1:1]    mediumx QUANTUM  Scalar i40-i80   190G  /dev/sch0  /dev/sg4 
[6:0:0:0]    cd/dvd  TSSTcorp DVD-ROM SN-108DN D150  /dev/sr0   /dev/sg1

The 2 drives are accessible at either /dev/st0 or /dev/sg2 & /dev/st1 or /dev/sg3

If you are having trouble seeing the LTO drives, it maybe due to old driver issues. The link below may inspire you …

It is VERY important to identify as you will need these paths to modify the IBM instructions

  1. INSTALL IBM LTFS

You can download the latest drivers for free from the IBM website, but you need an account.
The instruction below explain how to install the rpm.

NOTE VERY IMPORTANT : Check that all is installed in /opt/ibm/ltfsde/bin
All ltfs commands must be delivered from the bin folder directly.

Once installed …

rpm -q ltfssde
ltfssde-2.4.5.1-10503.x86_64

I was unable to get the service active …

systemctl status ltfssde
● ltfssde.service - IBM Spectrum Archive SDE
   Loaded: loaded (/etc/systemd/system/ltfssde.service; enabled; vendor preset: disab>
   Active: active (exited) since Tue 2023-07-18 18:45:59 CEST; 5 days ago
  Process: 1251 ExecStart=/opt/ibm/ltfssde/share/ltfs/ltfssde start (code=exited, sta>
 Main PID: 1251 (code=exited, status=0/SUCCESS)
    Tasks: 0 (limit: 151629)
   Memory: 0B
   CGroup: /system.slice/ltfssde.service

Jul 18 18:45:59 ltfs-linux-localdomain systemd[1]: Starting IBM Spectrum Archive SDE.>
Jul 18 18:45:59 ltfs-linux-localdomain systemd[1]: Started IBM Spectrum Archive SDE.

But when I activated the service directy, I got a positive return … One of the drives was seen at /dev/sg2

sudo /opt/ibm/ltfssde/bin/ltfs -o device_list
240f0 LTFS14000I LTFS starting, LTFS version 2.4.5.1 (10503), log level 2.
240f0 LTFS14058I LTFS Format Specification version 2.4.0.
240f0 LTFS14104I Launched by "/opt/ibm/ltfssde/bin/ltfs -o device_list".
240f0 LTFS14105I This binary is built for Linux (x86_64).
240f0 LTFS14106I GCC version is 8.3.1 20191121 (Red Hat 8.3.1-5).
240f0 LTFS17087I Kernel version: Linux version 4.18.0-477.15.1.el8_8.x86_64 (mockbuild@iad1-prod-build001.bld.equ.rockylinux.org) (gcc version 8.5.0 20210514 (Red Hat 8.5.0-18) (GCC)) #1 SMP Wed Jun 28 15:04:18 UTC 2023 i386.
240f0 LTFS17089I Distribution: Rocky Linux release 8.8 (Green Obsidian).
240f0 LTFS17089I Distribution: NAME="Rocky Linux".
240f0 LTFS17089I Distribution: Rocky Linux release 8.8 (Green Obsidian).
240f0 LTFS17089I Distribution: Rocky Linux release 8.8 (Green Obsidian).
240f0 LTFS17089I Distribution: Rocky Linux release 8.8 (Green Obsidian).
240f0 LTFS17085I Plugin: Loading "sg" tape backend.
Tape Device list:.
Device Name = /dev/sg2 (1.0.1.0), Vendor ID = IBM     , Product ID = ULTRIUM-HH7     , Serial Number = C38E748000, Product Name =[ULTRIUM-HH7].
  1. Below is the official mounting procedure

I created the /mnt/ltfs folder

But I had to adjust the mount command so that it found the device name above …

sudo /opt/ibm/ltfssde/bin/ltfs -o devname=/dev/sg2 /mnt/ltfs

242a1 LTFS14000I LTFS starting, LTFS version 2.4.5.1 (10503), log level 2.
242a1 LTFS14058I LTFS Format Specification version 2.4.0.
242a1 LTFS14104I Launched by "/opt/ibm/ltfssde/bin/ltfs -o devname=/dev/sg2 /mnt/ltfs".
242a1 LTFS14105I This binary is built for Linux (x86_64).
242a1 LTFS14106I GCC version is 8.3.1 20191121 (Red Hat 8.3.1-5).
242a1 LTFS17087I Kernel version: Linux version 4.18.0-477.15.1.el8_8.x86_64 (mockbuild@iad1-prod-build001.bld.equ.rockylinux.org) (gcc version 8.5.0 20210514 (Red Hat 8.5.0-18) (GCC)) #1 SMP Wed Jun 28 15:04:18 UTC 2023 i386.
242a1 LTFS17089I Distribution: Rocky Linux release 8.8 (Green Obsidian).
242a1 LTFS17089I Distribution: NAME="Rocky Linux".
242a1 LTFS17089I Distribution: Rocky Linux release 8.8 (Green Obsidian).
242a1 LTFS17089I Distribution: Rocky Linux release 8.8 (Green Obsidian).
242a1 LTFS17089I Distribution: Rocky Linux release 8.8 (Green Obsidian).
242a1 LTFS14063I Sync type is "time", Sync time is 300 sec.
242a1 LTFS17085I Plugin: Loading "sg" tape backend.
242a1 LTFS17085I Plugin: Loading "unified" iosched backend.
242a1 LTFS14095I Set the tape device write-anywhere mode to avoid cartridge ejection.
242a1 LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg2).
242a1 LTFS30250I Opened the SCSI tape device 1.0.0.0 (/dev/sg2).
242a1 LTFS30207I Vendor ID is IBM     .
242a1 LTFS30208I Product ID is ULTRIUM-HH7     .
242a1 LTFS30214I Firmware revision is MA71.
242a1 LTFS30215I Drive serial is C38E748004.
242a1 LTFS30285I The reserved buffer size of /dev/sg2 is 1048576.
242a1 LTFS30294I Setting up timeout values from RSOC.
242a1 LTFS17160I Maximum device block size is 1048576.
242a1 LTFS11330I Loading cartridge.
242a1 LTFS30252I Logical block protection is disabled.
242a1 LTFS11332I Load successful.
242a1 LTFS17157I Changing the drive setting to write-anywhere mode.
242a1 LTFS11005I Mounting the volume.
242a1 LTFS30252I Logical block protection is disabled.
242a1 LTFS30205I READ_ATTR (0x8c) returns -20501.
242a1 LTFS30263I READ_ATTR returns Invalid Field in CDB (-20501) /dev/sg2.
242a1 LTFS30233I Cannot read attribute (-20501).
242a1 LTFS11336I The attribute does not exist. Ignore the expected error.
242a1 LTFS30205I READ_ATTR (0x8c) returns -20501.
242a1 LTFS30263I READ_ATTR returns Invalid Field in CDB (-20501) /dev/sg2.
242a1 LTFS30205I READ_ATTR (0x8c) returns -20501.
242a1 LTFS30263I READ_ATTR returns Invalid Field in CDB (-20501) /dev/sg2.
242a1 LTFS30233I Cannot read attribute (-20501).
242a1 LTFS30205I READ_ATTR (0x8c) returns -20501.
242a1 LTFS30263I READ_ATTR returns Invalid Field in CDB (-20501) /dev/sg2.
242a1 LTFS30233I Cannot read attribute (-20501).
242a1 LTFS17227I Tape attribute: Vendor = QUANTUM .
242a1 LTFS17227I Tape attribute: Application Name = LTFS SCALAR                     .
242a1 LTFS17227I Tape attribute: Application Version = 2.5.0.3 .
242a1 LTFS17227I Tape attribute: Medium Label = LTFS VOLUME.
242a1 LTFS17228I Tape attribute: Text Localization ID = 0x00.
242a1 LTFS17227I Tape attribute: Barcode = 000079L7.
242a1 LTFS17227I Tape attribute: Application Format Version = 2.2.0           .
242a1 LTFS17228I Tape attribute: Volume Lock Status = 0x00.
242a1 LTFS17227I Tape attribute: Media Pool name = .
242a1 LTFS11031I Volume mounted successfully. 000079 : Gen = 57 / (a, 5) -> (b, 9433421) / C38E748004.
242a1 LTFS14111I Initial setup completed successfully.
242a1 LTFS14112I Invoke 'mount' command to check the result of final setup.
242a1 LTFS14113I Specified mount point is listed if succeeded.
  1. To check that the tape is mounted
    ls -a /mnt/ltfs/

  2. To unmount the tape …
    sudo umount /mnt/ltfs

1 Like