-
Raw access to the LTFS data partition
I need to access the data partition of an LTFS tape gone bad (unable to mount) for recovery purposes. I tried to read from a normal functional LTFS tape for testing purposes and while I can read the label and index from the index partition I’m not able to reach the data partition.
# dd if=/dev/nst0 of=file0 bs=524288
VOL1 L LTFS 4# dd if=/dev/nst0 of=file1 bs=524288
(replaced all <> with [] because creativecow messes up the code)
[?xml version="1.0" encoding="UTF-8"?]
[ltfslabel version="2.2.0"]
[creator]QUANTUM LTFS 2.2.0 - Linux - mkltfs[/creator]
[formattime]2016-01-14T16:07:33.262279375Z[/formattime]
[volumeuuid]602a42d2-3024-4313-8796-1a044cef11d2[/volumeuuid]
[location]
[partition]a[/partition]
[/location]
[partitions]
[index]a[/index]
[data]b[/data]
[/partitions]
[blocksize]524288[/blocksize]
[compression]true[/compression]
[/ltfslabel]# dd if=/dev/nst0 of=file2 bs=524288
(empty)# dd if=/dev/nst0 of=file3 bs=524288
[?xml version="1.0" encoding="UTF-8"?]
[ltfsindex version="2.2.0"]
[creator]QUANTUM LTFS 2.2.0 - Linux - ltfs - Unmount[/creator]
[volumeuuid]602a42d2-3024-4313-8796-1a044cef11d2[/volumeuuid]
....etc.
(thats the tape index)# dd if=/dev/nst0 of=file4 bs=524288
(empty)# dd if=/dev/nst0 of=file5 bs=524288
dd: reading `/dev/nst0': Input/output error# mt -f /dev/nst0 status
SCSI 2 tape drive:
File number=4, block number=-1, partition=0.
Tape block size 0 bytes. Density code 0x5a (no translation).
Soft error count since last status=0
General status bits on (d010000):
EOD WR_PROT ONLINE IM_REP_EN
From that point on I can’t read anything. The status shows EOD so my guess is that I must somehow position the tape beyond that but I don’t know how.
Ideally I want to dump the entire data partition to a file and then later use photorec to recover all files from it. I already have a list of the files in the order they were written and photorec supports all file types on this tape so it seems like it could be possible.
Any help from the ltfs/dd/mt gurus will be greatly appreciated.
Thanks!