Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations gkittelson on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Strange problem with TCTL erase - i/o error 1

Status
Not open for further replies.

KolesGit

IS-IT--Management
Oct 9, 2008
4
PL
Hello!

I try to erase tape on AIX 5 system with tctl. I get the following message:

[tt]# tctl -f /dev/rmt0 erase
/dev/rmt0 erase 1 failed: There is an input or output error.[/tt]

Device is available, tape is inserted, tctl rewind works without error, tctl status shows the following info:


[tt]# tctl status
rmt0 Available 05-08-01-1,0 LVD SCSI Tape Drive
attribute value description user_settable

block_size 1024 BLOCK size (0=variable length) True
compress yes Use data COMPRESSION True
density_set_1 129 DENSITY setting #1 True
density_set_2 128 DENSITY setting #2 True
extfm yes Use EXTENDED file marks True
mode yes Use DEVICE BUFFERS during writes True
ret no RETENSION on tape change or reset True
ret_error no RETURN error on tape change or reset True
size_in_mb 80000 Size in Megabytes False
#
[/tt]

What can I do to be able to successfully erase the tape?

Thankx for any suggestions.
 
IMHO there is nothing on the tape to erase!

Regards,
Khalid
 
Khalidaaa, unfortunately - there is.

There is confidential company data on the tape it is going to be sent to the other company. We can't let the data on tape to be compromised, so we have to erase it before sending, in case of courier or post office failure.

The backup on the tape wasn't made on AIX, but on Windows Server, may be that's the problem.

 
Have you used TCTL ERASE successfully on that type of tapedrive before?

Perhaps this tapedrive's device driver doesn't handle erase command?

Why not write zeroes to the tape?

[tt]tctl -f /dev/rmt0.1 rewind
dd if=/dev/zero of=/dev/rmt0 bs=1024[/tt]

and let it run until the tape runs out?


HTH,

p5wizard
 
Dear p5wizard,

Thank you, it seems that you're right - the driver of my VXA-2 device does not recognise ERASE command while all other write operations are successfully completed.

Writing zeros to the tape to erase it is a good idea.

Have a nice day,
KG
 
You can also write random data to the tape, which is even safer to use as an "erasing data from magnetic media" action:

[tt]tctl -f /dev/rmt0.1 rewind
dd if=/dev/random of=/dev/rmt0 bs=1024[/tt]


HTH,

p5wizard
 
Hello again, I've tested your random and zeros writing to the tape and it is writing to tape very slowly... I waited 24 hours for the tape to go to the end and I interrupted this process.

So - the question is - is it a way to speed this process up? Another way to quickly write to the tape random or useless data?

Thanks,
KG
 
If the problem is slow writing to the tapedrive, try a bigger blocksize (multiple of tape blocksize)

[tt]tctl -f /dev/rmt0.1 rewind
dd if=/dev/random of=/dev/rmt0 bs=102400[/tt]

If the problem is /dev/random not generating random data fast enough (which I've seen before), create a smallish temp random data file and duplicate that file in an endless loop to create an input stream to a dd process:

[tt]tctl -f /dev/rmt0.1 rewind
dd if=/dev/random of=/tmp/rand$$ bs=1024 count=20
while true
do
cat /tmp/rand$$
done|dd of=/dev/rmt0 ibs=20480 obs=102400
rm /tmp/rand$$[/tt]


HTH,

p5wizard
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top