LinearTapeFileSystem / ltfs

Reference implementation of the LTFS format Spec for stand alone tape drive
BSD 3-Clause "New" or "Revised" License
245 stars 73 forks source link

HP LTO5 Modesens invalid field #201

Open andi-at-1 opened 4 years ago

andi-at-1 commented 4 years ago

Hello,

I´ve compiled the multivendor package, runs like a charm! But I get an error at the mount command, I dont know what that means but mabe it is interesting for you? "3cad LTFS30263I MODESENSE returns Invalid Field in CDB (-20501) /dev/sg0."

3cad LTFS14000I LTFS starting, LTFS version 2.4.2.1 (Prelim), log level 2. 3cad LTFS14058I LTFS Format Specification version 2.4.0. 3cad LTFS14104I Launched by "ltfs -o nonempty -o devname=/dev/sg0 /mnt/ltfs". 3cad LTFS14105I This binary is built for Linux (x86_64). 3cad LTFS14106I GCC version is 8.3.0. 3cad LTFS17087I Kernel version: Linux version 5.4.44-1-pve (root@nora) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP PVE 5.4.44-1 (Fri, 12 Jun 2020 08:18:46 +0200) i386. 3cad LTFS17089I Distribution: PRETTY_NAME="Debian GNU/Linux 10 (buster)". 3cad LTFS14063I Sync type is "time", Sync time is 300 sec. 3cad LTFS17085I Plugin: Loading "sg" tape backend. 3cad LTFS17085I Plugin: Loading "unified" iosched backend. 3cad LTFS14095I Set the tape device write-anywhere mode to avoid cartridge ejection. 3cad LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg0). 3cad LTFS30250I Opened SCSI tape device 6.0.0.0 (/dev/sg0). 3cad LTFS30207I Vendor ID is HP . 3cad LTFS30208I Product ID is Ultrium 5-SCSI . 3cad LTFS30214I Firmware revision is Z6ED. 3cad LTFS30215I Drive serial is xxxxxxxx. 3cad LTFS30285I Reserved buffer size of /dev/sg0 is 1048576. 3cad LTFS17160I Maximum device block size is 1048576. 3cad LTFS11330I Loading cartridge. 3cad LTFS11332I Load successful. 3cad LTFS17157I Changing the drive setting to write-anywhere mode. 3cad LTFS11005I Mounting the volume.

3cad LTFS30205I MODESENSE (0x5a) returns -20501. 3cad LTFS30263I MODESENSE returns Invalid Field in CDB (-20501) /dev/sg0.

3cad LTFS11026I Performing a full medium consistency check. 3cad LTFS11233I Updating MAM coherency data. 3cad LTFS17227I Tape attribute: Vendor = IBM . 3cad LTFS17227I Tape attribute: Application Name = LTFS . 3cad LTFS17227I Tape attribute: Application Version = 2.4.2.1 . 3cad LTFS17227I Tape attribute: Medium Label = . 3cad LTFS17228I Tape attribute: Text Localization ID = 0x81. 3cad LTFS17227I Tape attribute: Barcode = . 3cad LTFS17227I Tape attribute: Application Format Version = 2.4.0 . 3cad LTFS17228I Tape attribute: Volume Lock Status = 0x00. 3cad LTFS17227I Tape attribute: Media Pool name = . 3cad LTFS14111I Initial setup completed successfully. 3cad LTFS14112I Invoke 'mount' command to check the result of final setup. 3cad LTFS14113I Specified mount point is listed if succeeded.

I can share further debug infos if you tell me what you need to fix that.

greetings from Austria

piste-jp commented 4 years ago

@andi-at-1 , tank you for your trial.

The log says you have a minor SCSI command error but mount process is successfully done with short recovery like

3cad LTFS30205I MODESENSE (0x5a) returns -20501.
3cad LTFS30263I MODESENSE returns Invalid Field in CDB (-20501) /dev/sg0.

3cad LTFS11026I Performing a full medium consistency check.
...
3cad LTFS14113I Specified mount point is listed if succeeded.

So, I believe you can access to the tape via /mnt/ltfs after this.

On the other hand, I would like to know the source of 3cad LTFS30263I MODESENSE returns Invalid Field in CDB (-20501) /dev/sg0. for enhancement.

I would like to check it on my bench. But it is Mac, so it is very helpful if you put the output of ltfs -o nonempty -o devname=/dev/sg0 -o verbose=6 /mnt/ltfs to this thread.

piste-jp commented 4 years ago

I confirmed the location. The message is printed in tape_get_media_encrypted() -> modesense handler on each backend.

https://github.com/LinearTapeFileSystem/ltfs/blob/6e722900c9f9bc6b3ce6d169542afc144ce99af6/src/libltfs/ltfs.c#L1498

https://github.com/LinearTapeFileSystem/ltfs/blob/6e722900c9f9bc6b3ce6d169542afc144ce99af6/src/libltfs/tape.c#L2735

This function is testing the tape is encrypted or not, but the HP drive doesn't seem to have the page 0x25 in modesense command.

I will check the spec and correct the code in the future, but you can ignore this SCSI command failure at this time. I believe there is no impact the normal function of LTFS if you don't use the encryption feature on the drive.

andi-at-1 commented 4 years ago

Yes everything is working, i´ve written 3 Tapes and checked it, no problems found. Just wanted to inform you so you can look at that.

Here is the log of the formatting process, also an error command here just at the end, but it formats sucessfull:

LTFS15000I Starting mkltfs, LTFS version 2.4.2.1 (Prelim), log level 3.
LTFS15041I Launched by "mkltfs -d /dev/sg0 -f -t".
LTFS15042I This binary is built for Linux (x86_64).
LTFS15043I GCC version is 8.3.0.
LTFS17087I Kernel version: Linux version 5.4.44-1-pve (root@nora) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP PVE 5.4.44-1 (Fri, 12                            Jun 2020 08:18:46 +0200) i386.
LTFS17089I Distribution: PRETTY_NAME="Debian GNU/Linux 10 (buster)".
LTFS15025D Validating command line options.
LTFS15037D Command line options are valid.
LTFS15003I Formatting device '/dev/sg0'.
LTFS15004I LTFS volume blocksize: 524288.
LTFS15005I Index partition placement policy: None.

LTFS11337I Update index-dirty flag (1) - NO_BARCODE (0x0x55ee6cfe3290).
LTFS15006D Opening the device.
LTFS17085I Plugin: Loading "sg" tape backend.
LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg0).
LTFS30250I Opened SCSI tape device 6.0.0.0 (/dev/sg0).
LTFS30207I Vendor ID is HP      .
LTFS30208I Product ID is Ultrium 5-SCSI  .
LTFS30214I Firmware revision is Z6ED.
LTFS30215I Drive serial is xxxxxxxxxx.
LTFS30285I Reserved buffer size of /dev/sg0 is 1048576.
LTFS12023D Reserving device.
LTFS30392D Backend reserve (PRO) xxxxxxx.
LTFS12028D Unlocking medium.
LTFS30392D Backend allow medium removal xxxxx.
LTFS30392D Backend read block limits xxxxx.
LTFS17160I Maximum device block size is 1048576.
LTFS11330I Loading cartridge.
LTFS30392D Backend load xxxxxxx.
LTFS30398D Backend readpos: (0, 0) FM = 0 xxxxxxx.
LTFS12026D Locking medium in the drive.
LTFS30392D Backend prevent medium removal xxxxxxx.
LTFS30398D Backend readpos: (0, 0) FM = 0 xxxxxxx.
LTFS30392D Backend read block limits xxxxxx.
LTFS11332I Load successful.
LTFS17157I Changing the drive setting to write-anywhere mode.
LTFS15007D Device opened.
LTFS15049I Checking the medium (load).
LTFS30392D Backend load xxxxxx.
LTFS30398D Backend readpos: (0, 0) FM = 0 xxxxxx.
LTFS30398D Backend readpos: (0, 0) FM = 0 xxxxxx.
LTFS30392D Backend read block limits xxxxxx.
LTFS15010I Creating data partition b on SCSI partition 1.
LTFS15011I Creating index partition a on SCSI partition 0.
LTFS30392D Backend read block limits xxxxxx.
LTFS17165I Resetting the medium's capacity proportion.
LTFS30392D Backend load xxxxxx.
LTFS30398D Backend readpos: (0, 0) FM = 0 xxxxxx.
LTFS30393D Backend setcap: 65535 xxxxxxx.
LTFS30201D CDB check condition: sense = 062a01, Mode Parameters Changed.
LTFS30204D TEST_UNIT_READY (0x00) expected error -20604.
LTFS11097I Partitioning the medium.
LTFS30392D Backend load xxxxx.
LTFS30398D Backend readpos: (0, 0) FM = 0 xxxx.
LTFS30392D Backend format xxxxx.
LTFS11100I Writing label to partition b.
LTFS30397D Backend locate: (1, 0) xxxxx.
LTFS30398D Backend readpos: (1, 0) FM = 0 xxxx.
LTFS30394D Backend write file marks: 1 xxxxx.
LTFS30398D Backend readpos: (1, 2) FM = 1 xxxxx.
LTFS30394D Backend write file marks: 1 xxxx.
LTFS30398D Backend readpos: (1, 4) FM = 2 xxxxx.
LTFS11278I Writing index to partition b.
LTFS11339D Read volume lock status (0).
LTFS17235I Writing index of NO_BARCODE to b (Reason: Format, 0 files) xxxxxx.
LTFS30394D Backend write file marks: 1 xxxxxx.
LTFS30398D Backend readpos: (1, 5) FM = 3 xxxxxx.
LTFS30394D Backend write file marks: 1 xxxxxx.
LTFS30398D Backend readpos: (1, 7) FM = 4 xxxxxx.
LTFS17236I Wrote index of NO_BARCODE (b, xxxxxx).
LTFS11337I Update index-dirty flag (0) - NO_BARCODE (0x0x55ee6cfe3290).
LTFS11100I Writing label to partition a.
LTFS30397D Backend locate: (0, 0) xxxxxx.
LTFS30398D Backend readpos: (0, 0) FM = 0 xxxxxx.
LTFS30394D Backend write file marks: 1 xxxxxx.
LTFS30398D Backend readpos: (0, 2) FM = 1 xxxxxx.
LTFS30394D Backend write file marks: 1 xxxxxx.
LTFS30398D Backend readpos: (0, 4) FM = 2 xxxxxx.
LTFS11278I Writing index to partition a.
LTFS11339D Read volume lock status (0).
LTFS30394D Backend write file marks: 0 xxxxxx.
LTFS30398D Backend readpos: (0, 4) FM = 2 xxxxxx.
LTFS17235I Writing index of NO_BARCODE to a (Reason: Format, 0 files) xxxxxx.
LTFS30394D Backend write file marks: 1 xxxxxx.
LTFS30398D Backend readpos: (0, 5) FM = 3 xxxxxx.
LTFS30394D Backend write file marks: 1 xxxxxx.
LTFS30398D Backend readpos: (0, 7) FM = 4 xxxxxx.
LTFS17236I Wrote index of NO_BARCODE (a, xxxxxx).
LTFS15013I Volume UUID is: de8030bf-1c4b-44de-9e31-8c7d12e167fd.

LTFS15019I Volume capacity is 1445 GB.
LTFS15020D Closing the device.
LTFS12028D Unlocking medium.
LTFS30392D Backend allow medium removal xxxxxx.
LTFS12025D Releasing device.
LTFS30392D Backend release (PRO) xxxxxx.
LTFS30393D Backend LBP Enable: 0 .
LTFS30393D Backend LBP Method: 1 .
LTFS30201D CDB check condition: sense = 052600, Invalid Field in Parameter List.
LTFS30205I MODESELECT (0x55) returns -20500.
LTFS30263I MODESELECT returns Invalid Field in Parameter List (-20500) /dev/sg0.
LTFS15022D Device closed.
LTFS15024I Medium formatted successfully.

and here the extended mount command:


170e LTFS14000I LTFS starting, LTFS version 2.4.2.1 (Prelim), log level 6.
170e LTFS14058I LTFS Format Specification version 2.4.0.
170e LTFS14104I Launched by "ltfs -o nonempty -o devname=/dev/sg0 -o verbose=6 /mnt/ltfs".
170e LTFS14105I This binary is built for Linux (x86_64).
170e LTFS14106I GCC version is 8.3.0.
170e LTFS17087I Kernel version: Linux version 5.4.44-1-pve (root@nora) (gcc version 8.3.0 (Debian 8.3.0-6)) #1 SMP PVE 5.4.44-1 (Fri, 12 Jun 2020 08:18:46 +0200) i386.
170e LTFS17089I Distribution: PRETTY_NAME="Debian GNU/Linux 10 (buster)".
170e LTFS14063I Sync type is "time", Sync time is 300 sec.
170e LTFS17085I Plugin: Loading "sg" tape backend.
170e LTFS17085I Plugin: Loading "unified" iosched backend.
170e LTFS14095I Set the tape device write-anywhere mode to avoid cartridge ejection.
170e LTFS30209I Opening a device through sg-ibmtape driver (/dev/sg0).
170e LTFS30250I Opened SCSI tape device 6.0.0.0 (/dev/sg0).
170e LTFS30207I Vendor ID is HP      .
170e LTFS30208I Product ID is Ultrium 5-SCSI  .
170e LTFS30214I Firmware revision is Z6ED.
170e LTFS30215I Drive serial is xxxxx.
170e LTFS30285I Reserved buffer size of /dev/sg0 is 1048576.
170e LTFS39801D SCSI timeout (op_code 0x5f, timeout = 60).
170e LTFS12023D Reserving device.
170e LTFS30392D Backend reserve (PRO) xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x5f, timeout = 60).
170e LTFS12028D Unlocking medium.
170e LTFS30392D Backend allow medium removal xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x1e, timeout = 60).
170e LTFS30392D Backend read block limits xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x05, timeout = 60).
170e LTFS17160I Maximum device block size is 1048576.
170e LTFS11330I Loading cartridge.
170e LTFS30392D Backend load xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x1b, timeout = 600).
170e LTFS39801D SCSI timeout (op_code 0x34, timeout = 60).
170e LTFS30398D Backend readpos: (0, 0) FM = 0 xxxxxx.
170e LTFS30393D Backend modesense: 63 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x5a, timeout = 60).
170e LTFS30392D Backend test unit ready xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x00, timeout = 60).
170e LTFS12026D Locking medium in the drive.
170e LTFS30392D Backend prevent medium removal xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x1e, timeout = 60).
170e LTFS39801D SCSI timeout (op_code 0x34, timeout = 60).
170e LTFS30398D Backend readpos: (0, 0) FM = 0 xxxxxx.
170e LTFS30393D Backend logsense: 49 .
170e LTFS39801D SCSI timeout (op_code 0x4d, timeout = 60).
170e LTFS30397D Backend capacity part0: (36750, 36750) xxxxxx.
170e LTFS30397D Backend capacity part1: (1396529, 1396529) xxxxxx.
170e LTFS30393D Backend modesense: 16 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x5a, timeout = 60).
170e LTFS30392D Backend read block limits xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x05, timeout = 60).
170e LTFS30393D Backend modesense: 16 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x5a, timeout = 60).
170e LTFS11332I Load successful.
170e LTFS30392D Backend test unit ready xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x00, timeout = 60).
170e LTFS30392D Backend test unit ready xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x00, timeout = 60).
170e LTFS30393D Backend logsense: 49 .
170e LTFS39801D SCSI timeout (op_code 0x4d, timeout = 60).
170e LTFS30397D Backend capacity part0: (36750, 36750) xxxxxx.
170e LTFS30397D Backend capacity part1: (1396529, 1396529) xxxxxx.
170e LTFS30393D Backend modesense: 16 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x5a, timeout = 60).
170e LTFS30392D Backend modeselect xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x55, timeout = 60).
170e LTFS17157I Changing the drive setting to write-anywhere mode.
170e LTFS30393D Backend modesense: 16 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x5a, timeout = 60).
170e LTFS11005I Mounting the volume.
170e LTFS11012D Loading the tape.
170e LTFS30392D Backend test unit ready xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x00, timeout = 60).
170e LTFS30392D Backend load xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x1b, timeout = 600).
170e LTFS39801D SCSI timeout (op_code 0x34, timeout = 60).
170e LTFS30398D Backend readpos: (0, 0) FM = 0 xxxxxx.
170e LTFS30393D Backend modesense: 63 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x5a, timeout = 60).
170e LTFS30392D Backend test unit ready xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x00, timeout = 60).
170e LTFS39801D SCSI timeout (op_code 0x34, timeout = 60).
170e LTFS30398D Backend readpos: (0, 0) FM = 0 xxxxxx.
170e LTFS30393D Backend logsense: 49 .
170e LTFS39801D SCSI timeout (op_code 0x4d, timeout = 60).
170e LTFS30397D Backend capacity part0: (36750, 36750) xxxxxx.
170e LTFS30397D Backend capacity part1: (1396529, 1396529) xxxxxx.
170e LTFS30393D Backend modesense: 16 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x5a, timeout = 60).
170e LTFS30392D Backend read block limits xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x05, timeout = 60).
170e LTFS30393D Backend modesense: 16 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x5a, timeout = 60).
170e LTFS30397D Backend locate: (0, 0) xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x92, timeout = 1200).
170e LTFS39801D SCSI timeout (op_code 0x34, timeout = 60).
170e LTFS30398D Backend readpos: (0, 0) FM = 0 xxxxxx.
170e LTFS11007D Tape is loaded.
170e LTFS30393D Backend logsense: 49 .
170e LTFS39801D SCSI timeout (op_code 0x4d, timeout = 60).
170e LTFS30397D Backend capacity part0: (36750, 36750) xxxxxx.
170e LTFS30397D Backend capacity part1: (1396529, 1396529) xxxxxx.
170e LTFS11008D Reading partition labels.
170e LTFS30393D Backend modesense: 16 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x5a, timeout = 60).
170e LTFS30392D Backend read block limits xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x05, timeout = 60).
170e LTFS30397D Backend locate: (0, 0) xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x92, timeout = 1200).
170e LTFS39801D SCSI timeout (op_code 0x34, timeout = 60).
170e LTFS30398D Backend readpos: (0, 0) FM = 0 xxxxxx.
170e LTFS30395D Backend read: 4096 bytes xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x08, timeout = 1200).
170e LTFS30395D Backend read: 4096 bytes xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x08, timeout = 1200).
170e LTFS30201D CDB check condition: sense = 000001, Filemark Detected.
170e LTFS30204D READ (0x08) expected error -20004.
170e LTFS30219D Read block: file mark detected.
170e LTFS30395D Backend read: 4096 bytes xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x08, timeout = 1200).
170e LTFS30395D Backend read: 4096 bytes xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x08, timeout = 1200).
170e LTFS30201D CDB check condition: sense = 000001, Filemark Detected.
170e LTFS30204D READ (0x08) expected error -20004.
170e LTFS30219D Read block: file mark detected.
170e LTFS30393D Backend modesense: 16 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x5a, timeout = 60).
170e LTFS30392D Backend read block limits xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x05, timeout = 60).
170e LTFS30397D Backend locate: (1, 0) xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x92, timeout = 1200).
170e LTFS39801D SCSI timeout (op_code 0x34, timeout = 60).
170e LTFS30398D Backend readpos: (1, 0) FM = 0 xxxxxx.
170e LTFS30395D Backend read: 4096 bytes xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x08, timeout = 1200).
170e LTFS30395D Backend read: 4096 bytes xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x08, timeout = 1200).
170e LTFS30201D CDB check condition: sense = 000001, Filemark Detected.
170e LTFS30204D READ (0x08) expected error -20004.
170e LTFS30219D Read block: file mark detected.
170e LTFS30395D Backend read: 4096 bytes xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x08, timeout = 1200).
170e LTFS30395D Backend read: 4096 bytes xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x08, timeout = 1200).
170e LTFS30201D CDB check condition: sense = 000001, Filemark Detected.
170e LTFS30204D READ (0x08) expected error -20004.
170e LTFS30219D Read block: file mark detected.
170e LTFS30393D Backend modesense: 15 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x5a, timeout = 60).
170e LTFS30392D Backend modeselect xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x55, timeout = 60).
170e LTFS30393D Backend modesense: 16 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x5a, timeout = 60).
170e LTFS30392D Backend read block limits xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x05, timeout = 60).
170e LTFS11013D Partition labels are valid.
170e LTFS11014D Reading MAM parameters.
170e LTFS30397D Backend readattr: (0, 5667) xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x8c, timeout = 60).
170e LTFS11339D Read volume lock status (0).
170e LTFS30393D Backend modesense: 37 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x5a, timeout = 60).
170e LTFS30201D CDB check condition: sense = 052400, Invalid Field in CDB.
170e LTFS30205I MODESENSE (0x5a) returns -20501.
170e LTFS30263I MODESENSE returns Invalid Field in CDB (-20501) /dev/sg0.
170e LTFS30393D Backend logsense: 23 .
170e LTFS39801D SCSI timeout (op_code 0x4d, timeout = 60).
170e LTFS30393D Backend logsense: 23 .
170e LTFS39801D SCSI timeout (op_code 0x4d, timeout = 60).
170e LTFS30397D Backend readattr: (0, 2060) xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x8c, timeout = 60).
170e LTFS30397D Backend readattr: (1, 2060) xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x8c, timeout = 60).
170e LTFS30397D Backend readattr: (0, 9) xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x8c, timeout = 60).
170e LTFS11018D Done reading MAM parameters.
170e LTFS11019D Checking volume consistency.
170e LTFS11026I Performing a full medium consistency check.
170e LTFS30397D Backend locate: (0, 18446744073709551615) xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x92, timeout = 1200).
170e LTFS30201D CDB check condition: sense = 080005, End-of-Data (EOD) Detected.
170e LTFS30204D LOCATE (0x92) expected error -20801.
170e LTFS30224D EOD detected (Locate): ignore sense.
170e LTFS39801D SCSI timeout (op_code 0x34, timeout = 60).
170e LTFS30398D Backend readpos: (0, 7) FM = 4 xxxxxx.
170e LTFS30396D Backend space back file marks: 1 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x91, timeout = 1200).
170e LTFS39801D SCSI timeout (op_code 0x34, timeout = 60).
170e LTFS30398D Backend readpos: (0, 6) FM = 3 xxxxxx.
170e LTFS30396D Backend space back file marks: 1 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x91, timeout = 1200).
170e LTFS39801D SCSI timeout (op_code 0x34, timeout = 60).
170e LTFS30398D Backend readpos: (0, 4) FM = 2 xxxxxx.
170e LTFS30396D Backend space forward file marks: 1 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x91, timeout = 1200).
170e LTFS39801D SCSI timeout (op_code 0x34, timeout = 60).
170e LTFS30398D Backend readpos: (0, 5) FM = 3 xxxxxx.
170e LTFS30395D Backend read: 524288 bytes xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x08, timeout = 1200).
170e LTFS30201D CDB check condition: sense = 000000, No Additional Sense Information.
170e LTFS30204D READ (0x08) expected error -20000.
170e LTFS30218D Read block: underrun in illegal length. residual = 523294, actual = 994.
170e LTFS30395D Backend read: 524288 bytes xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x08, timeout = 1200).
170e LTFS30201D CDB check condition: sense = 000001, Filemark Detected.
170e LTFS30204D READ (0x08) expected error -20004.
170e LTFS30219D Read block: file mark detected.
170e LTFS30396D Backend space back file marks: 1 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x91, timeout = 1200).
170e LTFS39801D SCSI timeout (op_code 0x34, timeout = 60).
170e LTFS30398D Backend readpos: (0, 6) FM = 3 xxxxxx.
170e LTFS30396D Backend space forward file marks: 1 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x91, timeout = 1200).
170e LTFS39801D SCSI timeout (op_code 0x34, timeout = 60).
170e LTFS30398D Backend readpos: (0, 7) FM = 4 xxxxxx.
170e LTFS30397D Backend locate: (1, 18446744073709551615) xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x92, timeout = 1200).
170e LTFS30201D CDB check condition: sense = 080005, End-of-Data (EOD) Detected.
170e LTFS30204D LOCATE (0x92) expected error -20801.
170e LTFS30224D EOD detected (Locate): ignore sense.
170e LTFS39801D SCSI timeout (op_code 0x34, timeout = 60).
170e LTFS30398D Backend readpos: (1, 7) FM = 4 xxxxxx.
170e LTFS30396D Backend space back file marks: 1 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x91, timeout = 1200).
170e LTFS39801D SCSI timeout (op_code 0x34, timeout = 60).
170e LTFS30398D Backend readpos: (1, 6) FM = 3 xxxxxx.
170e LTFS30396D Backend space back file marks: 1 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x91, timeout = 1200).
170e LTFS39801D SCSI timeout (op_code 0x34, timeout = 60).
170e LTFS30398D Backend readpos: (1, 4) FM = 2 xxxxxx.
170e LTFS30396D Backend space forward file marks: 1 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x91, timeout = 1200).
170e LTFS39801D SCSI timeout (op_code 0x34, timeout = 60).
170e LTFS30398D Backend readpos: (1, 5) FM = 3 xxxxxx.
170e LTFS30395D Backend read: 524288 bytes xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x08, timeout = 1200).
170e LTFS30201D CDB check condition: sense = 000000, No Additional Sense Information.
170e LTFS30204D READ (0x08) expected error -20000.
170e LTFS30218D Read block: underrun in illegal length. residual = 523405, actual = 883.
170e LTFS30395D Backend read: 524288 bytes xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x08, timeout = 1200).
170e LTFS30201D CDB check condition: sense = 000001, Filemark Detected.
170e LTFS30204D READ (0x08) expected error -20004.
170e LTFS30219D Read block: file mark detected.
170e LTFS30396D Backend space back file marks: 1 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x91, timeout = 1200).
170e LTFS39801D SCSI timeout (op_code 0x34, timeout = 60).
170e LTFS30398D Backend readpos: (1, 6) FM = 3 xxxxxx.
170e LTFS30396D Backend space forward file marks: 1 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x91, timeout = 1200).
170e LTFS39801D SCSI timeout (op_code 0x34, timeout = 60).
170e LTFS30398D Backend readpos: (1, 7) FM = 4 xxxxxx.
170e LTFS11233I Updating MAM coherency data.
170e LTFS30397D Backend readattr: (0, 9) xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x8c, timeout = 60).
170e LTFS30396D Backend writeattr: 0 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x8d, timeout = 60).
170e LTFS30396D Backend writeattr: 1 xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x8d, timeout = 60).
170e LTFS11028D Consistency check finished.
170e LTFS30397D Backend readattr: (0, 2048) xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x8c, timeout = 60).
170e LTFS30397D Backend readattr: (0, 2049) xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x8c, timeout = 60).
170e LTFS30397D Backend readattr: (0, 2050) xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x8c, timeout = 60).
170e LTFS30397D Backend readattr: (0, 2051) xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x8c, timeout = 60).
170e LTFS30397D Backend readattr: (0, 2053) xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x8c, timeout = 60).
170e LTFS30397D Backend readattr: (0, 2054) xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x8c, timeout = 60).
170e LTFS30397D Backend readattr: (0, 2059) xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x8c, timeout = 60).
170e LTFS30397D Backend readattr: (0, 5667) xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x8c, timeout = 60).
170e LTFS30397D Backend readattr: (0, 2056) xxxxxx.
170e LTFS39801D SCSI timeout (op_code 0x8c, timeout = 60).
170e LTFS17227I Tape attribute: Vendor = IBM     .
170e LTFS17227I Tape attribute: Application Name = LTFS                            .
170e LTFS17227I Tape attribute: Application Version = 2.4.2.1 .
170e LTFS17227I Tape attribute: Medium Label = .
170e LTFS17228I Tape attribute: Text Localization ID = 0x81.
170e LTFS17227I Tape attribute: Barcode =                                 .
170e LTFS17227I Tape attribute: Application Format Version = 2.4.0           .
170e LTFS17228I Tape attribute: Volume Lock Status = 0x00.
170e LTFS17227I Tape attribute: Media Pool name = .
170e LTFS14111I Initial setup completed successfully.
170e LTFS14112I Invoke 'mount' command to check the result of final setup.
170e LTFS14113I Specified mount point is listed if succeeded.
root@vhost:~# mount | grep ltfs
ltfs:/dev/sg0 on /mnt/ltfs type fuse (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other)
Nooby1 commented 2 years ago

I have this issue too and as a result could not get native LTFS encryption to work Vendor ID is HP 3ab7fa LTFS30208I Product ID is Ultrium 5-SCSI 3ab7fa LTFS30214I Firmware revision is I6RW

so I tried other hardware encryption utilities

I also could not get stenc to work https://manpages.ubuntu.com/manpages/bionic/man1/stenc.1.html a warning about stenc - older verions did not use a proper random function to generate keys!

however - I did get bscrypto to work https://manpages.ubuntu.com/manpages/bionic/man8/bscrypto.8.html bscrypto also has key wrapping features built in

I think it would be usefull to put a note about other hardware encryption options in the LTFS wiki? and short primer on libary managed, application managed, key management server?

sunwire commented 2 years ago

@Nooby1

I also could not get stenc to work

If you have HP drive and use stenc try add "-a 1" option

spgill commented 2 years ago

Small bump to this issue; I'm encountering this exact issue on my Quantum LTO-5 HH drive.

If I format a tape with encryption turned on, any time I attempt to mount that tape afterwards LTFS performs a full medium consistency check. It still appears to work correctly afterwards, but doing a consistency check on every mount is.... not ideal 😅

I can provide logs if it would be helpful.

piste-jp commented 2 years ago

At first, I would like to confirm the command line you are using. Could you provide the commands below ?

  1. Command for format
  2. Command for mount
krim404 commented 1 year ago

i can confirm this behaviour as well on a HP LTO6 drive on mac os x. Data is fine, but everytime it has to do a full check. mount command: sudo ltfs -o devname=0 -o eject -o capture_index=./data/index/ ./data/ltfs format command: sudo mkltfs -d 0 -f -n NAME

krim404 commented 12 months ago

Any chance to get an insight on this issue? Having this problem only with the open ltfs implementation, the HPE supplied LTFS works flawless. Sadly i'm mixing an HPE and a IBM device, so i always have to switch the ltfs binary.