Closed robertovco3 closed 2 years ago
LTFS doesn't have any good returns against LOGSENSE
commands.
First of all, the lin_tape backend is obsoleting and we don't want to have any effort to maintain. I strongly recommend using the sg
backend. (It looks you modified the [indtall_dir]/etc/ltfs.conf.local. Use the default configurarion.)
Next, I don't know how you configure the device. What is /dev/tape/library/dte0
? Do you configure the udev setting and is it an alias of /dev/IBMtapeX
?
Basically, you need to specify the device name that is listed by ltfs -o device_list
. It shall be /dev/sgX
in the sg
backend.
https://github.com/LinearTapeFileSystem/ltfs#how-to-use-the-ltfs-quick-start
Hello Piste,
That is good to know with regards to lin_tape backend. We have not tested our IBM drives using the sg backend and all of our scripting for automated workflows use lin_tape, so we will advise to migrate toward sg.
Yes, /dev/tape/library/dte0 = /dev/IBMtapeX. We use udev settings to mapping the serial for drive1, so that dt0 is always drive 1. We need to figure out how to do the equivalent for sg.
I will attempt the workflow using backend sg.
I recommend specifying drive serial under the sg
backend. The sg
backend can have a drive serial or a device name like /dev/sgX
.
https://github.com/LinearTapeFileSystem/ltfs#step2-format-a-tape
Or put the file like below as /etc/udev/rules.d/60-persistent-storage-tape.rules
and create a persistent name.
# persistent storage links: /dev/tape/{by-id,by-path}
ACTION!="add|change", GOTO="persistent_storage_tape_end"
# type 8 devices are "Medium Changers"
SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="8", IMPORT{program}="path_id $tmpnode", IMPORT{program}="scsi_id --sg-version=3 --export --whitelisted -d $tempnode", SYMLINK+="tape/by-id/scsi-$env{ID_PATH}-$env{ID_SCSI_SERIAL}"
# type 1 devices are "Tape"
SUBSYSTEM=="scsi_generic", SUBSYSTEMS=="scsi", ATTRS{type}=="1", IMPORT{program}="path_id $tmpnode", IMPORT{program}="scsi_id --sg-version=3 --export --whitelisted -d $tempnode", SYMLINK+="tape/by-id/scsi-$env{ID_PATH}-$env{ID_SCSI_SERIAL}"
SUBSYSTEM!="scsi_tape", GOTO="persistent_storage_tape_end"
KERNEL=="st*[0-9]|nst*[0-9]", ATTRS{ieee1394_id}=="?*", ENV{ID_SERIAL}="$attr{ieee1394_id}", ENV{ID_BUS}="ieee1394"
KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="usb", IMPORT{program}="usb_id --export %p"
KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", SUBSYSTEMS=="scsi", KERNELS=="[0-9]*:*[0-9]", ENV{BSG_DEV}="$root/bsg/$id"
KERNEL=="st*[0-9]|nst*[0-9]", ENV{ID_SERIAL}!="?*", WAIT_FOR="$env{BSG_DEV}", IMPORT="scsi_id --whitelisted --export --device=$env{BSG_DEV}", ENV{ID_BUS}="scsi"
KERNEL=="st*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-st"
KERNEL=="nst*[0-9]", ENV{ID_SERIAL}=="?*", SYMLINK+="tape/by-id/$env{ID_BUS}-$env{ID_SERIAL}-nst"
# by-path (parent device path)
KERNEL=="st*[0-9]|nst*[0-9]", IMPORT{program}="path_id %p"
KERNEL=="st*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}-st"
KERNEL=="nst*[0-9]", ENV{ID_PATH}=="?*", SYMLINK+="tape/by-path/$env{ID_PATH}-nst"
LABEL="persistent_storage_tape_end"
Piste, thank you very much. We were successful with using the sg backend, the mkltfs and ltfs commands required sudo to run successfully.
I will test out the udev pathing so that we can move away from lin_tape to sg, which has historically been the backend for our workflow.
Describe the bug We are unable to successfully mount and write to an LTO-7 Tape with IBM Ultrium drive after it has been formatted using mkltfs.
Drive Info: ULTRIUM-HH7 Firmware version(s) tested: K4K1, P381
LTFS Info: LTFS version 2.4.4.1 (Prelim). LTFS Format Specification version 2.4.0.
HBA Info: IBM Drives connected using fiber channel Emulex LightPulse LPE16004
To Reproduce Steps to reproduce the behavior:
Output of mkltfs
Output when mounting LTO-7 Tape:
Expected behavior At this point we expect to be able to write to the tape, but we get a read-only volume.