GNU bug report logs - #17149
shred - tape data

Previous Next

Package: coreutils;

Reported by: Rupert Russell <Rupert.Russell <at> ilmor.co.uk>

Date: Mon, 31 Mar 2014 15:45:04 UTC

Severity: normal

Done: Paul Eggert <eggert <at> cs.ucla.edu>

Bug is archived. No further changes may be made.

Full log


View this message in rfc822 format

From: Rupert Russell <Rupert.Russell <at> ilmor.co.uk>
To: 'Pádraig Brady' <P <at> draigBrady.com>
Cc: "17149 <at> debbugs.gnu.org" <17149 <at> debbugs.gnu.org>
Subject: bug#17149: shred - tape data
Date: Tue, 1 Apr 2014 12:18:22 +0000
Pádraig,

This seems to be getting my task done.

for i in $(seq 1 $NUMTAPES) ; do
		mtx -f $LOADER load $i
	for j in $(seq 1 $NUMWIPES); do 
			shred -v -n 1 $TAPE
 			mt -f $TAPE rewind
	done         
           		shred -v -z -n 0 $TAPE
		mt -f $TAPE rewind
		mtx -f $LOADER unload $i
done

By the way, is there a difference between what these two write to the media?
mt -f $TAPE erase   and
shred -z -n 0 $TAPE

Regards

Rupert Russell
OPERATIONS MANAGER



Ilmor Engineering Ltd
Quarry Road, Brixworth, Northamptonshire, NN6 9UB, UK

Direct:     +44 (0)1604 799105
Main:       +44 (0)1604 799100
Web:       www.ilmor.co.uk


-----Original Message-----
From: Pádraig Brady [mailto:P <at> draigBrady.com] 
Sent: 31 March 2014 18:33
To: Rupert Russell
Cc: 17149 <at> debbugs.gnu.org
Subject: Re: bug#17149: shred - tape data

On 03/31/2014 12:00 PM, Rupert Russell wrote:
> Hi,
> 
> shred -v /dev/st0    # where /dev/st0 is the drive in a multi tape carousel.
> 
> This starts well with.
> Pass 1/4 (random) 15MiB
> Pass 1/4 (random) 41MiB
> Pass 1/4 (random) 70MiB
> Pass 1/4 (random).....etc
> 
> But when the end of a 200GiB tape is reached in pass 1, 'shred' doesn't appear to trigger a rewind or maybe wait for the tape to be rewound before attempting to overwrite the data.
> 
> 
> The final messages before and around the error are:-
> 
> Pass 1/4 (random) 190GiB/190GiB  100%
> 
> Pass 2/4 (random)
> 
> Error writing at offset 1288. No space left on device.
> 
> (The next line in my script then runs and unloads the tape.)
> 
> Is this not rewinding the tape a bug or my mis-use of the 'shred' command?

shred(1) doesn't rewind the tape.

It could issue an MTREW ioctl or something, though I suspect there are all sorts of ioctls to consider depending on plaftorm.

I also see the `mt erase` command/ioctl which might suffice?

If not then explicitly handling the tape like this might suffice?

for i in $(seq 3); do
  mt -f /dev/st0 rewind
  shred -n1 /dev/st0
done

thanks,
Pádraig.

______________________________________________________________________
This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com ______________________________________________________________________

______________________________________________________________________

This e-mail may contain confidential and /or privileged information. If you 
are not the intended recipient (or have received this e-mail in error)please 
notify the sender immediately and destroy this e-mail. Any unauthorized copying, 
disclosure or distribution of the material in this email is strictly forbidden.

This email has been scanned by the Symantec Email Security.cloud service.
For more information please visit http://www.symanteccloud.com




This bug report was last modified 11 years and 44 days ago.

Previous Next


GNU bug tracking system
Copyright (C) 1999 Darren O. Benham, 1997,2003 nCipher Corporation Ltd, 1994-97 Ian Jackson.