LTFS - Mounting tapes using IBM driver

Hello
I am struggling to get the the IBM ltfssde-2.4.5.1-10503-RHEL8.x86_64.rpm LTFS driver working on Rocky 8.9. I was wondering if anyone else has got it working ?
Thank you

[root@ltfs-linux-localdomain INSTALLERS]# sudo yum install ltfssde-2.4.5.1-10503-RHEL8.x86_64.rpm
Last metadata expiration check: 2:55:31 ago on Mon 17 Jul 2023 09:31:10 AM CEST.
Dependencies resolved.
=====================================================================================
 Package          Architecture    Version                Repository             Size
=====================================================================================
Installing:
 ltfssde          x86_64          2.4.5.1-10503          @commandline          520 k

Transaction Summary
=====================================================================================
Install  1 Package

Total size: 520 k
Installed size: 4.2 M
Is this ok [y/N]: y
Downloading Packages:
Running transaction check
Transaction check succeeded.
Running transaction test
Transaction test succeeded.
Running transaction
  Preparing        :                                                             1/1 
  Running scriptlet: ltfssde-2.4.5.1-10503.x86_64                                1/1 
  Installing       : ltfssde-2.4.5.1-10503.x86_64                                1/1 
  Running scriptlet: ltfssde-2.4.5.1-10503.x86_64                                1/1 
Created symlink /etc/systemd/system/multi-user.target.wants/ltfssde.service → /etc/systemd/system/ltfssde.service.

  Verifying        : ltfssde-2.4.5.1-10503.x86_64                                1/1 

Installed:
  ltfssde-2.4.5.1-10503.x86_64                                                       

[root@ltfs-linux-localdomain INSTALLERS]# ltfs
bash: ltfs: command not found...
[root@ltfs-linux-localdomain INSTALLERS]# ltfs -o devname=/dev/sg10 /mnt/ltfs
bash: ltfs: command not found...
[admin@ltfs-linux-localdomain patrick]$ sudo mt -f /dev/st1 status
SCSI 2 tape drive:
File number=0, block number=0, partition=0.
Tape block size 0 bytes. Density code 0x5c (no translation).
Soft error count since last status=0
General status bits on (41010000):
 BOT ONLINE IM_REP_EN

Sometimes, if the path was updated during install of that package you need to log out and login again. Alternatively, you will need to use the full path to ltfs, so:

rpm -ql ltfssde

to find out where ltfs binary exists and then:

/path/to/bin/ltfs

based on whatever the path is. Never used that package, so no idea if it updates path statements or not.

You can then configure the path yourself automatically by editing your bash scripts, or just write the full path each time you want to run it.

You can also use:

systemctl status ltfssde

to make sure the package installed and ran the service successfully.

Thank you very much for your help. Your commands are very useful.

systemctl status ltfssde
● ltfssde.service - IBM Spectrum Archive SDE
   Loaded: loaded (/etc/systemd/system/ltfssde.service; enabled; vendor preset: disabled)
   Active: active (exited) since Tue 2023-07-18 18:45:59 CEST; 15h ago
  Process: 1251 ExecStart=/opt/ibm/ltfssde/share/ltfs/ltfssde start (code=exited, status=0/SUCCESS)
 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.

systemctl list-units --type=service --state=active
ltfssde.service                                    loaded active exited  IBM Spectrum Archive SDE 

When I try to run

cd /etc/systemd/system/
[admin@ltfs-linux-localdomain system]$ sudo ./ltfssde.service
sudo: ./ltfssde.service: command not found

Looks like the ltfs app does not work …

The systemd service shows as started from the systemctl status command. That part is working. You cannot run it with sudo or without sudo - systemd doesn’t work like that. It’s started, which mean that bit is OK. What you need now is the path to wherever ltfs is assuming this is a valid binary command. So you now need to check using the rpm command I gave in my previous post to find out what the content of that rpm is and where it is located on the disk. If bin/ltfs is listed as one of the files maybe /opt/ltfs/bin for example, then you will need to specify the full path to ltfs to run it. Or you can add /opt/ltfs/bin to your PATH so that each time you login the path will be set, and you can then just write ltfs on it’s own like you tried earlier.

I don’t know what the path is, until you check the contents of the rpm using the command I gave. But if it is in there, it will show bin or sbin there somewhere.

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