Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

How to debug ? #9

Open
karlkashofer opened this issue Feb 26, 2024 · 4 comments
Open

How to debug ? #9

karlkashofer opened this issue Feb 26, 2024 · 4 comments

Comments

@karlkashofer
Copy link

karlkashofer commented Feb 26, 2024

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 (debian-kernel@lists.debian.org) (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

@samuelncui
Copy link
Owner

Do you update to the newest version? the older version might not display the error message as expected. If I remember it right, you must use a tape barcode with 6 letters or numbers, not 8.

@karlkashofer
Copy link
Author

Yes, the printed label on our tapes says MU0001L7 so the serial i need to enter is MU0001 without the L7 at the end.

I did use a wrong 6 digit barcode in one run, YATM just used that without checking if it fit to the inserted tape.
=> restoring was impossible, as it checks the barcode on restore.

I would suggest two enhancements:

In backup jobs read the barcode of the inserted tape automatically. Or have a button to read the barcode within the "load tape" dialog, and/or suggest the currently inserted tape barcode. The barcode field should not be editable.

On backup check that the given barcode matches the barcode of the tape in the drive.

@karlkashofer
Copy link
Author

Well, i just realized that you are working on library support. We have a scalar i3 library here and i briefly thought about writing a small script that loads the right tape into the drive right before the encrypt.sh mt command.

In the context of a tape library having the user enter the tape barcode makes sense.
Would you mind elaborating on your library plans ? Is there anything we can do to help?

@samuelncui
Copy link
Owner

Yes, the printed label on our tapes says MU0001L7 so the serial i need to enter is MU0001 without the L7 at the end.

I did use a wrong 6 digit barcode in one run, YATM just used that without checking if it fit to the inserted tape. => restoring was impossible, as it checks the barcode on restore.

I would suggest two enhancements:

In backup jobs read the barcode of the inserted tape automatically. Or have a button to read the barcode within the "load tape" dialog, and/or suggest the currently inserted tape barcode. The barcode field should not be editable.

On backup check that the given barcode matches the barcode of the tape in the drive.

There is no barcode reader inside lto drives, so the software can't know the current barcode sticker on the tape at all. The cartridge memory chip might be empty or different compared to the barcode label too. So the barcode management is totally on the user side.

But while restoring, this software will check barcode inside the cartridge memory for sure, because we know this cartridge had been 'normalized' during backup process.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants