Closed ia2115 closed 2 years ago
Did you apply this (UNTESTED) patch: https://paste.debian.net/plain/1198106
It is NOT included in the ltfs repository.
do: $ patch -p1 < 1198106
recompile it
and run:# ltfs -o device_list
nope doesnt work on freebsd 12.2 wiped it all, git cloned https://github.com/LinearTapeFileSystem/ltfs.git and applied patch
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.
190de LTFS14000I LTFS starting, LTFS version 2.5.0.0 (Prelim), log level 2.
190de LTFS14058I LTFS Format Specification version 2.4.0.
190de LTFS14104I Launched by "ltfs -o device_list".
190de LTFS14105I This binary is built for FreeBSD.
190de LTFS14106I GCC version is FreeBSD Clang 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2).
190de LTFS17087I Kernel version: FreeBSD 12.2-STABLE r369131 GENERIC
.
190de LTFS17085I Plugin: Loading "cam" tape backend.
Tape Device list:.
no device found
from var/log/messages
May 21 10:55:33 pzfjails kernel: sa0 at mps0 bus 0 scbus0 target 83 lun 0
May 21 10:55:33 pzfjails kernel: sa0: <TANDBERG LTO-6 HH 3579> Removable Sequential Access SPC-4 SCSI device
May 21 10:55:33 pzfjails kernel: sa0: Serial Number HUJ527449P
May 21 10:55:33 pzfjails kernel: sa0: 600.000MB/s transfers
May 21 10:55:33 pzfjails kernel: sa0: Command Queueing enabled
Do other LTO tape drive models work?
Also, you can try the stable branch:
git clone -b v2.4-stable https://github.com/LinearTapeFileSystem/ltfs.git
or
git checkout v2.4-stable
# on a downloaded repo
And recompile it again with the TANDBERG patch.
I think the drive list logic of the cam
tape backend has a problem.
But you already know the device file of the drive. I think you can try ltfs -o devname=/dev/sa0
, the open logic looks it just try to open the device file.
it does try to do something, but not quiet the right thing: this is done with a lto6 tape, who i read/write on debian test earlyer, will now see if lto5 tape does same kind of error in Tandberg tapedrive on FreeBSD 12.2
# ltfs -o devname=/dev/sa0 /mnt/lto6
LTFS9015W Setting the locale to 'en_US.UTF-8'. If this is wrong, please set the LANG environment variable before starting ltfs.
190e0 LTFS14000I LTFS starting, LTFS version 2.5.0.0 (Prelim), log level 2.
190e0 LTFS14058I LTFS Format Specification version 2.4.0.
190e0 LTFS14104I Launched by "ltfs -o devname=/dev/sa0 /mnt/lto6".
190e0 LTFS14105I This binary is built for FreeBSD.
190e0 LTFS14106I GCC version is FreeBSD Clang 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2).
190e0 LTFS17087I Kernel version: FreeBSD 12.2-STABLE r369131 GENERIC
.
190e0 LTFS14063I Sync type is "time", Sync time is 300 sec.
190e0 LTFS17085I Plugin: Loading "cam" tape backend.
190e0 LTFS17085I Plugin: Loading "unified" iosched backend.
190e0 LTFS14095I Set the tape device write-anywhere mode to avoid cartridge ejection.
190e0 LTFS31223I Opening a device through CAM driver (/dev/sa0)
190e0 LTFS31228I Product ID is 'LTO-6 HH'
190e0 LTFS31229I Vendor ID is TANDBERG
190e0 LTFS31232I Firmware revision is 3579
190e0 LTFS31233I Drive serial is HUJ527449P
190e0 LTFS17160I Maximum device block size is 131072.
190e0 LTFS11330I Loading cartridge.
190e0 LTFS11332I Load successful.
190e0 LTFS31213I Error on modeselect: (pass18:mps0:0:83:0): MODE SELECT(10). CDB: 55 00 00 00 00 00 00 00 30 00
(pass18:mps0:0:83:0): CAM status: SCSI Status Error
(pass18:mps0:0:83:0): SCSI status: Check Condition
(pass18:mps0:0:83:0): SCSI sense: ILLEGAL REQUEST asc:24,0 (Invalid field in CDB)
(pass18:mps0:0:83:0): Command byte 1 bit 4 is invalid
(-20501) HUJ527449P
190e0 LTFS17103E Cannot set PEWS: Mode Select for Device Configuration Extension failed (-20501).
190e0 LTFS17157I Changing the drive setting to write-anywhere mode.
190e0 LTFS11005I Mounting the volume.
190e0 LTFS31213I Error on modeselect: (pass18:mps0:0:83:0): MODE SELECT(10). CDB: 55 00 00 00 00 00 00 00 20 00
(pass18:mps0:0:83:0): CAM status: SCSI Status Error
(pass18:mps0:0:83:0): SCSI status: Check Condition
(pass18:mps0:0:83:0): SCSI sense: ILLEGAL REQUEST asc:24,0 (Invalid field in CDB)
(pass18:mps0:0:83:0): Command byte 1 bit 4 is invalid
(-20501) HUJ527449P
190e0 LTFS12031E Cannot set compression: backend call failed (-20501).
190e0 LTFS11010E Cannot read volume: failed to set medium compression.
190e0 LTFS14013E Cannot mount the volume.
190e0 LTFS31213I Error on modeselect: (pass18:mps0:0:83:0): MODE SELECT(10). CDB: 55 00 00 00 00 00 00 00 30 00
(pass18:mps0:0:83:0): CAM status: SCSI Status Error
(pass18:mps0:0:83:0): SCSI status: Check Condition
(pass18:mps0:0:83:0): SCSI sense: ILLEGAL REQUEST asc:24,0 (Invalid field in CDB)
(pass18:mps0:0:83:0): Command byte 1 bit 4 is invalid
(-20501) HUJ527449P
190e0 LTFS17155E Cannot set WRITE MODE: Mode Select for Device Configuration Extension failed (-20501).
190e0 LTFS31213I Error on modesense: (pass18:mps0:0:83:0): MODE SENSE(10). CDB: 5a 00 24 00 00 00 00 00 28 00
(pass18:mps0:0:83:0): CAM status: SCSI Status Error
(pass18:mps0:0:83:0): SCSI status: Check Condition
(pass18:mps0:0:83:0): SCSI sense: ILLEGAL REQUEST asc:24,0 (Invalid field in CDB)
(pass18:mps0:0:83:0): Command byte 2 bit 5 is invalid
(-20501) HUJ527449P
trying to format lto5 tape in Tandberg lto6 drive gives this output:
# mkltfs -d /dev/sa0
LTFS9015W Setting the locale to 'en_US.UTF-8'. If this is wrong, please set the LANG environment variable before starting mkltfs.
LTFS15000I Starting mkltfs, LTFS version 2.5.0.0 (Prelim), log level 2.
LTFS15041I Launched by "mkltfs -d /dev/sa0".
LTFS15042I This binary is built for FreeBSD.
LTFS15043I GCC version is FreeBSD Clang 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2).
LTFS17087I Kernel version: FreeBSD 12.2-STABLE r369131 GENERIC
.
LTFS15003I Formatting device '/dev/sa0'.
LTFS15004I LTFS volume blocksize: 524288.
LTFS15005I Index partition placement policy: None.
LTFS11337I Update index-dirty flag (1) - NO_BARCODE (0x0x801ff6000).
LTFS17085I Plugin: Loading "cam" tape backend.
LTFS31223I Opening a device through CAM driver (/dev/sa0)
LTFS31228I Product ID is 'LTO-6 HH'
LTFS31229I Vendor ID is TANDBERG
LTFS31232I Firmware revision is 3579
LTFS31233I Drive serial is HUJ527449P
LTFS17160I Maximum device block size is 131072.
LTFS11330I Loading cartridge.
LTFS11332I Load successful.
LTFS31213I Error on modeselect: (pass18:mps0:0:83:0): MODE SELECT(10). CDB: 55 00 00 00 00 00 00 00 30 00
(pass18:mps0:0:83:0): CAM status: SCSI Status Error
(pass18:mps0:0:83:0): SCSI status: Check Condition
(pass18:mps0:0:83:0): SCSI sense: ILLEGAL REQUEST asc:24,0 (Invalid field in CDB)
(pass18:mps0:0:83:0): Command byte 1 bit 4 is invalid
(-20501) HUJ527449P
LTFS17103E Cannot set PEWS: Mode Select for Device Configuration Extension failed (-20501).
LTFS17157I Changing the drive setting to write-anywhere mode.
LTFS15049I Checking the medium (mount).
LTFS31213I Error on modeselect: (pass18:mps0:0:83:0): MODE SELECT(10). CDB: 55 00 00 00 00 00 00 00 20 00
(pass18:mps0:0:83:0): CAM status: SCSI Status Error
(pass18:mps0:0:83:0): SCSI status: Check Condition
(pass18:mps0:0:83:0): SCSI sense: ILLEGAL REQUEST asc:24,0 (Invalid field in CDB)
(pass18:mps0:0:83:0): Command byte 1 bit 4 is invalid
(-20501) HUJ527449P
LTFS12031E Cannot set compression: backend call failed (-20501).
LTFS11010E Cannot read volume: failed to set medium compression.
LTFS31213I Error on modeselect: (pass18:mps0:0:83:0): MODE SELECT(10). CDB: 55 00 00 00 00 00 00 00 30 00
(pass18:mps0:0:83:0): CAM status: SCSI Status Error
(pass18:mps0:0:83:0): SCSI status: Check Condition
(pass18:mps0:0:83:0): SCSI sense: ILLEGAL REQUEST asc:24,0 (Invalid field in CDB)
(pass18:mps0:0:83:0): Command byte 1 bit 4 is invalid
(-20501) HUJ527449P
LTFS17155E Cannot set WRITE MODE: Mode Select for Device Configuration Extension failed (-20501).
LTFS31213I Error on modesense: (pass18:mps0:0:83:0): MODE SENSE(10). CDB: 5a 00 24 00 00 00 00 00 28 00
(pass18:mps0:0:83:0): CAM status: SCSI Status Error
(pass18:mps0:0:83:0): SCSI status: Check Condition
(pass18:mps0:0:83:0): SCSI sense: ILLEGAL REQUEST asc:24,0 (Invalid field in CDB)
(pass18:mps0:0:83:0): Command byte 2 bit 5 is invalid
(-20501) HUJ527449P
LTFS15023I Formatting failed.
will try switch to the stable branch, and patch the tandberg data into that and see what will happend
Freebsd 12.2 on 2.4.0 stable it seems to not work both IBM drive and my Tandberg
# 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.
18d91 LTFS14000I LTFS starting, LTFS version 2.4.3.2 (Prelim), log level 2.
18d91 LTFS14058I LTFS Format Specification version 2.4.0.
18d91 LTFS14104I Launched by "ltfs -o device_list".
18d91 LTFS14105I This binary is built for FreeBSD.
18d91 LTFS14106I GCC version is FreeBSD Clang 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2).
18d91 LTFS17087I Kernel version: FreeBSD 12.2-STABLE r369131 GENERIC
.
18d91 LTFS17085I Plugin: Loading "cam" tape backend.
Tape Device list:.
Device Name = sa0, Vendor ID = IBM, Product ID = ULTRIUM-HH5, Serial Number = 9068020986, Product Name =[ULTRIUM-HH5].
root@pzfjails:~ # ltfs -o devname=/dev/sa0 /mnt/lto5
LTFS9015W Setting the locale to 'en_US.UTF-8'. If this is wrong, please set the LANG environment variable before starting ltfs.
18ea2 LTFS14000I LTFS starting, LTFS version 2.4.3.2 (Prelim), log level 2.
18ea2 LTFS14058I LTFS Format Specification version 2.4.0.
18ea2 LTFS14104I Launched by "ltfs -o devname=/dev/sa0 /mnt/lto5".
18ea2 LTFS14105I This binary is built for FreeBSD.
18ea2 LTFS14106I GCC version is FreeBSD Clang 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2).
18ea2 LTFS17087I Kernel version: FreeBSD 12.2-STABLE r369131 GENERIC
.
18ea2 LTFS14063I Sync type is "time", Sync time is 300 sec.
18ea2 LTFS17085I Plugin: Loading "cam" tape backend.
18ea2 LTFS17085I Plugin: Loading "unified" iosched backend.
18ea2 LTFS14095I Set the tape device write-anywhere mode to avoid cartridge ejection.
18ea2 LTFS31223I Opening a device through CAM driver (/dev/sa0)
18ea2 LTFS31228I Product ID is 'ULTRIUM-HH5'
18ea2 LTFS31229I Vendor ID is IBM
18ea2 LTFS31232I Firmware revision is C7R3
18ea2 LTFS31233I Drive serial is 9068020986
18ea2 LTFS17160I Maximum device block size is 131072.
18ea2 LTFS11330I Loading cartridge.
18ea2 LTFS31272I Logical block protection is disabled
18ea2 LTFS11332I Load successful.
18ea2 LTFS17157I Changing the drive setting to write-anywhere mode.
18ea2 LTFS11005I Mounting the volume.
18ea2 LTFS31272I Logical block protection is disabled
18ea2 LTFS11011E Cannot read volume: block size is 524288, but the device only supports a block size of 131072.
18ea2 LTFS14013E Cannot mount the volume.
18ea2 LTFS31272I Logical block protection is disabled
root@pzfjails:~ # mkltfs -d /dev/sa0
LTFS9015W Setting the locale to 'en_US.UTF-8'. If this is wrong, please set the LANG environment variable before starting mkltfs.
LTFS15000I Starting mkltfs, LTFS version 2.4.3.2 (Prelim), log level 2.
LTFS15041I Launched by "mkltfs -d /dev/sa0".
LTFS15042I This binary is built for FreeBSD.
LTFS15043I GCC version is FreeBSD Clang 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2).
LTFS17087I Kernel version: FreeBSD 12.2-STABLE r369131 GENERIC
.
LTFS15003I Formatting device '/dev/sa0'.
LTFS15004I LTFS volume blocksize: 524288.
LTFS15005I Index partition placement policy: None.
LTFS11337I Update index-dirty flag (1) - NO_BARCODE (0x0x801ff6000).
LTFS17085I Plugin: Loading "cam" tape backend.
LTFS31223I Opening a device through CAM driver (/dev/sa0)
LTFS31228I Product ID is 'ULTRIUM-HH5'
LTFS31229I Vendor ID is IBM
LTFS31232I Firmware revision is C7R3
LTFS31233I Drive serial is 9068020986
LTFS17160I Maximum device block size is 131072.
LTFS11330I Loading cartridge.
LTFS31272I Logical block protection is disabled
LTFS11332I Load successful.
LTFS17157I Changing the drive setting to write-anywhere mode.
LTFS15049I Checking the medium (mount).
LTFS31272I Logical block protection is disabled
LTFS11011E Cannot read volume: block size is 524288, but the device only supports a block size of 131072.
LTFS31272I Logical block protection is disabled
LTFS15023I Formatting failed.
mt -f /dev/sa0.ctl status -v
Drive: sa0: <IBM ULTRIUM-HH5 C7R3> Serial Number: 9068020986
---------------------------------
Mode Density Blocksize bpi Compression
Current: 0x58:LTO-5 variable 384607 enabled (0x1)
---------------------------------
Current Driver State: at rest.
---------------------------------
Partition: 0 Calc File Number: 0 Calc Record Number: 0
Residual: 0 Reported File Number: 0 Reported Record Number: 0
Flags: BOP
---------------------------------
Tape I/O parameters:
Maximum I/O size allowed by driver and controller (maxio): 131072 bytes
Maximum I/O size reported by controller (cpi_maxio): 4722688 bytes
Maximum block size supported by tape drive and media (max_blk): 8388608 bytes
Minimum block size supported by tape drive and media (min_blk): 1 bytes
Block granularity supported by tape drive and media (blk_gran): 0 bytes
Maximum possible I/O size (max_effective_iosize): 131072 bytes
Seems i have at least one problem on my freebsd atm, the maximum io size beeing to low. trying to investigate on how i can provice the amount needed for operation.
trying to mount tape on tandberg, with no tape in drive:
# ltfs /mnt/lto5
LTFS9015W Setting the locale to 'en_US.UTF-8'. If this is wrong, please set the LANG environment variable before starting ltfs.
18974 LTFS14000I LTFS starting, LTFS version 2.5.0.0 (Prelim), log level 2.
18974 LTFS14058I LTFS Format Specification version 2.4.0.
18974 LTFS14104I Launched by "ltfs /mnt/lto5".
18974 LTFS14105I This binary is built for FreeBSD.
18974 LTFS14106I GCC version is FreeBSD Clang 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2).
18974 LTFS17087I Kernel version: FreeBSD 12.2-STABLE r369131 GENERIC
.
18974 LTFS14063I Sync type is "time", Sync time is 300 sec.
18974 LTFS17085I Plugin: Loading "cam" tape backend.
18974 LTFS17085I Plugin: Loading "unified" iosched backend.
18974 LTFS14095I Set the tape device write-anywhere mode to avoid cartridge ejection.
18974 LTFS31223I Opening a device through CAM driver (/dev/sa0)
18974 LTFS31228I Product ID is 'LTO-6 HH'
18974 LTFS31229I Vendor ID is TANDBERG
Segmentation fault (core dumped)
# mt -f /dev/sa0.ctl status -v
Drive: sa0: <TANDBERG LTO-6 HH 3579> Serial Number: HUJ527449P
---------------------------------
Mode Density Blocksize bpi Compression
Current: 0x5a:LTO-6 variable 384607 enabled (0x1)
---------------------------------
Current Driver State: at rest.
---------------------------------
Partition: -1 Calc File Number: -1 Calc Record Number: -1
Residual: 0 Reported File Number: -1 Reported Record Number: -1
Flags: None
---------------------------------
Tape I/O parameters:
Maximum I/O size allowed by driver and controller (maxio): 131072 bytes
Maximum I/O size reported by controller (cpi_maxio): 4722688 bytes
Maximum block size supported by tape drive and media (max_blk): 0 bytes
Minimum block size supported by tape drive and media (min_blk): 0 bytes
Block granularity supported by tape drive and media (blk_gran): 0 bytes
Maximum possible I/O size (max_effective_iosize): 0 bytes
with newest branch 2.5.0.0 and lto5 tape in tandberg.
# ltfs -o devname=/dev/sa0 /mnt/lto5
LTFS9015W Setting the locale to 'en_US.UTF-8'. If this is wrong, please set the LANG environment variable before starting ltfs.
190de LTFS14000I LTFS starting, LTFS version 2.5.0.0 (Prelim), log level 2.
190de LTFS14058I LTFS Format Specification version 2.4.0.
190de LTFS14104I Launched by "ltfs -o devname=/dev/sa0 /mnt/lto5".
190de LTFS14105I This binary is built for FreeBSD.
190de LTFS14106I GCC version is FreeBSD Clang 10.0.1 (git@github.com:llvm/llvm-project.git llvmorg-10.0.1-0-gef32c611aa2).
190de LTFS17087I Kernel version: FreeBSD 12.2-STABLE r369131 GENERIC
.
190de LTFS14063I Sync type is "time", Sync time is 300 sec.
190de LTFS17085I Plugin: Loading "cam" tape backend.
190de LTFS17085I Plugin: Loading "unified" iosched backend.
190de LTFS14095I Set the tape device write-anywhere mode to avoid cartridge ejection.
190de LTFS31223I Opening a device through CAM driver (/dev/sa0)
190de LTFS31228I Product ID is 'LTO-6 HH'
190de LTFS31229I Vendor ID is TANDBERG
Segmentation fault (core dumped)
@ia2115 can you attach a core file? There's likely some quirk in the tandberg drive's response to a CDB that I or @kendmerry haven't seen IBM drives.
Close this because we don't have any activity 1 year.
Please feel free to open if you have new findings.
Just git cloned newest ltfs, the version that works with debian 10.
from var/log/messages
no compile errors or anything like it.
#