1825328 Members
3893 Online
109679 Solutions
New Discussion юеВ

anybody use bcwipe?

 
Houston Kemper
Occasional Advisor

anybody use bcwipe?

Hello,

I've got an HPUX 11.0 and I'm trying to use bcwipe to clean a filesystem. The problem is that the process, at least to me, completes way too fast. To perform a thorough cleaning of a filesystem I would expect the process to take at least somewhere in the neighborhood of thirty minutes for a 30GB filesystem - even if there's less than 2GB of actual use.

Am I wrong?

Thanks
6 REPLIES 6
Steven E. Protter
Exalted Contributor

Re: anybody use bcwipe?

Well, I use newfs to clean up filesystems.

Because of the nature of the tool and LVM I guess, newfs is very fast.

I do newfs -F vxfs -o largefiles /dev/vg01/rlvol1

On a 120 GB filesystem and it is irrecoverably wiped in much less than a minute, depending on disk speed and configuration.

After running that command there is no way I know of to recover the data.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Houston Kemper
Occasional Advisor

Re: anybody use bcwipe?

Thanks Steven. I'll certainly keep that in the bag of tricks but the powers that be insist on me using bcwipe.

Thanks again.
Steven E. Protter
Exalted Contributor

Re: anybody use bcwipe?

Thanks for the points.

The lesson to be learned from my post is its not unreasonable for bcwipe to be able to init 100 GB of filesystem in a short time. If newfs can do it, so can bcwipe, which may be using newfs under the hood.

In other words, nothing to worry about based on timing.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
A. Clay Stephenson
Acclaimed Contributor

Re: anybody use bcwipe?

Your initial assessment is correct. Running newfs, for example, rewrites only a small portion of the disk or logical volume. It would be possible to recover quite a bit of data from a disk were only newfs run on it. You can actually verify this yourself by writing some very large textfiles to a filesystem. Next umount it and run newfs. Now use dd to read the raw device and extract data and pipe it to od and you will find tons of your original data to be readable.

A better answer though still not quite rigorous would be something like this:

dd if=/dev/zero bs=64k of=/dev/vg01/rlvol3

11.11 boxes can also use the /dev/urandom device to write random data but 11.0 only has NUL's. You could do something like this:

dd if=/dev/zero bs=64k | tr "[\000]" "[\377]" > /dev/vg01/rlvol3

This would write '1's to every location so it would do a good job if combined with the above example which writes all zero's.
If it ain't broke, I can fix that.
Steven E. Protter
Exalted Contributor

Re: anybody use bcwipe?

I stand corrected. Learned something new today. I like to use OS install to wipe a system and dd to wipe a disk once the logical volumes are off.

Thanks A. Clay.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com
Patrick Wallek
Honored Contributor

Re: anybody use bcwipe?

Steven,

An OS install won't wipe disks either. It'll just overwrite the VGRA and LVRA if there are no files on it. That's ALL. If you were to do a dd on a disk (as Clay mentioned above) I bet you'd find the same thing.