Tape Storage

 View Only
Expand all | Collapse all

LTO-8 drive on a Linux machine

  • 1.  LTO-8 drive on a Linux machine

    Posted Tue November 30, 2021 07:03 AM
    Hello all,

    Wanted to ask for a little help, and having trouble finding the best place to do that.  Have a somewhat easy question (I think).  I just bought an IBM LTO-8 drive.  Have been installing it on Linux (Red Hat Enterprise Linux machine).  I think I got it all installed following the guides on the IBM support site.

    My question... is there a GUI that I can use to interact with the drive?  Or is it command line only on Linux?  I would like to have a GUI to be able to format, and drag and drop files to do backups.  Is this at all possible.  I installed the IBM Spectrum Archive SDE software (the version 2.4.4 linux package) and it seemed to install.  But I can't seem to access the drive using the GUI file manager.  Is this possible under Linux?

    I have an older LTO drive installed on a Windows machine (using the Spectrum Archive SDE software) and on there.. I can use the File Explorer to format tapes and copy files to/from the drive.  Can I get a GUI on Linux or do I need to use Windows again for this new LTO-8 drive?

    Thanks all!

    -Peter

    ------------------------------
    Peter Berg
    ------------------------------


  • 2.  RE: LTO-8 drive on a Linux machine

    Posted Tue November 30, 2021 07:19 AM
    Yes, Linux version is CLI only.

    1) If the tape is not yet initialized by LTFS, you need to format the tape using mkltfs command (similar to what mkfs command does). 
    https://www.ibm.com/docs/en/spectrum-archive-sde/2.4.4?topic=commands-mkltfs
    2) You need to mount the tape using the ltfs command
    https://www.ibm.com/docs/en/spectrum-archive-sde/2.4.4?topic=commands-ltfs
    3) Access the files using file browser or from the file management tool, like cp command.  Note that some file browser (like Nautilus) attempts to prefetch the file contents to generate the thumbnail icon.   This feature needs to be disabled otherwise the opening the tape by browser will cause the random reads on tape.
    4) When you finish working with the tape.   Unmount the tape using the umount command ejecting the tape.

    ------------------------------
    TAKESHI ISHIMOTO
    ------------------------------



  • 3.  RE: LTO-8 drive on a Linux machine

    Posted Wed December 01, 2021 01:06 AM
    Thank you Takeshi.  That is very helpful.  I have disabled thumbnail creation in Nautilus using the dconf-tools.

    If I could please trouble you to ask a follow up question.

    So have read about using the mkltfs and ltfs commands.  I have formatted a new LTO-8 tape using the mkltfs command and it seemed to work (although the log did show a few errors during that process).  Then I tried to use ltfs to mount the tape, but that process fails.  I can't quite figure out what I am doing wrong. I am trying to follow the command line syntax correctly.

    If it's helpful.. here is the output when I try to mount using ltfs (I also have the log when I formatted the tape with mkltfs).


    [garrison@localhost ibm]$ sudo /opt/ibm/ltfssde/bin/ltfs -o devname=/dev/nst0 /mnt/ltfs
    [sudo] password for garrison:
    33ef LTFS14000I LTFS starting, LTFS version 2.4.4.0 (10470), log level 2.
    33ef LTFS14058I LTFS Format Specification version 2.4.0.
    33ef LTFS14104I Launched by "/opt/ibm/ltfssde/bin/ltfs -o devname=/dev/nst0 /mnt/ltfs".
    33ef LTFS14105I This binary is built for Linux (x86_64).
    33ef LTFS14106I GCC version is 8.3.1 20191121 (Red Hat 8.3.1-5).
    33ef LTFS17087I Kernel version: Linux version 4.18.0-348.2.1.el8_5.x86_64 (mockbuild@x86-vm-08.build.eng.bos.redhat.com) (gcc version 8.5.0 20210514 (Red Hat 8.5.0-4) (GCC)) #1 SMP Mon Nov 8 13:30:15 EST 2021 i386.
    33ef LTFS17089I Distribution: NAME="Red Hat Enterprise Linux".
    33ef LTFS17089I Distribution: Red Hat Enterprise Linux release 8.5 (Ootpa).
    33ef LTFS17089I Distribution: Red Hat Enterprise Linux release 8.5 (Ootpa).
    33ef LTFS14063I Sync type is "time", Sync time is 300 sec.
    33ef LTFS17085I Plugin: Loading "sg" tape backend.
    33ef LTFS17085I Plugin: Loading "unified" iosched backend.
    33ef LTFS14095I Set the tape device write-anywhere mode to avoid cartridge ejection.
    33ef LTFS30209I Opening a device through sg-ibmtape driver (/dev/nst0).
    33ef LTFS30250I Opened the SCSI tape device 0.0.0.-1 (/dev/nst0).
    33ef LTFS30207I Vendor ID is IBM .
    33ef LTFS30208I Product ID is ULTRIUM-HH8 .
    33ef LTFS30214I Firmware revision is M571.
    33ef LTFS30215I Drive serial is 1097008781.
    33ef LTFS30285I The reserved buffer size of /dev/nst0 is 1048576.
    33ef LTFS30294I Setting up timeout values from RSOC.
    33ef LTFS17160I Maximum device block size is 1048576.
    33ef LTFS11330I Loading cartridge.
    33ef LTFS30252I Logical block protection is disabled.
    33ef LTFS11332I Load successful.
    33ef LTFS17157I Changing the drive setting to write-anywhere mode.
    33ef LTFS11005I Mounting the volume.
    33ef LTFS30252I Logical block protection is disabled.
    33ef LTFS30216W Length mismatch is detected. (Act = 524288, resid = 0, resid_sense = 523281).
    33ef LTFS30216W Length mismatch is detected. (Act = 524288, resid = 0, resid_sense = 523281).
    33ef LTFS12049E Cannot read: backend call failed (-21716).
    33ef LTFS17039E XML parser: failed to read a block from the medium (-21716).
    33ef LTFS17037E XML parser: failed to read from XML stream.
    33ef LTFS17273E XML parser: Detected an I/O error on reading an index from the tape (-21716).
    33ef LTFS17016E Cannot parse index direct from medium (-21716).
    33ef LTFS11194W Cannot read index: failed to read and parse XML data (-21716).
    33ef LTFS11024E Cannot mount volume: read index failed on the index partition.
    33ef LTFS14013E Cannot mount the volume.
    33ef LTFS30252I Logical block protection is disabled.
    [garrison@localhost ibm]$



    Do you see any errors I am making and see what could be the problem?  Any help would be much appreciated.  Thank you.

    -Peter Berg

    ------------------------------
    Peter Berg
    ------------------------------



  • 4.  RE: LTO-8 drive on a Linux machine

    Posted Wed December 01, 2021 01:18 AM
    1) Please use sgXX rather than stXX or nstXX. 
    2) If sgXX does not solve the problem, please check your HBA.   If this is a RAID controller, suggest to use the plain SAS adapter.

    ------------------------------
    TAKESHI ISHIMOTO
    ------------------------------



  • 5.  RE: LTO-8 drive on a Linux machine

    Posted Wed December 01, 2021 01:52 AM
    Thank you Takeshi.  I have tried to run the ltfs command with sg0, sg1, sg10 but none of those are working.

    When I do a hardware scan of the system using lshw.. this is what I get for the HBA and LTO drive.  Seems like the LTO drive is coming up as nst0 for some reason?  I got the ATTO H1244GT SAS card.. and it seems to be installed ok and I can see it when I run the ATTO config tool.  I guess I can check with ATTO to make sure it is setup and configured correctly?  Anything else I can check or try?

    *-sas
    description: Serial Attached SCSI controller
    product: ExpressSAS GT 12Gb/s SAS/SATA HBA
    vendor: ATTO Technology, Inc.
    physical id: 0
    bus info: pci@0000:01:00.0
    logical name: scsi4
    version: 00
    width: 64 bits
    clock: 33MHz
    capabilities: sas pm msi pciexpress msix vpd bus_master cap_list rom scsi-host
    configuration: driver=esas5hba latency=0
    resources: irq:16 memory:faf00000-faffffff memory:fae00000-faefffff memory:fbc00000-fbcfffff ioport:e800(size=256) memory:fbec0000-fbefffff
    *-enclosure UNCLAIMED
    description: SCSI Enclosure
    product: VirtualSES
    vendor: ATTO
    physical id: 0.0.0
    bus info: scsi@4:0.0.0
    version: 0001
    serial: 300108600009FCC0
    configuration: ansiversion=7
    *-tape
    description: SCSI Tape
    product: ULTRIUM-HH8
    vendor: IBM
    physical id: 0.1.0
    bus info: scsi@4:0.1.0
    logical name: /dev/nst0
    version: M571
    serial: 1097008781
    capabilities: removable
    configuration: ansiversion=6




    ------------------------------
    Peter Berg
    ------------------------------



  • 6.  RE: LTO-8 drive on a Linux machine

    Posted Wed December 01, 2021 06:02 AM
    I believe each tape device will have the device name of sg, st and nst.   Try lsscsi and determine the sg device name.

    Yes, please ask ATTO if they have tested with the tape and software because the adapter is not listed in the IBM hardware compatibility list at https://www.ibm.com/systems/support/storage/ssic/interoperability.wss
    We tested with non-GT version of 6Gb ATTO adapters (ExpressSAS H6F0, H680, H644) in the past on Mac, but not your adapter on Linux.  The LTFS30216W message typically appears if you use RAID adapter which does not allow us to read/write the variable-length blocks properly.

    ------------------------------
    TAKESHI ISHIMOTO
    ------------------------------



  • 7.  RE: LTO-8 drive on a Linux machine

    Posted Wed December 01, 2021 02:54 PM
    Thanks.  I did run lsscsi and got this:

    [garrison@localhost sbin]$ lsscsi
    [0:0:0:0] disk ATA WDC WD5000YS-01M 2E07 /dev/sda
    [0:0:1:0] cd/dvd HL-DT-ST DVD-ROM DH40N A100 /dev/sr0
    [4:0:0:0] enclosu ATTO VirtualSES 0001 -
    [4:0:1:0] tape IBM ULTRIUM-HH8 M571 /dev/st0

    So here the drive is being recognized as /dev/st0.  Although when I run lshw it is listed as /dev/nst0

    Is that odd?  I am working with ATTO support to see if they can help run down the issue.  See if there is something not configured right on the HBA.  We are trying to confirm that it's not running in RAID (PowerCenter Pro) mode.  I know this is a newer HBA (PCI 4.0 version of their HBA) and it doesn't seem like this combo (RHEL 8.5, Spectrum 2.4.4.0, and this HBA and driver) has been tested.

    I appreciate your help and insight very much.

    -Peter Berg


    ------------------------------
    Peter Berg
    ------------------------------



  • 8.  RE: LTO-8 drive on a Linux machine

    Posted Wed December 01, 2021 06:47 PM
    lsscsi with -g option (or --generic) will display the sg device name.

    ------------------------------
    TAKESHI ISHIMOTO
    ------------------------------



  • 9.  RE: LTO-8 drive on a Linux machine

    Posted Fri December 03, 2021 01:34 AM
    Thank you for the extra suggestions.

    So I did run lsscsi -g.  The tape drive is listed as /dev/sg3

    so I re ran mkltfs (to reformat) and ltfs (to mount the tape after) again.. this time using the /dev/sg3 address.  Unfortunately I am still getting errors and the tape will not mount.  When running these commands.. I usually do run them as sudo.. just to reduce the chance of any permission issues.

    I did run 'sudo ltfs -o device_list'  Unfortunately it didn't return any devices.  I just get this:

    [garrison@localhost /]$ /opt/ibm/ltfssde/bin/ltfs -o device_list
    7900 LTFS14000I LTFS starting, LTFS version 2.4.4.0 (10470), log level 2.
    7900 LTFS14058I LTFS Format Specification version 2.4.0.
    7900 LTFS14104I Launched by "/opt/ibm/ltfssde/bin/ltfs -o device_list".
    7900 LTFS14105I This binary is built for Linux (x86_64).
    7900 LTFS14106I GCC version is 8.3.1 20191121 (Red Hat 8.3.1-5).
    7900 LTFS17087I Kernel version: Linux version 4.18.0-348.2.1.el8_5.x86_64 (mockbuild@x86-vm-08.build.eng.bos.redhat.com) (gcc version 8.5.0 20210514 (Red Hat 8.5.0-4) (GCC)) #1 SMP Mon Nov 8 13:30:15 EST 2021 i386.
    7900 LTFS17089I Distribution: NAME="Red Hat Enterprise Linux".
    7900 LTFS17089I Distribution: Red Hat Enterprise Linux release 8.5 (Ootpa).
    7900 LTFS17089I Distribution: Red Hat Enterprise Linux release 8.5 (Ootpa).
    7900 LTFS17085I Plugin: Loading "sg" tape backend.
    Tape Device list:.
    [garrison@localhost /]$


    The errors I am getting when trying to mount the tape are:

    [garrison@localhost /]$ sudo /opt/ibm/ltfssde/bin/ltfs -o devname=/dev/sg3 /mnt/ltfs
    7887 LTFS14000I LTFS starting, LTFS version 2.4.4.0 (10470), log level 2.
    7887 LTFS14058I LTFS Format Specification version 2.4.0.
    7887 LTFS14104I Launched by "/opt/ibm/ltfssde/bin/ltfs -o devname=/dev/sg3 /mnt/ltfs".
    7887 LTFS14105I This binary is built for Linux (x86_64).
    7887 LTFS14106I GCC version is 8.3.1 20191121 (Red Hat 8.3.1-5).
    7887 LTFS17087I Kernel version: Linux version 4.18.0-348.2.1.el8_5.x86_64 (mockbuild@x86-vm-08.build.eng.bos.redhat.com) (gcc version 8.5.0 20210514 (Red Hat 8.5.0-4) (GCC)) #1 SMP Mon Nov 8 13:30:15 EST 2021 i386.
    7887 LTFS17089I Distribution: NAME="Red Hat Enterprise Linux".
    7887 LTFS17089I Distribution: Red Hat Enterprise Linux release 8.5 (Ootpa).
    7887 LTFS17089I Distribution: Red Hat Enterprise Linux release 8.5 (Ootpa).
    7887 LTFS14063I Sync type is "time", Sync time is 300 sec.
    7887 LTFS17085I Plugin: Loading "sg" tape backend.
    7887 LTFS17085I Plugin: Loading "unified" iosched backend.
    7887 LTFS14095I Set the tape device write-anywhere mode to avoid cartridge ejection.
    7887 LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg3).
    7887 LTFS30250I Opened the SCSI tape device 4.0.1.0 (/dev/sg3).
    7887 LTFS30207I Vendor ID is IBM .
    7887 LTFS30208I Product ID is ULTRIUM-HH8 .
    7887 LTFS30214I Firmware revision is M571.
    7887 LTFS30215I Drive serial is 1097008781.
    7887 LTFS30285I The reserved buffer size of /dev/sg3 is 1048576.
    7887 LTFS30294I Setting up timeout values from RSOC.
    7887 LTFS17160I Maximum device block size is 1048576.
    7887 LTFS11330I Loading cartridge.
    7887 LTFS30252I Logical block protection is disabled.
    7887 LTFS11332I Load successful.
    7887 LTFS17157I Changing the drive setting to write-anywhere mode.
    7887 LTFS11005I Mounting the volume.
    7887 LTFS30252I Logical block protection is disabled.
    7887 LTFS30216W Length mismatch is detected. (Act = 524288, resid = 0, resid_sense = 523281).
    7887 LTFS30216W Length mismatch is detected. (Act = 524288, resid = 0, resid_sense = 523281).
    7887 LTFS12049E Cannot read: backend call failed (-21716).
    7887 LTFS17039E XML parser: failed to read a block from the medium (-21716).
    7887 LTFS17037E XML parser: failed to read from XML stream.
    7887 LTFS17273E XML parser: Detected an I/O error on reading an index from the tape (-21716).
    7887 LTFS17016E Cannot parse index direct from medium (-21716).
    7887 LTFS11194W Cannot read index: failed to read and parse XML data (-21716).
    7887 LTFS11024E Cannot mount volume: read index failed on the index partition.
    7887 LTFS14013E Cannot mount the volume.
    7887 LTFS30252I Logical block protection is disabled.
    _________________________________________

    So still not sure what could be happening.  Quite a bit frustrating.  Anything else I could be missing or doing wrong here?

    Thanks so much,
    Peter Berg

    ------------------------------
    Peter Berg
    ------------------------------



  • 10.  RE: LTO-8 drive on a Linux machine

    Posted Fri December 03, 2021 02:26 AM
    Another ATTO HBA makes the same behavior on Linux. It works fine on Mac.

    • https://github.com/LinearTapeFileSystem/ltfs/wiki/HBA-info#hbas-work-with---enable-buggy-ifs-option-on-configure-script
    • https://github.com/LinearTapeFileSystem/ltfs/issues/51
    • https://github.com/LinearTapeFileSystem/ltfs/issues/74

    I think ATTO driver for Linux doesn't report residual length correctly.  Please download the open source version and compile with `--enable-buggy-ifs` to the configure script. 

    https://github.com/LinearTapeFileSystem/ltfs/releases/tag/v2.4.4.0-10470



    ------------------------------
    ---
    ATSUSHI ABE
    ------------------------------



  • 11.  RE: LTO-8 drive on a Linux machine

    Posted Fri December 03, 2021 02:38 PM
    Thank you for that further info about the open source driver.  I also know I do not have the latest firmware installed on the LTO-8 drive (it has the Firmware revision M571).  I'm not sure if newer firmware would be helpful in this case or not?

    I have been working with a member of the ATTO tech support team to see if they could help see if it was indeed anything with the HBA card, driver, etc.  They do seem interested in figuring out what the issue might be and why their card and software isn't working with this Linux configuration.  Maybe there is a way to connect the tech support teams to figure out why these errors are coming up and what is not working fully with their software drivers?

    I will look into this open source driver and also possibly doing a Windows install (to see if an alternate configuration solves the issue).

    Thank you again for all the assistance.

    -Peter Berg

    ------------------------------
    Peter Berg
    ------------------------------



  • 12.  RE: LTO-8 drive on a Linux machine

    Posted Sat December 04, 2021 01:30 AM
    > I also know I do not have the latest firmware installed on the LTO-8 drive (it has the Firmware revision M571).  I'm not sure if newer firmware would be helpful in this case or not?

    I don't think so. Residual length handling in tape drive is core function. I don't believe the drive team did such fix of fix after GA.

    > I have been working with a member of the ATTO tech support team to see if they could help see if it was indeed anything with the HBA card, driver, etc.  They do seem interested in figuring out what the issue might be and why their card and software isn't working with this Linux configuration.  Maybe there is a way to connect the tech support teams to figure out why these errors are coming up and what is not working fully with their software drivers?

    The key is the SG_IO request of the sg driver. SG_IO request have a sg_io_hdr_t when it is called. Usually, residual length is stored into sg_io_hdr_t::resid and LTFS checks it is matched to the sense data returned from the drive when an underrun condition happens.

    In the ATTO driver, sg_io_hdr_t::resid looks always zero. I think LTFS can work file if the ATTO driver returns correct residual length (in SCSI layer) into sg_io_hdr_t::resid .

    ------------------------------
    ---
    ATSUSHI ABE
    ------------------------------



  • 13.  RE: LTO-8 drive on a Linux machine

    Posted Thu December 02, 2021 09:36 AM
    You can use "sudo ltfs -o device_list" for listing available devices.

    https://www.ibm.com/docs/en/spectrum-archive-sde/2.4.4?topic=systems-mounting-tape-media

    ------------------------------
    ---
    ATSUSHI ABE
    ------------------------------



  • 14.  RE: LTO-8 drive on a Linux machine

    Posted Thu December 02, 2021 09:38 AM
    Edited by ATSUSHI ABE Fri December 03, 2021 02:59 AM
    This message was posted unexpectedly. Please ignore...

    ------------------------------
    ATSUSHI ABE
    ------------------------------