bug-tar
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [Bug-tar] tar: unable to read LTO4 tapes on a LTO5 drive using tar


From: peter.chiu
Subject: Re: [Bug-tar] tar: unable to read LTO4 tapes on a LTO5 drive using tar
Date: Fri, 15 Jun 2012 16:24:31 +0000

Thanks very much for your reply, Mark,

I tried your suggestion, but it complains Cannot allocate memory:



frost:~ # mt -f /dev/nst0 status
drive type = Generic SCSI-2 tape
drive status = 1174405632
sense key error = 0
residue count = 0
file number = 0
block number = 0
Tape block size 512 bytes. Density code 0x46 (unknown).
Soft error count since last status=0
General status bits on (45010000):
 BOT WR_PROT ONLINE IM_REP_EN

frost:/tmp/lto # mt -f /dev/nst0 setblk 0
frost:/tmp/lto # dd if=/dev/nst0 of=data.bin bs=262144
dd: reading `/dev/nst0': Cannot allocate memory
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.0175861 s, 0.0 kB/s
frost:/tmp/lto # ls -ls data.bin
0 -rw-r--r-- 1 root root 0 Jun 15 17:19 data.bin

frost:/tmp/lto # ulimit
unlimited
frost:/tmp/lto # dd if=/dev/nst0 of=data.bin bs=262144
dd: reading `/dev/nst0': Cannot allocate memory
0+0 records in
0+0 records out
0 bytes (0 B) copied, 0.00236114 s, 0.0 kB/s

frost:/tmp/lto # free -g
             total       used       free     shared    buffers     cached
Mem:            15          1         14          0          0          0
-/+ buffers/cache:          0         15
Swap:           10          0         10

the system has got 15GB of memory, so not sure why.

Peter

________________________________________
From: Mark address@hidden
Sent: 15 June 2012 17:06
To: Chiu, Peter (STFC,RAL,RALSP)
Cc: address@hidden; Chiu, Peter (STFC,RAL,RALSP)
Subject: Re: [Bug-tar] tar: unable to read LTO4 tapes on a LTO5 drive using tar

On Thu, June 14, 2012 09:01, address@hidden wrote:
> A colleague has got some LTO4 tapes, which are believed to be written
> using a tar command with a switch of -b 1024.
>
> However, we tried tar -b 1024 -tvf /dev/nst0
>
> we are getting io errors.
>
> We put in a blank LTO4 tape, and with that, a simple tar -cvf /dev/nst0
> followed by tar -xvf /dev/nst0 works.
>
> So we cannot make out why we cannot read the LTO4 tapes.

Are you sure the tape was written with 1024-byte blocks?

First make sure you're not in fixed-block mode by doing
  mt -f /dev/nst0 setblk 0

Then try reading with dd. As mentioned you could pipe dd's output into
tar, or just dump the file to disk first. Try
  dd if=/dev/nst0 of=data.bin bs=262144
and see what happens. (The large block size dd argument is hopefully
larger than whatever block size the tape was actually written with.)


-- Mark


--
Scanned by iCritical.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]