Closed misc2012-DE closed 6 years ago
It looks little bit funny.
Could you provide the entire log and command line you kicked?
By the way, from the log provided at this time...
LTFS30200I Failed to execute SG_IO ioctl, opcode = 08 (22)
shows the driver returns errno=22 against an ioctl(), errno=22 means Invalid argument
Close this issue because no progress was made in this 4 months.
Hi,
We encountered exactly the same error. Looking at this issue allowed us to understand the reason (st isn't supported)
We've found a workaround : lsscsi -g shows the right sg device to use (instead of /dev/st0) [5:0:0:0] tape IBM ULT3580-HH8 JAYF /dev/st0 /dev/sg2 [5:0:0:1] mediumx IBM 3572-TL 0106 /dev/sch0 /dev/sg3
then use ltfs -o devname=/dev/sg2 and the the ltfs command works smoothly :)
Thanks again for your hard work on the ltfs support.
Hi, Thank you for using LTFS.
I wrote the Wiki that describes how to use LTFS. To list the usable device, you can use the command ltfs -o device_list
.
See in detail https://github.com/LinearTapeFileSystem/ltfs/wiki/Quick-start#list-tape-drives
Hi,
I tried it but it returned nothing
root@xxxxxx:~# ltfs -o device_list
5962 LTFS14000I LTFS starting, LTFS version 2.4.2.0 (Prelim), log level 2.
5962 LTFS14058I LTFS Format Specification version 2.4.0.
5962 LTFS14104I Launched by "ltfs -o device_list".
5962 LTFS14105I This binary is built for Linux (x86_64).
5962 LTFS14106I GCC version is 7.4.0.
5962 LTFS17087I Kernel version: Linux version 4.18.0-15-generic (buildd@lcy01-amd64-029) (gcc version 7.3.0 (Ubuntu 7.3.0-16ubuntu3)) #16~18.04.1-Ubuntu SMP Thu Feb 7 14:06:04 UTC 2019 i386.
5962 LTFS17089I Distribution: DISTRIB_ID=Ubuntu.
5962 LTFS17089I Distribution: NAME="Ubuntu".
5962 LTFS17085I Plugin: Loading "sg" tape backend.
Tape Device list:.
root@xxxxxx:~#
It's interesting... It works fine in my RHEL7 box.
I don't have any Ubuntu environment (with physical drive) at this time (I always checks functionality on Ubuntu only with the filebackend). But I will check on Ubuntu 16.04 (Xenial) on my spare time.
[piste@localhost ~]$ ~/ltfs05-oss-master/bin/ltfs -o device_list
1819 LTFS14000I LTFS starting, LTFS version 2.4.2.0 (Prelim), log level 2.
1819 LTFS14058I LTFS Format Specification version 2.4.0.
1819 LTFS14104I Launched by "/home/piste/ltfs05-oss-master/bin/ltfs -o device_list".
1819 LTFS14105I This binary is built for Linux (x86_64).
1819 LTFS14106I GCC version is 4.8.5 20150623 (Red Hat 4.8.5-36).
1819 LTFS17087I Kernel version: Linux version 3.10.0-514.10.2.el7.x86_64 (mockbuild@x86-039.build.eng.bos.redhat.com) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Mon Feb 20 02:37:52 EST 2017 i386.
1819 LTFS17089I Distribution: NAME="Red Hat Enterprise Linux Server".
1819 LTFS17089I Distribution: Red Hat Enterprise Linux Server release 7.6 (Maipo).
1819 LTFS17089I Distribution: Red Hat Enterprise Linux Server release 7.6 (Maipo).
1819 LTFS17085I Plugin: Loading "sg" tape backend.
Tape Device list:.
Device Name = /dev/sg32, Vendor ID = IBM , Product ID = ULT3580-TD5 , Serial Number = 1068000016, Product Name =[ULT3580-TD5].
Device Name = /dev/sg30, Vendor ID = IBM , Product ID = ULT3580-TD5 , Serial Number = 1068000070, Product Name =[ULT3580-TD5].
Device Name = /dev/sg46, Vendor ID = IBM , Product ID = ULT3580-TD7 , Serial Number = 1013000730, Product Name =[ULT3580-TD7].
Device Name = /dev/sg44, Vendor ID = IBM , Product ID = ULT3580-TD7 , Serial Number = 00078D0215, Product Name =[ULT3580-TD7].
Device Name = /dev/sg18, Vendor ID = IBM , Product ID = ULT3580-TD5 , Serial Number = 00078A1D8F, Product Name =[ULT3580-TD5].
Device Name = /dev/sg36, Vendor ID = IBM , Product ID = 0359260F , Serial Number = 0000078PG1ED, Product Name =[0359260F].
Device Name = /dev/sg20, Vendor ID = IBM , Product ID = 0359255F , Serial Number = 0000013DFF44, Product Name =[0359255F].
Device Name = /dev/sg42, Vendor ID = IBM , Product ID = ULT3580-TD6 , Serial Number = 00078B00F3, Product Name =[ULT3580-TD6]
@whinpo, could you post the output of strace -e trace=file ltfs -o device_list
so we can rule out some reasons for the issue?
I've just noticed it's working under root but not under a normal user login I attach both strace
This can be fixed by changing the ownership of /dev/sg2:
openat(AT_FDCWD, "/dev/sg2", O_RDONLY|O_NONBLOCK) = -1 EACCES (Permission denied)
You may want to add your whssi user to the group who owns /dev/sg2, and make that file writable by that group.
Description
After formating the Tape, mounting is not possible, i always get the following error , 6a0 LTFS11332I Load successful. 6a0 LTFS17157I Changing the drive setting to write-anywhere mode. 6a0 LTFS11005I Mounting the volume. 6a0 LTFS30252I Logical block protection is disabled. 6a0 LTFS30200I Failed to execute SG_IO ioctl, opcode = 08 (22). 6a0 LTFS30263I READ returns ioctl error (-21700) /dev/st0. 6a0 LTFS12049E Cannot read: backend call failed (-21700). 6a0 LTFS17041E XML parser: read failed while looking for a file mark (-21700). 6a0 LTFS17037E XML parser: failed to read from XML stream. 6a0 LTFS17016E Cannot parse index direct from medium. 6a0 LTFS11194W Cannot read index: failed to read and parse XML data (-1014). 6a0 LTFS11024E Cannot mount volume: read index failed on the index partition. 6a0 LTFS14013E Cannot mount the volume. 6a0 LTFS30252I Logical block protection is disabled.
upd: To ensure that the Hardware isn't broken i checked it under Windows 2012 Server R2, everything works very well.
Environment
How to recreate
-