Operating System - HP-UX
1833565 Members
2951 Online
110061 Solutions
New Discussion

Formating disk and deleting everything , for decomission.??

 
SOLVED
Go to solution
rveri
Super Advisor

Formating disk and deleting everything , for decomission.??

Hi all ,

I wanted to format the drive(Contains OS) and delete the filesytems (vg00) everything that contatins in the system, as the server is de-comissioning.

Can any one tell , how to do that.

1. Any thing from LVM maintenance mode can be done.
2. Mediainit. pvcreate .. ? how ?

Please suggest.

Thanks in advacne ,

Regards,
Veri.
14 REPLIES 14
Pete Randall
Outstanding Contributor

Re: Formating disk and deleting everything , for decomission.??

I would not suggest mediainit. Chances are that the disk will end up being unusable. Here is a thread with a rather thorough and interesting discussion on the subject:

http://forums.itrc.hp.com/cm/QuestionAnswer/1,,0x24b53a7b3682d611abdb0090277a778c,00.html


Pete

Pete
Pete Randall
Outstanding Contributor

Re: Formating disk and deleting everything , for decomission.??

Oh, now I see! Since it's vg00, you could just run "rm -rf /*". That should do a pretty good job of trashing it. If you have any data LVs in vg00 (which you really shouldn't). I would suggest running lvremove against them first.


Pete

Pete
Geoff Wild
Honored Contributor

Re: Formating disk and deleting everything , for decomission.??

Well - simple way - re-install HP-UX...

rm -rf * from root is generally sufficient...

Boot a HP-UX install cd - then dd /dev/null over your root disk...

Many others...

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
A. Clay Stephenson
Acclaimed Contributor

Re: Formating disk and deleting everything , for decomission.??

pvcreate will only write over a small portion of the data. I would do this instead:
(I'll assume that you have blasted everything but vg00 at this point; if not do this same procedure on all the non-vg00 disks as well if all you have done is pvcreate them.)

vgdisplay -v /dev/vg00 and note the disks listed. e.g. /dev/dsk/c0t6d0

If you have mirrors, then break the mirrors using lvreduce and blast that disk first.

To blast a disk, e.g. /dev/dsk/c0t6d0 use the character (rdsk) device, /dev/rdsk/c0t6d0

dd if=/dev/zero bs=1024k of=/dev/rdsk/c0t6d0








If it ain't broke, I can fix that.
Pete Randall
Outstanding Contributor

Re: Formating disk and deleting everything , for decomission.??

If you choose to use the dd suggestion, be sure to add a block size to the command so it doesn't take forever to run:

dd if=/dev/zero bs=1024k of=/dev/rdsk/c0t6d0 bs=1024k


Pete

Pete
Rita C Workman
Honored Contributor

Re: Formating disk and deleting everything , for decomission.??

You can do what folks have explained to totally hose up that box.

But, you could simply do a cold install of the O/S (as was mentioned) and that will clear up all that was there before, AND leave a box that can readily be turned on by the next person getting the box.
Hey...most old boxes get re-used for testing, training or somebody who just want to play and learn.

Besides....was your data was on external disks...?....then vg00 doesn't have that critical information.

Why destroy....just set it to a clean O/S.
Hey, on Ebay it would be worth more with a clean O/S.

Just a thought,
Rita
Steven E. Protter
Exalted Contributor

Re: Formating disk and deleting everything , for decomission.??

I do an OS install, include every disk. This will completely wipe out anything that was there.

I consider this superior to mediainit. pvcreate doesn't erase anything.

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
Cheryl Griffin
Honored Contributor
Solution

Re: Formating disk and deleting everything , for decomission.??

HP will do this for you as well:
http://h20219.www2.hp.com/services/cache/66370-0-0-225-121.aspx
Data Sanitization
"Downtime is a Crime."
A. Clay Stephenson
Acclaimed Contributor

Re: Formating disk and deleting everything , for decomission.??

Even an OS install will not overwrite everything though it will make it difficult to retrieve meaningful data. You really need something that writes to every disk sector preferably with random data and multiple passes but for anything except the most rigorous criteria, I would stick with writing NUL's (using /dev/zero, or random data using /dev/urandom) via dd.
If it ain't broke, I can fix that.
Nguyen Anh Tien
Honored Contributor

Re: Formating disk and deleting everything , for decomission.??

I suggest you do like these:
1, vgexport
2, pvcreate.
All data will be delete.
HP is simple
Peyman Javaheri
Frequent Advisor

Re: Formating disk and deleting everything , for decomission.??

Hi,

I would write a script to loop in a combination of mediainit AND dd, where dd writes RANDOM numbers.
Check the following doc, it has an example:

Date: 12/22/00
Document description: wipe classified, sensitive or proprietary data from disks.
Document id: KBRC00005001


regards,
peyman;
Q4you
Regular Advisor

Re: Formating disk and deleting everything , for decomission.??

Depending on how much lazy one can be..

If you have multple disks in vg00, remove all labels. Take all disks out, mix them up, put them back in and vanish.
D Block 2
Respected Contributor

Re: Formating disk and deleting everything , for decomission.??

veri,

I agree w/ Clay above.. nothing like "dd".
command.
Golf is a Good Walk Spoiled, Mark Twain.
Ralph Grothe
Honored Contributor

Re: Formating disk and deleting everything , for decomission.??

Though I think it already has been addressed by the other, more experienced repliers
I would like to add that (sufficient paranoia on your behalf given) I think that a mere rm -rf wouldn't suffice.
I'm sure that people who know the guts of VxFS or HFS and who are furnished with appropiate filesystem debugging tools can well recover stale date, at least partially.

To really be on the safe side you would have to write random bit patterns on the disks in several sequential runs.

There are I guess plenty such tools available.
For instance with linux the following is quite often used.

http://www.llnl.gov/linux/scrub/scrub.html

However, to be dead sure that no data whatsoever is recoverable you would have to physically atomize your hard disks
(usually shredding and burning should suffice).

For an average degree of paranoia
I think booting into maintenance mode
(or from CD) where your rootfs is only in a ramdisk, and then creating new filesystems or running dd 1-3 times over your character devices should should be sufficient.
Madness, thy name is system administration