Operating System - HP-UX
1826319 Members
3572 Online
109692 Solutions
New Discussion

destroying data on disks while decomissioning a server

 
SOLVED
Go to solution
Jay Cantwell
Regular Advisor

destroying data on disks while decomissioning a server

I need to destroy data on my data disks on a system we are shutting down. I am using the procedures listed in KBRC00005001. I have one question, does the mount point need to be unmounted and does the vg need to be deactiviated before the mediainit ?

thanks...Jay
8 REPLIES 8
Pete Randall
Outstanding Contributor
Solution

Re: destroying data on disks while decomissioning a server

Since mediainit uses the path name of the raw device, I don't think it would be necessary to unmount/deactivate, but, by the same token, I think it would be neater and cleaner if you did.


Pete

Pete
Raj D.
Honored Contributor

Re: destroying data on disks while decomissioning a server

Hi Jay ,

Here is something that can help to destroy data for decommission purpose:

1.
# dd if=/dev/zero of=/dev/rdsk/c?t?d? bs=1024

Also you can use :
2.
# pvcreate -f /dev/rdsk/c#t#d#

3.
And Mediainit can be use directly.


Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Raj D.
Honored Contributor

Re: destroying data on disks while decomissioning a server

Hi Jay ,

Also find this doc ,attached is a description of how to use Ignite-UX to scrub disks :


Hope this will also help..
Cheers,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
Sยภเl Kย๓คг
Respected Contributor

Re: destroying data on disks while decomissioning a server

Hi,
You can very well use the pvcreate with -f option to distroy the data, and is very simple and less time consuming way.

make simple script like one whihc is bellow to perform the activity.

#Script for distroying data
for i in `vgdisplay|grep "VG Name"|awk '{print $3}'|grep -v vg00`
do
for j in `vgdisplay -v /dev/vg_sbt_fone_appl|grep -v "Alternate Link"|grep "PV Name""|awk '{print $3}'
do
pvcreate -f $j
done
done

Regards,
Sunil

Your imagination is the preview of your life's coming attractions
Sยภเl Kย๓คг
Respected Contributor

Re: destroying data on disks while decomissioning a server

Sorry a small corruction in the script

#Script for distroying data
for i in `vgdisplay|grep "VG Name"|awk '{print $3}'|grep -v vg00`
do
for j in `vgdisplay -v $i|grep -v "Alternate Link"|grep "PV Name""|awk '{print $3}'
do
pvcreate -f $j
done
done

Regards,
Sunil
Your imagination is the preview of your life's coming attractions
A. Clay Stephenson
Acclaimed Contributor

Re: destroying data on disks while decomissioning a server

Pvcreate is an extremely poor choice for this task. It will only affect the VGRA -- a very small fraction of the usable disk space. You can convince yourself of this by writing a large file containing lists of data something like "This is a test nnnnn". Next run pvcreate on the disk and then read every block of the raw disk searching for "This is a test". You will get much of the original file back quite intact.

If you are going to do this then do something that will write to every disk block.

This would be one approach:
dd if=/dev/urandom bs=64k of=/dev/rdsk/cXtYdZ

You could also use /dev/zero as an input device and multiple passes would be better still.
If it ain't broke, I can fix that.
Raj D.
Honored Contributor

Re: destroying data on disks while decomissioning a server

Hi Jay ,

I am with Clay , dd is most powerful and will do the trick , with /dev/zero , to wipe out the disk, .

hth,
Raj.
" If u think u can , If u think u cannot , - You are always Right . "
rick jones
Honored Contributor

Re: destroying data on disks while decomissioning a server

Indeed, one wants to have multiple passes with different patterns.

However, I have heard that will not affect "spared" sectors.

The only _real_ way to _destroy_ all the data on a disc is to melt it into slag. Next to that, you could open the thing up and take a grinder to the platters and grind-away _all_ the oxide I suppose.
there is no rest for the wicked yet the virtuous have no pillows