Hi,
Can you please clarify how the -f option in the cta-readtp command need to be specified so we can write the tape files to copies on the local host (e.g. in /tmp/ ir anywhere else)?
Assuminng we can write these files to another tape (using dd), is an UPDATE of all these files in the CTA Catalogue with the new VID going to get these files “moved” to this new tape?
We have a tape which has its label missing (for some reason or anotehr…) and cannot therefore be mounted on a drive. We contacted Spectra and they said they dont have a process for tape recovery in this case.
Thanks,
George
gtf87
7 July 2025 07:37
2
The file you specify with the -f contains the path of where you want the data to go
Tim
Hi,
We tried cta-readtp with -f option too, but cta-readtp still write data to /dev/null or complains it cannot open specific file:
$ cta-readtp B03426 4046 -u LHAASO1-LTO7-F03C3R4 -f file:///tmp/a
Sep 25 08:51:01.953146409 laso-tape04.ihep.ac.cn cta-readtp: LVL="INFO" PID="387894" TID="387894" MSG="Started" userName="root" tapeVid="B03426"
Aborting: Unable to open file file:///tmp/a
$ cta-readtp B03426 4046 -u LHAASO1-LTO7-F03C3R4 -f /tmp/a
Sep 25 08:52:04.581762195 laso-tape04.ihep.ac.cn cta-readtp: LVL="INFO" PID="387898" TID="387898" MSG="Started" userName="root" tapeVid="B03426"
Sep 25 08:52:04.623929914 laso-tape04.ihep.ac.cn cta-readtp: LVL="INFO" PID="387898" TID="387898" MSG="Configuration entry" category="taped" key="DaemonUserName" value="cta" source="/etc/cta/cta-taped-LHAASO1-LTO7-F03C3R4.conf:27"
......
Sep 25 08:52:12.439612359 laso-tape04.ihep.ac.cn cta-readtp: LVL="INFO" PID="387898" TID="387898" MSG="Mounted tape" userName="root" tapeVid="B03426" tapeDrive="LHAASO1-LTO7-F03C3R4" logicalLibrary="LASOLIB" librarySlot="smc15" useLbp="true" driveSupportLbp="true"
Sep 25 08:52:12.439686042 laso-tape04.ihep.ac.cn cta-readtp: LVL="INFO" PID="387898" TID="387898" MSG="Loading tape" userName="root" tapeVid="B03426" tapeDrive="LHAASO1-LTO7-F03C3R4" logicalLibrary="LASOLIB" useLbp="true" driveSupportLbp="true"
Sep 25 08:52:23.235331483 laso-tape04.ihep.ac.cn cta-readtp: LVL="INFO" PID="387898" TID="387898" MSG="Loaded tape" userName="root" tapeVid="B03426" tapeDrive="LHAASO1-LTO7-F03C3R4" logicalLibrary="LASOLIB" useLbp="true" driveSupportLbp="true"
Sep 25 08:52:42.920940334 laso-tape04.ihep.ac.cn cta-readtp: LVL="INFO" PID="387898" TID="387898" MSG="Reading file from tape" userName="root" tapeVid="B03426" fSeq="4046" tapeDrive="LHAASO1-LTO7-F03C3R4" logicalLibrary="LASOLIB" useLbp="true" driveSupportLbp="true" destinationURL="file:///dev/null"
Sep 25 08:53:34.052304186 laso-tape04.ihep.ac.cn cta-readtp: LVL="INFO" PID="387898" TID="387898" MSG="Read file from tape successfully" userName="root" tapeVid="B03426" fSeq="4046" tapeDrive="LHAASO1-LTO7-F03C3R4" logicalLibrary="LASOLIB" useLbp="true" driveSupportLbp="true" destinationURL="file:///dev/null" checksumType="ADLER32" checksumValue="0x6475865f" readFileSize="1001409387"
......
We also tried with root://xxx , but still failed to open the file.
So what is the format of -f/–destination_files instead of file:///dev/null.
BTW cta-readtp version is 5.11.10.1-1.
Thanks
Yujiang
vlado
25 September 2025 07:40
4
你好 Yujiang,
Thanks for asking for clarifcations. In the help of cta-readtp regarding the -f option you can see this text:
-f, --destination_files <FILE URL> URL to file containing a list of destination files.
If not set, all data read is written to file:///dev/null
If there are less destination files than read files, the remaining
files read will be written to file:///dev/null.
In other words the argument to the -f option is a file that should contain list of output files.
Here is an example:
I want to read files 10 to 15 from the tape I05702 and store them on disk of the tape server. That is 6 files in total.
I created a destination directory /tmp/I05702 (please note that I set the permissions to 777 because files will be written there using another account cta):
[vlado@tpsrv036 /]$ ls -lad /tmp/I05702
drwxrwxrwx. 2 vlado c3 4096 Sep 25 09:25 /tmp/I05702
I created file /tmp/a which should contain the list of destination filenames. I deliberately made a mistake that I only mention 3 files, not all 6:
[vlado@tpsrv036 /]$ cat /tmp/a
/tmp/I05702/file1
/tmp/I05702/file2
/tmp/I05702/file3
Then I launch cta-readtp like this:
[vlado@tpsrv036 tmp]$ cta-readtp I05702 10-15 -f /tmp/a
Sep 25 09:23:55.309485637 tpsrv036.cern.ch cta-readtp: LVL="INFO" PID="1259809" TID="1259809" MSG="Started" userName="vlado" tapeVid="I05702"
:
Sep 25 09:25:32.581842377 tpsrv036.cern.ch cta-readtp: LVL="INFO" PID="1259809" TID="1259809" MSG="Read file from tape successfully" userName="vlado" tapeVid="I05702" fSeq="10" tapeDrive="IBMLIB3-TS1170-F05C4R2" logicalLibrary="IBMLIB3-TS1170" useLbp="true" driveSupportLbp="true" destinationURL="file:///tmp/I05702/file1" checksumType="ADLER32" checksumValue="0xc1484f02" readFileSize="3997554245"
Sep 25 09:25:50.906933939 tpsrv036.cern.ch cta-readtp: LVL="INFO" PID="1259809" TID="1259809" MSG="Read file from tape successfully" userName="vlado" tapeVid="I05702" fSeq="11" tapeDrive="IBMLIB3-TS1170-F05C4R2" logicalLibrary="IBMLIB3-TS1170" useLbp="true" driveSupportLbp="true" destinationURL="file:///tmp/I05702/file2" checksumType="ADLER32" checksumValue="0xf5528c16" readFileSize="3979678472"
Sep 25 09:26:12.020061872 tpsrv036.cern.ch cta-readtp: LVL="INFO" PID="1259809" TID="1259809" MSG="Read file from tape successfully" userName="vlado" tapeVid="I05702" fSeq="12" tapeDrive="IBMLIB3-TS1170-F05C4R2" logicalLibrary="IBMLIB3-TS1170" useLbp="true" driveSupportLbp="true" destinationURL="file:///tmp/I05702/file3" checksumType="ADLER32" checksumValue="0x4fe17107" readFileSize="3885926067"
Sep 25 09:26:33.349451619 tpsrv036.cern.ch cta-readtp: LVL="INFO" PID="1259809" TID="1259809" MSG="Read file from tape successfully" userName="vlado" tapeVid="I05702" fSeq="13" tapeDrive="IBMLIB3-TS1170-F05C4R2" logicalLibrary="IBMLIB3-TS1170" useLbp="true" driveSupportLbp="true" destinationURL="file:///dev/null" checksumType="ADLER32" checksumValue="0x1e15f8eb" readFileSize="6717061173"
Sep 25 09:26:42.930081796 tpsrv036.cern.ch cta-readtp: LVL="INFO" PID="1259809" TID="1259809" MSG="Read file from tape successfully" userName="vlado" tapeVid="I05702" fSeq="14" tapeDrive="IBMLIB3-TS1170-F05C4R2" logicalLibrary="IBMLIB3-TS1170" useLbp="true" driveSupportLbp="true" destinationURL="file:///dev/null" checksumType="ADLER32" checksumValue="0x16ef6a0f" readFileSize="3942527484"
Sep 25 09:26:59.536612415 tpsrv036.cern.ch cta-readtp: LVL="INFO" PID="1259809" TID="1259809" MSG="Read file from tape successfully" userName="vlado" tapeVid="I05702" fSeq="15" tapeDrive="IBMLIB3-TS1170-F05C4R2" logicalLibrary="IBMLIB3-TS1170" useLbp="true" driveSupportLbp="true" destinationURL="file:///dev/null" checksumType="ADLER32" checksumValue="0x97b0f867" readFileSize="6749477858"
:
Sep 25 09:26:59.539648526 tpsrv036.cern.ch cta-readtp: LVL="INFO" PID="1259809" TID="1259809" MSG="Finished reading tape" userName="vlado" tapeVid="I05702" tapeDrive="IBMLIB3-TS1170-F05C4R2" logicalLibrary="IBMLIB3-TS1170" useLbp="true" driveSupportLbp="true" nbReads="6" nbSuccessfullReads="6" nbFailedReads="0"
:
As you can see the first 3 files (fSeq: 10, 11 and 12) were written to their destinations as specified in the /tmp/a file, but the other 3 files (fSeq: 13, 14 and 15) were sent to /dev/null because the command didn’t know where to store / send them.
Content of the /tmp/I05702 directory now looks like this:
[vlado@tpsrv036 tmp]$ ls -la /tmp/I05702
total 11585152
drwxrwxrwx. 2 vlado c3 4096 Sep 25 09:25 .
drwxrwxrwt. 13 root root 12288 Sep 25 09:30 ..
-rw-r--r--. 1 cta c3 3997554245 Sep 25 09:25 file1
-rw-r--r--. 1 cta c3 3979678472 Sep 25 09:25 file2
-rw-r--r--. 1 cta c3 3885926067 Sep 25 09:26 file3
I hope this clarifies the use of the -f option of the cta-taped command.
Let me know if you need more.
Vladimir Bahyl
CERN
Hi Vladimir,
Thanks for the help. As you pointed out, we’ve just misunderstood the option… . Now cta-readtp can read files from tape as expected