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


Message #8 received at 17149 <at> debbugs.gnu.org (full text, mbox):

From: Pádraig Brady <P <at> draigBrady.com>
To: Rupert Russell <Rupert.Russell <at> ilmor.co.uk>
Cc: 17149 <at> debbugs.gnu.org
Subject: Re: bug#17149: shred - tape data
Date: Mon, 31 Mar 2014 18:32:32 +0100
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 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.