Giter VIP home page Giter VIP logo

yatm's Introduction

YATM Logo

YATM aka Yet Another Tape Manager

YATM is a first-of-its-kind open-source tape manager for LTO tape via LTFS tape format. It performs the following features:

20230928-023325

20230928-023638@

  • Depends on LTFS, an open format for LTO tapes. You don't need to be bundled into a private tape format anymore!
  • A frontend manager, based on GRPC, React, and Chonky file browser. It contains a file manager, a backup job creator, a restore job creator, a tape manager, and a job manager.
    • The file manager allows you to organize your files in a virtual file system after backup. Decouples file positions on tapes with file positions in the virtual file system.
    • The job manager allows you to select which tape drive to use and tells you which tape is needed while executing a restore job.
  • Fast copy with file pointer preload, uses ACP. Optimized for linear devices like LTO tapes.
  • Sorted copy order depends on file position on tapes to avoid tape shoe-shining.
  • Hardware envelope encryption for every tape (not properly implemented now, will improve as next step).

Dependency

Hardware

YATM needs at least one LTO tape drive that supports LTFS (LTO-5 or above). You may run this software as an offline HDD manager, but the current implementation doesn't support this application yet (pull requests are welcomed).

Because of the lack of test devices, this software only supports the amd64 platform.

Software

YATM will use several software, depending on your hardware. It would be best if you put binaries of the following software in PATH. Or you can modify those shell scripts in /scripts to make them run smoothly.

  • Linux system on amd64 platform. There are some other os and arch are experimentally supported (you can download those pre-compile binaries in Releases), but they are not tested. I've only thoroughly tested it on Debian 11/12. If you hit problems while using it on other distributions, please submit an issue. Pull requests are welcomed if you could port it to BSD or other architecture. Windows is not supported because its mount mechanism is hugely different compared to unix-like systems.
  • LTFS, to format and mount LTO tape via LTFS. You can use OpenLTFS, HPE LTFS or IBM LTFS, depending on you tape drive hardware. You may need to change codes to run on your platform.
    • The current script is tested on HPE LTFS. If you use other LTFS software, you may need to modify /scripts/mkfs and /scripts/mount. If you find those scripts are not appropriate for other LTFS software, please create a pull request.
  • Stenc, to manage hardware encryption on LTO tape drives.

Install

You can run this automatic release install script to install/update to the latest release:

bash <(curl -L https://raw.githubusercontent.com/samuelncui/yatm/main/install-release.sh)

Or you can download binary from releases, and run the following shell commands.

# If you put this to other path, you need to change scripts and systemd service file.
mkdir -p /opt/yatm
tar -xvzf yatm-linux-amd64-${RELEASE_VERSION}.tar.gz -C /opt/yatm

cp /opt/yatm/config.example.yaml /opt/yatm/config.yaml
# change config file depends on your demand.
vim /opt/yatm/config.yaml

systemctl enable /opt/yatm/yatm-httpd.service
systemctl start yatm-httpd.service

Warning!

When a backup job is done (or at least this tape is full), the tape will be ejected after umount by default. I suggest you enable the write-protect switch immediately. There is a possibility that the tape driver writes to the index partition when mounting tape, which can cause index loss. If you know the reason for this weird behavior, please tell me via email or issue.

Nginx Reverse Proxy

YATM is based on GRPC, which needs HTTP2 to be functional. You can reference the following nginx config to reverse proxy YATM.

server {
    # needs http2 to proxy grpc
    listen 443 ssl http2;
    listen [::]:443 ssl http2;

    server_name example.com;
    # if you use basic auth, ssl is critical for protect your password
    include includes/ssl.conf;

    proxy_connect_timeout 60;
    proxy_send_timeout 3600;
    proxy_read_timeout 3600;
    send_timeout 3600;
    client_max_body_size 4g;

    proxy_buffer_size 1024k;
    proxy_buffers 4 2048k;
    proxy_busy_buffers_size 2048k;

    http2_max_requests 10000000;

    location / {
        # you can use basic auth to protect your site
        auth_basic              "restricted";
        auth_basic_user_file    includes/passwd;

        proxy_set_header Host $host;
        proxy_set_header X-Real-IP $remote_addr;
        proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
        proxy_pass http://127.0.0.1:8080;
    }
}

Thanks

yatm's People

Contributors

mnott avatar samuelncui avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar

yatm's Issues

Will there be tar support?

Tar is an open format and is easy to use (with tar c(x)vf /dev/st0 ... ). It can support lto4 and older tape/drives, which are much cheaper.

Edit: tar tapes can even be accessed on windows using cygwin.

Multiple backup jobs on a single tape

I was wondering if there is a limitation when performing a backup job to the same tape, here are the steps that I did:

  1. I initially archived a small batch of content as a test
  2. performed a few restores to learn how the tools worked
  3. attempted to perform a backup job to the same tape with the same barcode and name (just trying to append data)
  4. The job started and the logs seemed to state formatting and adding partitions a and b (I am a noob but this sounds like erasing, I let it go)
  5. several hours later I am hit with this DB constraint warning (if this is an intended limitation, I can look into a PR for a pre-check on this so it doesn't tell you after erasing and writing)
time="2024-03-25T23:39:24-04:00" level=error msg="make tape has error, barcode= 'BLU000' name= 'BLU000'" error="create tape fail, barcode= 'BLU000' name= 'BLU000', save tape fail, err= constraint failed: UNIQUE constraint failed: tapes.barcode (2067)"

If this is intended behaviour, do you think it would be possible to allow appending data to an existing tape when you don't have enough data to fill it upfront? I understand there may be other complexities. I haven't investigated what happens if you enqueue a backup job that exceeds your tape's capacity, does the tool allow "continuation" on the next tape?

Thanks for this great project, it is great for smaller more arbitrary archiving. I am interested in trying to contribute if help is needed anywhere!

stenc 2.0.0 no longer supports -kd

When ./scripts/encrypt calls stenc, the -kd flag is not recognised:

time="2024-06-24T20:19:43+01:00" level=info msg="+ ./stenc -f /dev/tape/by-id/scsi-HUJ414057K -e on -k /tmp/2888885715.key -kd AAA000 -a 1 --ckod"
time="2024-06-24T20:19:43+01:00" level=info msg="Usage: stenc [OPTION...]"
time="2024-06-24T20:19:43+01:00" level=info
time="2024-06-24T20:19:43+01:00" level=info msg="Mandatory arguments to long options are mandatory for short options too."
time="2024-06-24T20:19:43+01:00" level=info msg="  -f, --file=DEVICE        use DEVICE as the tape drive to operate on"
time="2024-06-24T20:19:43+01:00" level=info msg="  -e, --encrypt=ENC-MODE   set encryption mode to ENC-MODE"
time="2024-06-24T20:19:43+01:00" level=info msg="  -d, --decrypt=DEC-MODE   set decryption mode to DEC-MODE"
time="2024-06-24T20:19:43+01:00" level=info msg="  -k, --key-file=FILE      read encryption key and key descriptor from FILE,"
time="2024-06-24T20:19:43+01:00" level=info msg="                           or standard input when FILE is -"
time="2024-06-24T20:19:43+01:00" level=info msg="  -a, --algorithm=INDEX    use encryption algorithm INDEX"
time="2024-06-24T20:19:43+01:00" level=info msg="      --allow-raw-read     mark written blocks to allow raw reads of"
time="2024-06-24T20:19:43+01:00" level=info msg="                           encrypted data"
time="2024-06-24T20:19:43+01:00" level=info msg="      --no-allow-raw-read  mark written blocks to disallow raw reads of"
time="2024-06-24T20:19:43+01:00" level=info msg="                           encrypted data"
time="2024-06-24T20:19:43+01:00" level=info msg="      --ckod               clear key on demount of tape media"
time="2024-06-24T20:19:43+01:00" level=info msg="  -h, --help               print this usage statement and exit"
time="2024-06-24T20:19:43+01:00" level=info msg="      --version            print version information and exit"

It now expects the key descriptior to appear on a new line in the key file:

KEY INPUT SYNTAX
       stenc requires that all keys are entered as text hexadecimal strings,
       with no delimiters in between bytes.  Do not precede your key input
       with 0x.  When using a key file, the second line in the file can
       contain an optional key descriptor that will be displayed with the
       device status (see KEY DESCRIPTORS).

       Keys can be generated using any cryptographically secure entropy
       source, such as the random(4) device or the openssl(1SSL) suite of
       commands.  A 256-bit key file can be created with the following
       command:

              openssl rand -hex 32

       Example 128 bit key:

              000102030405060708090a0b0c0d0e0f

       Example 256 bit key:

              000102030405060708090a0b0c0d0e0f000102030405060708090a0b0c0d0e0f

       Example 256 key file with key descriptor:

              000102030405060708090a0b0c0d0e0f000102030405060708090a0b0c0d0e0f
              April backup key

This can probably be worked around by either appending the descriptor in newKey(), or in ./scripts/encrypt.

Web page + service crash upon Loading tape for job with multiple TBs

Hi Everyone, I'm trying to use LTFS and YATM into an ULTRIUM-HH8 tape reader for the first time and in my tests everything has been going well.

However, I have this issue where I add directories with multiple TBs of data to be loaded into an LTO-8 tape, upon selecting a tape and adding the barcode. my browser starts to consume all of my RAM and CPU, the page crashes and in the logs, YATM is getting stuck in mounting the tape.

I have to keep restarting the service and trying to delete the job multiple times until I am able to get access to the web gui again. in some of my smaller tests of 50GB single files being sent to tape it works ok.

This is running in an actual Dell PowerEdge 7415 server running CentOS 7.9

1x AMD EPYC 7401P
128GB RAM
256 O.S SSD

So I find it difficult that this would happen due to hardware limitations.

Does anyone have a clue of what can it be? When I issue LTFS commands and send data to the tape via CLI everything works fine.

Any help would be appreciated

Here are some logs:

time="2024-03-04T09:58:45+01:00" level=info msg="walk source all finished, get 251890 sources"
time="2024-03-04T10:06:00+01:00" level=info msg="+ mt -f /dev/nst0 load"
time="2024-03-04T10:06:00+01:00" level=info msg="+ sleep 5"
time="2024-03-04T10:06:05+01:00" level=info msg="+ sleep 3"
time="2024-03-04T10:06:08+01:00" level=info msg="+++ dirname ./scripts/mkfs"
time="2024-03-04T10:06:08+01:00" level=info msg="++ cd ./scripts"
time="2024-03-04T10:06:08+01:00" level=info msg="++ pwd"
time="2024-03-04T10:06:08+01:00" level=info msg="+ CURDIR=/opt/yatm/scripts"
time="2024-03-04T10:06:08+01:00" level=info msg="++ /opt/yatm/scripts/get_device"
time="2024-03-04T10:06:08+01:00" level=info msg="+ SG_DEVICE=/dev/sg8"
time="2024-03-04T10:06:08+01:00" level=info msg="+ /opt/ibm/ltfssde/bin/mkltfs -f -d /dev/sg8 -s 001130 -n GA-1130"
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS9015W Setting the locale to 'en_US.UTF-8'. If this is wrong, please set the LANG environment variable before starting mkltfs."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS15000I Starting mkltfs, LTFS version 2.4.6.1 (10511), log level 2."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS15041I Launched by \"/opt/ibm/ltfssde/bin/mkltfs -f -d /dev/sg8 -s 001130 -n GA-1130\"."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS15042I This binary is built for Linux (x86_64)."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS15043I GCC version is 4.8.5 20150623 (Red Hat 4.8.5-44)."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS17087I Kernel version: Linux version 3.10.0-1160.102.1.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Tue Oct 17 15:42:21 UTC 2023 i386."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS17089I Distribution: CentOS Linux release 7.9.2009 (Core)."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS17089I Distribution: NAME=\"CentOS Linux\"."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS17089I Distribution: CentOS Linux release 7.9.2009 (Core)."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS17089I Distribution: CentOS Linux release 7.9.2009 (Core)."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS15003I Formatting device '/dev/sg8'."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS15004I LTFS volume blocksize: 524288."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS15005I Index partition placement policy: None."
time="2024-03-04T10:06:08+01:00" level=info
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS11337I Update index-dirty flag (1) - 001130 (0x0xcf0220)."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS17085I Plugin: Loading \"sg\" tape backend."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg8)."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS30250I Opened the SCSI tape device 3.0.1.0 (/dev/sg8)."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS30207I Vendor ID is QUANTUM ."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS30208I Product ID is ULTRIUM-HH8     ."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS30214I Firmware revision is K4K5."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS30215I Drive serial is 10WT060567."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS30285I The reserved buffer size of /dev/sg8 is 524288."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS30294I Setting up timeout values from RSOC."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS17160I Maximum device block size is 1048576."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS11330I Loading cartridge."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS11332I Load successful."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS17157I Changing the drive setting to write-anywhere mode."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS15049I Checking the medium (load)."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS15010I Creating data partition b on SCSI partition 1."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS15011I Creating index partition a on SCSI partition 0."
time="2024-03-04T10:06:08+01:00" level=info msg="LTFS17165I Resetting the medium's capacity proportion."
time="2024-03-04T10:06:16+01:00" level=info msg="LTFS11097I Partitioning the medium."
time="2024-03-04T10:06:16+01:00" level=info msg="LTFS30263I MODESELECT returns Mode Parameters Rounded (-20101) /dev/sg8."
time="2024-03-04T10:06:37+01:00" level=info msg="LTFS11100I Writing label to partition b."
time="2024-03-04T10:06:44+01:00" level=info msg="LTFS11278I Writing index to partition b."
time="2024-03-04T10:06:44+01:00" level=info msg="LTFS30205I READ_ATTR (0x8c) returns -20501."
time="2024-03-04T10:06:44+01:00" level=info msg="LTFS30263I READ_ATTR returns Invalid Field in CDB (-20501) /dev/sg8."
time="2024-03-04T10:06:44+01:00" level=info msg="LTFS30233I Cannot read attribute (-20501)."
time="2024-03-04T10:06:44+01:00" level=info msg="LTFS11336I The attribute does not exist. Ignore the expected error."
time="2024-03-04T10:06:44+01:00" level=info msg="LTFS17235I Writing index of 001130 to b (Reason: Format, 0 files) 10WT060567."
time="2024-03-04T10:06:51+01:00" level=info msg="LTFS17236I Wrote index of 001130 (Gen = 1, Part = b, Pos = 5, 10WT060567)."
time="2024-03-04T10:06:51+01:00" level=info msg="LTFS11337I Update index-dirty flag (0) - 001130 (0x0xcf0220)."
time="2024-03-04T10:06:51+01:00" level=info msg="LTFS11100I Writing label to partition a."
time="2024-03-04T10:06:55+01:00" level=info msg="LTFS11278I Writing index to partition a."
time="2024-03-04T10:06:55+01:00" level=info msg="LTFS30205I READ_ATTR (0x8c) returns -20501."
time="2024-03-04T10:06:55+01:00" level=info msg="LTFS30263I READ_ATTR returns Invalid Field in CDB (-20501) /dev/sg8."
time="2024-03-04T10:06:55+01:00" level=info msg="LTFS30233I Cannot read attribute (-20501)."
time="2024-03-04T10:06:55+01:00" level=info msg="LTFS11336I The attribute does not exist. Ignore the expected error."
time="2024-03-04T10:07:00+01:00" level=info msg="LTFS17235I Writing index of 001130 to a (Reason: Format, 0 files) 10WT060567."
time="2024-03-04T10:07:05+01:00" level=info msg="LTFS17236I Wrote index of 001130 (Gen = 1, Part = a, Pos = 5, 10WT060567)."
time="2024-03-04T10:07:05+01:00" level=info msg="LTFS15013I Volume UUID is: ad1ad853-edb4-4e2b-bd74-75172b02ca23."
time="2024-03-04T10:07:05+01:00" level=info
time="2024-03-04T10:07:05+01:00" level=info msg="LTFS15019I Volume capacity is 11712 GB."
time="2024-03-04T10:07:21+01:00" level=info msg="LTFS30252I Logical block protection is disabled."
time="2024-03-04T10:07:21+01:00" level=info msg="LTFS15024I Medium formatted successfully."
time="2024-03-04T10:07:21+01:00" level=info msg="+ sleep 3"
time="2024-03-04T10:07:24+01:00" level=info msg="+++ dirname ./scripts/mount"
time="2024-03-04T10:07:24+01:00" level=info msg="++ cd ./scripts"
time="2024-03-04T10:07:24+01:00" level=info msg="++ pwd"
time="2024-03-04T10:07:24+01:00" level=info msg="+ CURDIR=/opt/yatm/scripts"
time="2024-03-04T10:07:24+01:00" level=info msg="++ /opt/yatm/scripts/get_device"
time="2024-03-04T10:07:24+01:00" level=info msg="+ SG_DEVICE=/dev/sg8"
time="2024-03-04T10:07:24+01:00" level=info msg="+ /opt/ibm/ltfssde/bin/ltfs -o devname=/dev/sg8 -o noatime -o sync_type=unmount -o work_directory=/opt/yatm/captured_indices -o capture_index -o min_pool_size=256 -o max_pool_size=1024 -o eject -s /tmp/3212318303.ltfs"
time="2024-03-04T10:07:24+01:00" level=info msg="LTFS9015W Setting the locale to 'en_US.UTF-8'. If this is wrong, please set the LANG environment variable before starting ltfs."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS14000I LTFS starting, LTFS version 2.4.6.1 (10511), log level 2."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS14058I LTFS Format Specification version 2.4.0."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS14104I Launched by \"/opt/ibm/ltfssde/bin/ltfs -o devname=/dev/sg8 -o noatime -o sync_type=unmount -o work_directory=/opt/yatm/captured_indices -o capture_index -o min_pool_size=256 -o max_pool_size=1024 -o eject -s /tmp/3212318303.ltfs\"."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS14105I This binary is built for Linux (x86_64)."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS14106I GCC version is 4.8.5 20150623 (Red Hat 4.8.5-44)."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS17087I Kernel version: Linux version 3.10.0-1160.102.1.el7.x86_64 ([email protected]) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-44) (GCC) ) #1 SMP Tue Oct 17 15:42:21 UTC 2023 i386."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS17089I Distribution: CentOS Linux release 7.9.2009 (Core)."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS17089I Distribution: NAME=\"CentOS Linux\"."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS17089I Distribution: CentOS Linux release 7.9.2009 (Core)."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS17089I Distribution: CentOS Linux release 7.9.2009 (Core)."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS14064I Sync type is \"unmount\"."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS17085I Plugin: Loading \"sg\" tape backend."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS17085I Plugin: Loading \"unified\" iosched backend."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg8)."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS30250I Opened the SCSI tape device 3.0.1.0 (/dev/sg8)."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS30207I Vendor ID is QUANTUM ."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS30208I Product ID is ULTRIUM-HH8     ."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS30214I Firmware revision is K4K5."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS30215I Drive serial is 10WT060567."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS30285I The reserved buffer size of /dev/sg8 is 524288."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS30294I Setting up timeout values from RSOC."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS17160I Maximum device block size is 1048576."
time="2024-03-04T10:07:24+01:00" level=info msg="9471 LTFS11330I Loading cartridge."
time="2024-03-04T10:07:27+01:00" level=info msg="9471 LTFS11332I Load successful."
time="2024-03-04T10:07:27+01:00" level=info msg="9471 LTFS17157I Changing the drive setting to append-only mode."
time="2024-03-04T10:07:27+01:00" level=info msg="9471 LTFS11005I Mounting the volume."
time="2024-03-04T10:07:43+01:00" level=info msg="9471 LTFS17227I Tape attribute: Vendor = IBM     ."
time="2024-03-04T10:07:43+01:00" level=info msg="9471 LTFS17227I Tape attribute: Application Name = LTFS                            ."
time="2024-03-04T10:07:43+01:00" level=info msg="9471 LTFS17227I Tape attribute: Application Version = 2.4.6.1 ."
time="2024-03-04T10:07:43+01:00" level=info msg="9471 LTFS17227I Tape attribute: Medium Label = GA-1130."
time="2024-03-04T10:07:43+01:00" level=info msg="9471 LTFS17228I Tape attribute: Text Localization ID = 0x81."
time="2024-03-04T10:07:43+01:00" level=info msg="9471 LTFS17227I Tape attribute: Barcode = 001130                          ."
time="2024-03-04T10:07:43+01:00" level=info msg="9471 LTFS17227I Tape attribute: Application Format Version = 2.4.0           ."
time="2024-03-04T10:07:43+01:00" level=info msg="9471 LTFS17228I Tape attribute: Volume Lock Status = 0x00."
time="2024-03-04T10:07:43+01:00" level=info msg="9471 LTFS17227I Tape attribute: Media Pool name = ."
time="2024-03-04T10:07:43+01:00" level=info msg="9471 LTFS11031I Volume mounted successfully. 001130 : Gen = 1 / (a, 5) -> (b, 5) / 10WT060567."
time="2024-03-04T10:07:43+01:00" level=info msg="9471 LTFS14111I Initial setup completed successfully."
time="2024-03-04T10:07:43+01:00" level=info msg="9471 LTFS14112I Invoke 'mount' command to check the result of final setup."
time="2024-03-04T10:07:43+01:00" level=info msg="9471 LTFS14113I Specified mount point is listed if succeeded."
time="2024-03-04T10:07:43+01:00" level=info msg="+ sleep 3"
time="2024-03-04T10:07:46+01:00" level=info msg="++ df /tmp/3212318303.ltfs --output=target"
time="2024-03-04T10:07:46+01:00" level=info msg="++ sed -n '1!p'"
time="2024-03-04T10:07:46+01:00" level=info msg="+ MOUNT_POINT_TARGET=/tmp/3212318303.ltfs"
time="2024-03-04T10:07:46+01:00" level=info msg="+ [[ /tmp/3212318303.ltfs != /tmp/3212318303.ltfs ]]"
time="2024-03-04T10:07:46+01:00" level=info msg="+ echo 'mount '\\''/tmp/3212318303.ltfs'\\'' success'"
time="2024-03-04T10:07:46+01:00" level=info msg="mount '/tmp/3212318303.ltfs' success"
time="2024-03-04T10:14:33+01:00" level=warning msg="update state failed while save job" error="save job fail, err= sql: transaction has already been committed or rolled back"
time="2024-03-04T10:14:33+01:00" level=warning msg="update state failed while save job" error="save job fail, err= context canceled"
time="2024-03-04T10:14:33+01:00" level=warning msg="update state failed while save job" error="save job fail, err= context canceled"
time="2024-03-04T10:14:33+01:00" level=warning msg="update state failed while save job" error="save job fail, err= context canceled"
[root@server ~]# systemctl status yatm-httpd.service -l
โ— yatm-httpd.service - YATM Service
   Loaded: loaded (/opt/yatm/yatm-httpd.service; enabled; vendor preset: disabled)
   Active: active (running) since Mon 2024-03-04 09:43:05 CET; 29min ago
     Docs: https://github.com/samuelncui/yatm/
 Main PID: 30645 (yatm-httpd)
   CGroup: /system.slice/yatm-httpd.service
           โ”œโ”€30645 /opt/yatm/yatm-httpd
           โ””โ”€38066 /opt/ibm/ltfssde/bin/ltfs -o devname=/dev/sg8 -o noatime -o sync_type=unmount -o work_directory=/opt/yatm/captured_indices -o capture_index -o min_pool_size=256 -o max_pool_size=1024 -o eject -s /tmp/3212318303.ltfs

Mar 04 10:12:59 server yatm-httpd[30645]: 2024/03/04 10:12:59 /home/runner/work/yatm/yatm/executor/job.go:53 SLOW SQL >= 200ms
Mar 04 10:12:59 server yatm-httpd[30645]: [225.397ms] [rows:1] UPDATE `jobs` SET `status`=3,`priority`=1,`state`="<binary>",`create_time`="2024-03-04 09:58:45.972",`update_time`="2024-03-04 10:12:58.964" WHERE `id` = 15
Mar 04 10:12:59 server yatm-httpd[30645]: 2024/03/04 10:12:59 /home/runner/work/yatm/yatm/executor/job.go:53 SLOW SQL >= 200ms
Mar 04 10:12:59 server yatm-httpd[30645]: [249.348ms] [rows:1] UPDATE `jobs` SET `status`=3,`priority`=1,`state`="<binary>",`create_time`="2024-03-04 09:58:45.972",`update_time`="2024-03-04 10:12:59.414" WHERE `id` = 15
Mar 04 10:13:00 server yatm-httpd[30645]: 2024/03/04 10:13:00 /home/runner/work/yatm/yatm/executor/job.go:53 SLOW SQL >= 200ms
Mar 04 10:13:00 server yatm-httpd[30645]: [207.976ms] [rows:1] UPDATE `jobs` SET `status`=3,`priority`=1,`state`="<binary>",`create_time`="2024-03-04 09:58:45.972",`update_time`="2024-03-04 10:12:59.882" WHERE `id` = 15
Mar 04 10:13:00 server yatm-httpd[30645]: 2024/03/04 10:13:00 /home/runner/work/yatm/yatm/executor/job.go:53 SLOW SQL >= 200ms
Mar 04 10:13:00 server yatm-httpd[30645]: [210.772ms] [rows:1] UPDATE `jobs` SET `status`=3,`priority`=1,`state`="<binary>",`create_time`="2024-03-04 09:58:45.972",`update_time`="2024-03-04 10:13:00.292" WHERE `id` = 15
Mar 04 10:13:01 server yatm-httpd[30645]: 2024/03/04 10:13:01 /home/runner/work/yatm/yatm/executor/job.go:53 SLOW SQL >= 200ms
Mar 04 10:13:01 server yatm-httpd[30645]: [258.660ms] [rows:1] UPDATE `jobs` SET `status`=3,`priority`=1,`state`="<binary>",`create_time`="2024-03-04 09:58:45.972",`update_time`="2024-03-04 10:13:00.736" WHERE `id` = 15

Self-Contained Binary Versions

Pre-compiled self contained versions ready and easy to deploy would make this project far more adoptable, very much so for people already with windows/macos file servers with LTO drives as Linux support with LTFS is iffy but MacOS and with some issues windows has better support for end users.

Checklist:

  • MacOS
  • MacOS Arm
  • Linux
  • Linux Arm
  • Windows
  • Windows Arm

With the new Pi 5 PCIe support, this would be amazing to intergrate into a low power Tape server on the ARM platform for example with apple moving to there own ARM based hardware its growing rapidly adoption wise.

Library support?

From what I see the software doesn't yet support tape libraries, is there plans for such? This software would be really convenient with a tape library.

How to debug ?

Hi !
I got YATM running in a docker container. I start the container in priviledged mode. If i run mtx or stenc inside the container they will happily interact with the drive.

root@e867f5ce4a0f:/opt/yatm# mtx -f /dev/QUANTUMxxxxxxx_LLA status
  Storage Changer /dev/QUANTUMxxxxxxx_LLA:1 Drives, 25 Slots ( 0 Import/Export )
Data Transfer Element 0:Full (Storage Element 11 Loaded):VolumeTag = MU0001L7     
root@e867f5ce4a0f:/opt/yatm# stenc -f /dev/sg1
Status for /dev/sg1 (IBM ULTRIUM-HH7 J4D1)
--------------------------------------------------
Reading:                         Decrypting (AES-256-GCM-128)
                                 Unencrypted blocks not readable
Writing:                         Encrypting (AES-256-GCM-128)
Key instance counter:            1
Drive key desc. (U-KAD):         DGA2023
Current block status:            Not encrypted
root@e867f5ce4a0f:/opt/yatm# ltfs -o device_list
LTFS9015W Setting the locale to 'en_US.UTF-8'. If this is wrong, please set the LANG environment variable before starting ltfs.
32 LTFS14000I LTFS starting, LTFS version 2.5.0.0 (Prelim), log level 2.
32 LTFS14058I LTFS Format Specification version 2.4.0.
32 LTFS14104I Launched by "ltfs -o device_list".
32 LTFS14105I This binary is built for Linux (x86_64).
32 LTFS14106I GCC version is 12.2.0.
32 LTFS17087I Kernel version: Linux version 6.1.0-18-amd64 ([email protected]) (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) i386.
32 LTFS17089I Distribution: PRETTY_NAME="Debian GNU/Linux 12 (bookworm)".
32 LTFS17085I Plugin: Loading "sg" tape backend.
Tape Device list:.
Device Name = /dev/sg1 (0.0.1.0), Vendor ID = IBM     , Product ID = ULTRIUM-HH7     , Serial Number = C3EBA80000, Product Name =[ULTRIUM-HH7].

However, when i want to start a backup job i get no response, see attached image
Bildschirmfoto vom 2024-02-26 20-30-48
Pressing submit does nothing.

Any idea what to do ?
How can i see what YATM is trying to do ? How can i debug this ?
I see there is lots of logging statements in the code, but i cant see any of that output anywhere.
How do i use the debug port ? Accessing it with a browser gives "404 page not found".

Thanks for a really interesting piece of software, would love to get it working !
Cheers, KK

A great file app that I am not able to make it work

I want to say it's an excellent idea for the author to attempt an open-source LTFS tool since there is a great need for people like us who don't want to use proprietary software with their tape system. I am having issues installing this app in Ubuntu (22.04.1 LTS). The following are the problems/questions I have during my installation:

  1. The curl automatic installation didn't work. I get the following "curl: (23) Failed writing body" error. So, I did a manual installation and was able to get the WebGUI online
  2. But it didn't show the tape drive with its content (see below image). I noticed that the drive was not mounted. I did what the author recommended:
    • I found out my "dev/tape/by-id/scsi-" tape drive id by using "ls -al /dev/tape/by-id/"
    • I copied it to the device path to config.yaml, and restarted the service multiple times (and the Ubuntu, too, just in case)
  3. The tape drive still didn't show up in the WebGUI. So I am not sure what else to do. Do I need to execute the scripts in script folder (if it is required), or if drivers of LTFS have to be installed in Ubuntu (which I couldn't find the binaries; all of them are for RHE), or something else is going on.
001

Hardware used (they work great in Windows Server 2022)

  • HPE 1/8 G2 Autoloader
  • HPE SAS Ultrium 6-SCSI tape drive Model AQ288D#103 C0H27A
  • LTO 6 Fujifilm Barium Ferrite tape

Much appreciated for the author for his hard work!

Support for remote system targets

Neat project been needing something like as opposed to Proxmox Backup.

Not clear from the README, is there support for remote data?

Cant restore

Any idea what could cause the error at the end of this log ?

time="2024-03-03T10:25:59Z" level=info msg="+ mt -f /dev/tape/by-id/scsi-C3EBA80000 load"
time="2024-03-03T10:26:14Z" level=info msg="++ awk '{print $3}'"
time="2024-03-03T10:26:14Z" level=info msg="++ ./yatm-lto-info -f /dev/tape/by-id/scsi-C3EBA80000"
time="2024-03-03T10:26:14Z" level=info msg="++ grep Barcode"
time="2024-03-03T10:26:20Z" level=info msg="+ BARCODE=MU0001L7"
time="2024-03-03T10:26:20Z" level=info msg="+ echo '{\"barcode\": \"MU0001L7\"}'"
time="2024-03-03T10:26:20Z" level=info msg="+ sleep 3"
time="2024-03-03T10:26:23Z" level=info msg="+ mt -f /dev/tape/by-id/scsi-C3EBA80000 load"
time="2024-03-03T10:26:23Z" level=info msg="+ sleep 5"
time="2024-03-03T10:26:28Z" level=info msg="+ for i in {1..60}"
time="2024-03-03T10:26:28Z" level=info msg="+ stenc -f /dev/tape/by-id/scsi-C3EBA80000 -e on -k /tmp/1399794372.key -a 1 --ckod"
time="2024-03-03T10:26:28Z" level=info msg="Decrypt mode not specified, using decrypt = on"
time="2024-03-03T10:26:28Z" level=info msg="Changing encryption settings for device /dev/tape/by-id/scsi-C3EBA80000..."
time="2024-03-03T10:26:28Z" level=info msg="Success! See system logs for a key change audit log."
time="2024-03-03T10:26:28Z" level=info msg="+ break"
time="2024-03-03T10:26:28Z" level=info msg="+ sleep 3"
time="2024-03-03T10:26:31Z" level=info msg="+++ dirname ./scripts/mount.openltfs"
time="2024-03-03T10:26:31Z" level=info msg="++ cd ./scripts"
time="2024-03-03T10:26:31Z" level=info msg="++ pwd"
time="2024-03-03T10:26:31Z" level=info msg="+ CURDIR=/opt/yatm/scripts"
time="2024-03-03T10:26:31Z" level=info msg="++ /opt/yatm/scripts/get_device"
time="2024-03-03T10:26:32Z" level=info msg="+ SG_DEVICE=/dev/sg1"
time="2024-03-03T10:26:32Z" level=info msg="+ ltfs -o devname=/dev/sg1 -o noatime -o sync_type=unmount -o work_directory=/opt/yatm/captured_indices -o capture_index=/opt/yatm/captured_indices -o min_pool_size=256 -o max_pool_size=1024 -o eject -s /tmp/1411182761.ltfs"
time="2024-03-03T10:26:32Z" level=info msg="LTFS9015W Setting the locale to 'en_US.UTF-8'. If this is wrong, please set the LANG environment variable before starting ltfs."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS14000I LTFS starting, LTFS version 2.5.0.0 (Prelim), log level 2."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS14058I LTFS Format Specification version 2.4.0."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS14104I Launched by \"ltfs -o devname=/dev/sg1 -o noatime -o sync_type=unmount -o work_directory=/opt/yatm/captured_indices -o capture_index=/opt/yatm/captured_indices -o min_pool_size=256 -o max_pool_size=1024 -o eject -s /tmp/1411182761.ltfs\"."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS14105I This binary is built for Linux (x86_64)."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS14106I GCC version is 12.2.0."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS17087I Kernel version: Linux version 6.1.0-18-amd64 ([email protected]) (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) i386."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS17089I Distribution: PRETTY_NAME=\"Debian GNU/Linux 12 (bookworm)\"."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS14064I Sync type is \"unmount\"."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS17085I Plugin: Loading \"sg\" tape backend."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS17085I Plugin: Loading \"unified\" iosched backend."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg1)."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS30250I Opened the SCSI tape device 0.0.1.0 (/dev/sg1)."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS30207I Vendor ID is IBM     ."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS30208I Product ID is ULTRIUM-HH7     ."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS30214I Firmware revision is J4D1."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS30215I Drive serial is C3EBA80000."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS30285I The reserved buffer size of /dev/sg1 is 1048576."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS30294I Setting up timeout values from RSOC."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS17160I Maximum device block size is 1048576."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS11330I Loading cartridge."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS30252I Logical block protection is disabled."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS11332I Load successful."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS17157I Changing the drive setting to append-only mode."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS11005I Mounting the volume from device."
time="2024-03-03T10:26:32Z" level=info msg="51 LTFS30252I Logical block protection is disabled."
time="2024-03-03T10:26:44Z" level=info msg="51 LTFS17227I Tape attribute: Vendor = IBM     ."
time="2024-03-03T10:26:44Z" level=info msg="51 LTFS17227I Tape attribute: Application Name = LTFS                            ."
time="2024-03-03T10:26:44Z" level=info msg="51 LTFS17227I Tape attribute: Application Version = 2.5.0.0 ."
time="2024-03-03T10:26:44Z" level=info msg="51 LTFS17227I Tape attribute: Medium Label = MU0001L7."
time="2024-03-03T10:26:44Z" level=info msg="51 LTFS17228I Tape attribute: Text Localization ID = 0x81."
time="2024-03-03T10:26:44Z" level=info msg="51 LTFS17227I Tape attribute: Barcode = MU0001L7                        ."
time="2024-03-03T10:26:44Z" level=info msg="51 LTFS17227I Tape attribute: Application Format Version = 2.4.0           ."
time="2024-03-03T10:26:44Z" level=info msg="51 LTFS17228I Tape attribute: Volume Lock Status = 0x00."
time="2024-03-03T10:26:44Z" level=info msg="51 LTFS17227I Tape attribute: Media Pool name = ."
time="2024-03-03T10:26:44Z" level=info msg="51 LTFS11031I Volume mounted successfully. MU0001 : Gen = 2 / (a, 5) -> (b, 56) / C3EBA80000."
time="2024-03-03T10:26:44Z" level=info msg="51 LTFS14121I Index will be captured at /opt/yatm/captured_indices/MU0001.schema at update"
time="2024-03-03T10:26:44Z" level=info msg="51 LTFS14111I Initial setup completed successfully."
time="2024-03-03T10:26:44Z" level=info msg="51 LTFS14112I Invoke 'mount' command to check the result of final setup."
time="2024-03-03T10:26:44Z" level=info msg="51 LTFS14113I Specified mount point is listed if succeeded."
time="2024-03-03T10:26:44Z" level=info msg="+ sleep 3"
time="2024-03-03T10:26:47Z" level=info msg="++ df /tmp/1411182761.ltfs --output=target"
time="2024-03-03T10:26:47Z" level=info msg="++ sed -n '1!p'"
time="2024-03-03T10:26:47Z" level=info msg="+ MOUNT_POINT_TARGET=/tmp/1411182761.ltfs"
time="2024-03-03T10:26:47Z" level=info msg="+ [[ /tmp/1411182761.ltfs != /tmp/1411182761.ltfs ]]"
time="2024-03-03T10:26:47Z" level=info msg="+ echo 'mount '\\''/tmp/1411182761.ltfs'\\'' success'"
time="2024-03-03T10:26:47Z" level=info msg="mount '/tmp/1411182761.ltfs' success"
time="2024-03-03T10:26:48Z" level=info msg="file '/tmp/1411182761.ltfs/testfile' copy finished, size= 25165824"
time="2024-03-03T10:26:48Z" level=error msg="file '/tmp/1411182761.ltfs/testfile' copy fail, dst= 'restore_target/testfile'" error="check disk usage have error, get disk usage fail, mount_point= , no such file or directory"
time="2024-03-03T10:26:48Z" level=info msg="+ sleep 2"
time="2024-03-03T10:26:50Z" level=info msg="+ umount /tmp/1411182761.ltfs"
time="2024-03-03T10:28:36Z" level=info msg="+ mt -f /dev/tape/by-id/scsi-C3EBA80000 load"
time="2024-03-03T10:28:50Z" level=info msg="++ ./yatm-lto-info -f /dev/tape/by-id/scsi-C3EBA80000"
time="2024-03-03T10:28:50Z" level=info msg="++ awk '{print $3}'"
time="2024-03-03T10:28:50Z" level=info msg="++ grep Barcode"
time="2024-03-03T10:28:56Z" level=info msg="+ BARCODE=MU0001L7"
time="2024-03-03T10:28:56Z" level=info msg="+ echo '{\"barcode\": \"MU0001L7\"}'"
time="2024-03-03T10:28:56Z" level=info msg="+ sleep 3"
time="2024-03-03T10:28:59Z" level=info msg="+ mt -f /dev/tape/by-id/scsi-C3EBA80000 load"
time="2024-03-03T10:28:59Z" level=info msg="+ sleep 5"
time="2024-03-03T10:29:04Z" level=info msg="+ for i in {1..60}"
time="2024-03-03T10:29:04Z" level=info msg="+ stenc -f /dev/tape/by-id/scsi-C3EBA80000 -e on -k /tmp/2073332491.key -a 1 --ckod"
time="2024-03-03T10:29:04Z" level=info msg="Decrypt mode not specified, using decrypt = on"
time="2024-03-03T10:29:04Z" level=info msg="Changing encryption settings for device /dev/tape/by-id/scsi-C3EBA80000..."
time="2024-03-03T10:29:04Z" level=info msg="Success! See system logs for a key change audit log."
time="2024-03-03T10:29:04Z" level=info msg="+ break"
time="2024-03-03T10:29:04Z" level=info msg="+ sleep 3"
time="2024-03-03T10:29:07Z" level=info msg="+++ dirname ./scripts/mount.openltfs"
time="2024-03-03T10:29:07Z" level=info msg="++ cd ./scripts"
time="2024-03-03T10:29:07Z" level=info msg="++ pwd"
time="2024-03-03T10:29:07Z" level=info msg="+ CURDIR=/opt/yatm/scripts"
time="2024-03-03T10:29:07Z" level=info msg="++ /opt/yatm/scripts/get_device"
time="2024-03-03T10:29:07Z" level=info msg="+ SG_DEVICE=/dev/sg1"
time="2024-03-03T10:29:07Z" level=info msg="+ ltfs -o devname=/dev/sg1 -o noatime -o sync_type=unmount -o work_directory=/opt/yatm/captured_indices -o capture_index=/opt/yatm/captured_indices -o min_pool_size=256 -o max_pool_size=1024 -o eject -s /tmp/1437867431.ltfs"
time="2024-03-03T10:29:07Z" level=info msg="LTFS9015W Setting the locale to 'en_US.UTF-8'. If this is wrong, please set the LANG environment variable before starting ltfs."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS14000I LTFS starting, LTFS version 2.5.0.0 (Prelim), log level 2."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS14058I LTFS Format Specification version 2.4.0."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS14104I Launched by \"ltfs -o devname=/dev/sg1 -o noatime -o sync_type=unmount -o work_directory=/opt/yatm/captured_indices -o capture_index=/opt/yatm/captured_indices -o min_pool_size=256 -o max_pool_size=1024 -o eject -s /tmp/1437867431.ltfs\"."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS14105I This binary is built for Linux (x86_64)."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS14106I GCC version is 12.2.0."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS17087I Kernel version: Linux version 6.1.0-18-amd64 ([email protected]) (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) i386."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS17089I Distribution: PRETTY_NAME=\"Debian GNU/Linux 12 (bookworm)\"."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS14064I Sync type is \"unmount\"."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS17085I Plugin: Loading \"sg\" tape backend."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS17085I Plugin: Loading \"unified\" iosched backend."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg1)."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS30250I Opened the SCSI tape device 0.0.1.0 (/dev/sg1)."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS30207I Vendor ID is IBM     ."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS30208I Product ID is ULTRIUM-HH7     ."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS30214I Firmware revision is J4D1."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS30215I Drive serial is C3EBA80000."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS30285I The reserved buffer size of /dev/sg1 is 1048576."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS30294I Setting up timeout values from RSOC."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS17160I Maximum device block size is 1048576."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS11330I Loading cartridge."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS30252I Logical block protection is disabled."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS11332I Load successful."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS17157I Changing the drive setting to append-only mode."
time="2024-03-03T10:29:07Z" level=info msg="81 LTFS11005I Mounting the volume from device."
time="2024-03-03T10:29:08Z" level=info msg="81 LTFS30252I Logical block protection is disabled."
time="2024-03-03T10:29:19Z" level=info msg="81 LTFS17227I Tape attribute: Vendor = IBM     ."
time="2024-03-03T10:29:19Z" level=info msg="81 LTFS17227I Tape attribute: Application Name = LTFS                            ."
time="2024-03-03T10:29:19Z" level=info msg="81 LTFS17227I Tape attribute: Application Version = 2.5.0.0 ."
time="2024-03-03T10:29:19Z" level=info msg="81 LTFS17227I Tape attribute: Medium Label = MU0001L7."
time="2024-03-03T10:29:19Z" level=info msg="81 LTFS17228I Tape attribute: Text Localization ID = 0x81."
time="2024-03-03T10:29:19Z" level=info msg="81 LTFS17227I Tape attribute: Barcode = MU0001L7                        ."
time="2024-03-03T10:29:19Z" level=info msg="81 LTFS17227I Tape attribute: Application Format Version = 2.4.0           ."
time="2024-03-03T10:29:19Z" level=info msg="81 LTFS17228I Tape attribute: Volume Lock Status = 0x00."
time="2024-03-03T10:29:19Z" level=info msg="81 LTFS17227I Tape attribute: Media Pool name = ."
time="2024-03-03T10:29:19Z" level=info msg="81 LTFS11031I Volume mounted successfully. MU0001 : Gen = 2 / (a, 5) -> (b, 56) / C3EBA80000."
time="2024-03-03T10:29:19Z" level=info msg="81 LTFS14121I Index will be captured at /opt/yatm/captured_indices/MU0001.schema at update"
time="2024-03-03T10:29:19Z" level=info msg="81 LTFS14111I Initial setup completed successfully."
time="2024-03-03T10:29:19Z" level=info msg="81 LTFS14112I Invoke 'mount' command to check the result of final setup."
time="2024-03-03T10:29:19Z" level=info msg="81 LTFS14113I Specified mount point is listed if succeeded."
time="2024-03-03T10:29:19Z" level=info msg="+ sleep 3"
time="2024-03-03T10:29:22Z" level=info msg="++ df /tmp/1437867431.ltfs --output=target"
time="2024-03-03T10:29:22Z" level=info msg="++ sed -n '1!p'"
time="2024-03-03T10:29:22Z" level=info msg="+ MOUNT_POINT_TARGET=/tmp/1437867431.ltfs"
time="2024-03-03T10:29:22Z" level=info msg="+ [[ /tmp/1437867431.ltfs != /tmp/1437867431.ltfs ]]"
time="2024-03-03T10:29:22Z" level=info msg="+ echo 'mount '\\''/tmp/1437867431.ltfs'\\'' success'"
time="2024-03-03T10:29:22Z" level=info msg="mount '/tmp/1437867431.ltfs' success"
time="2024-03-03T10:29:23Z" level=info msg="file '/tmp/1437867431.ltfs/testfile' copy finished, size= 25165824"
time="2024-03-03T10:29:23Z" level=error msg="file '/tmp/1437867431.ltfs/testfile' copy fail, dst= 'restore_target/testfile'" error="check disk usage have error, get disk usage fail, mount_point= , no such file or directory"
time="2024-03-03T10:29:23Z" level=info msg="+ sleep 2"
time="2024-03-03T10:29:25Z" level=info msg="+ umount /tmp/1437867431.ltfs"
time="2024-03-03T10:39:01Z" level=info msg="+ mt -f /dev/tape/by-id/scsi-C3EBA80000 load"
time="2024-03-03T10:39:01Z" level=info msg="++ ./yatm-lto-info -f /dev/tape/by-id/scsi-C3EBA80000"
time="2024-03-03T10:39:01Z" level=info msg="++ awk '{print $3}'"
time="2024-03-03T10:39:01Z" level=info msg="++ grep Barcode"
time="2024-03-03T10:39:02Z" level=info msg="+ BARCODE=MU0001L7"
time="2024-03-03T10:39:02Z" level=info msg="+ echo '{\"barcode\": \"MU0001L7\"}'"
time="2024-03-03T10:39:02Z" level=info msg="+ sleep 3"
time="2024-03-03T10:39:05Z" level=info msg="+ mt -f /dev/tape/by-id/scsi-C3EBA80000 load"
time="2024-03-03T10:39:05Z" level=info msg="+ sleep 5"
time="2024-03-03T10:39:10Z" level=info msg="+ for i in {1..60}"
time="2024-03-03T10:39:10Z" level=info msg="+ stenc -f /dev/tape/by-id/scsi-C3EBA80000 -e on -k /tmp/155532310.key -a 1 --ckod"
time="2024-03-03T10:39:10Z" level=info msg="Decrypt mode not specified, using decrypt = on"
time="2024-03-03T10:39:10Z" level=info msg="Changing encryption settings for device /dev/tape/by-id/scsi-C3EBA80000..."
time="2024-03-03T10:39:10Z" level=info msg="Success! See system logs for a key change audit log."

time="2024-03-03T10:39:10Z" level=info msg="+ break"
time="2024-03-03T10:39:10Z" level=info msg="+ sleep 3"
time="2024-03-03T10:39:13Z" level=info msg="+++ dirname ./scripts/mount.openltfs"
time="2024-03-03T10:39:13Z" level=info msg="++ cd ./scripts"
time="2024-03-03T10:39:13Z" level=info msg="++ pwd"
time="2024-03-03T10:39:13Z" level=info msg="+ CURDIR=/opt/yatm/scripts"
time="2024-03-03T10:39:13Z" level=info msg="++ /opt/yatm/scripts/get_device"
time="2024-03-03T10:39:14Z" level=info msg="+ SG_DEVICE=/dev/sg1"
time="2024-03-03T10:39:14Z" level=info msg="+ ltfs -o devname=/dev/sg1 -o noatime -o sync_type=unmount -o work_directory=/opt/yatm/captured_indices -o capture_index=/opt/yatm/captured_indices -o min_pool_size=256 -o max_pool_size=1024 -o eject -s /tmp/2327955464.ltfs"
time="2024-03-03T10:39:14Z" level=info msg="LTFS9015W Setting the locale to 'en_US.UTF-8'. If this is wrong, please set the LANG environment variable before starting ltfs."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS14000I LTFS starting, LTFS version 2.5.0.0 (Prelim), log level 2."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS14058I LTFS Format Specification version 2.4.0."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS14104I Launched by \"ltfs -o devname=/dev/sg1 -o noatime -o sync_type=unmount -o work_directory=/opt/yatm/captured_indices -o capture_index=/opt/yatm/captured_indices -o min_pool_size=256 -o max_pool_size=1024 -o eject -s /tmp/2327955464.ltfs\"."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS14105I This binary is built for Linux (x86_64)."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS14106I GCC version is 12.2.0."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS17087I Kernel version: Linux version 6.1.0-18-amd64 ([email protected]) (gcc-12 (Debian 12.2.0-14) 12.2.0, GNU ld (GNU Binutils for Debian) 2.40) #1 SMP PREEMPT_DYNAMIC Debian 6.1.76-1 (2024-02-01) i386."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS17089I Distribution: PRETTY_NAME=\"Debian GNU/Linux 12 (bookworm)\"."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS14064I Sync type is \"unmount\"."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS17085I Plugin: Loading \"sg\" tape backend."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS17085I Plugin: Loading \"unified\" iosched backend."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg1)."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS30250I Opened the SCSI tape device 0.0.1.0 (/dev/sg1)."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS30207I Vendor ID is IBM     ."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS30208I Product ID is ULTRIUM-HH7     ."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS30214I Firmware revision is J4D1."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS30215I Drive serial is C3EBA80000."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS30285I The reserved buffer size of /dev/sg1 is 1048576."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS30294I Setting up timeout values from RSOC."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS17160I Maximum device block size is 1048576."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS11330I Loading cartridge."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS30252I Logical block protection is disabled."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS11332I Load successful."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS17157I Changing the drive setting to append-only mode."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS11005I Mounting the volume from device."
time="2024-03-03T10:39:14Z" level=info msg="ad LTFS30252I Logical block protection is disabled."
time="2024-03-03T10:39:25Z" level=info msg="ad LTFS17227I Tape attribute: Vendor = IBM     ."
time="2024-03-03T10:39:25Z" level=info msg="ad LTFS17227I Tape attribute: Application Name = LTFS                            ."
time="2024-03-03T10:39:25Z" level=info msg="ad LTFS17227I Tape attribute: Application Version = 2.5.0.0 ."
time="2024-03-03T10:39:25Z" level=info msg="ad LTFS17227I Tape attribute: Medium Label = MU0001L7."
time="2024-03-03T10:39:25Z" level=info msg="ad LTFS17228I Tape attribute: Text Localization ID = 0x81."
time="2024-03-03T10:39:25Z" level=info msg="ad LTFS17227I Tape attribute: Barcode = MU0001L7                        ."
time="2024-03-03T10:39:25Z" level=info msg="ad LTFS17227I Tape attribute: Application Format Version = 2.4.0           ."
time="2024-03-03T10:39:25Z" level=info msg="ad LTFS17228I Tape attribute: Volume Lock Status = 0x00."
time="2024-03-03T10:39:25Z" level=info msg="ad LTFS17227I Tape attribute: Media Pool name = ."
time="2024-03-03T10:39:25Z" level=info msg="ad LTFS11031I Volume mounted successfully. MU0001 : Gen = 2 / (a, 5) -> (b, 56) / C3EBA80000."
time="2024-03-03T10:39:25Z" level=info msg="ad LTFS14121I Index will be captured at /opt/yatm/captured_indices/MU0001.schema at update"
time="2024-03-03T10:39:25Z" level=info msg="ad LTFS14111I Initial setup completed successfully."
time="2024-03-03T10:39:25Z" level=info msg="ad LTFS14112I Invoke 'mount' command to check the result of final setup."
time="2024-03-03T10:39:25Z" level=info msg="ad LTFS14113I Specified mount point is listed if succeeded."
time="2024-03-03T10:39:25Z" level=info msg="+ sleep 3"
time="2024-03-03T10:39:28Z" level=info msg="++ df /tmp/2327955464.ltfs --output=target"
time="2024-03-03T10:39:28Z" level=info msg="++ sed -n '1!p'"
time="2024-03-03T10:39:28Z" level=info msg="+ MOUNT_POINT_TARGET=/tmp/2327955464.ltfs"
time="2024-03-03T10:39:28Z" level=info msg="+ [[ /tmp/2327955464.ltfs != /tmp/2327955464.ltfs ]]"
time="2024-03-03T10:39:28Z" level=info msg="+ echo 'mount '\\''/tmp/2327955464.ltfs'\\'' success'"
time="2024-03-03T10:39:28Z" level=info msg="mount '/tmp/2327955464.ltfs' success"
time="2024-03-03T10:39:29Z" level=info msg="file '/tmp/2327955464.ltfs/testfile' copy finished, size= 25165824"
time="2024-03-03T10:39:29Z" level=error msg="file '/tmp/2327955464.ltfs/testfile' copy fail, dst= 'restore_target/testfile'" error="check disk usage have error, get disk usage fail, mount_point= , no such file or directory"
time="2024-03-03T10:39:30Z" level=info msg="+ sleep 2"
time="2024-03-03T10:39:32Z" level=info msg="+ umount /tmp/2327955464.ltfs" 

I confirmed that the directory /opt/yatm/restore_target exists and is writeable. I can also see the testfile in '/tmp/2327955464.ltfs/testfile'.

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.