1748204 Members
3440 Online
108759 Solutions
New Discussion юеВ

Erasing the root disk..

 
SOLVED
Go to solution
Chris Fadrowski
Super Advisor

Erasing the root disk..

I am getting rid of an HPUX server. I would like to know how to completely format the root drive.

situation;

i have two 18 gb drives mirrored.
Need to format them so no data exists
server will be sold to a reseller.

Mediainit? or DD? please help.
16 REPLIES 16
Peter Godron
Honored Contributor

Re: Erasing the root disk..

Chris,
I'd go for dd as mediainit has been slow for me. dd if=/dev/zero of=/dev/dsk/cXXdXXtX
This should to the trick for normal standard data sensitivity.

Pete Randall
Outstanding Contributor

Re: Erasing the root disk..

Popular options include re-installing the OS, running dd against it, running pvcreate -f, or mediainit. Any of the above will work, it just depends on how sensitive the data is on the disk and how cautious you need/want to be.

To my way of thinking, there shouldn't be any sensitive data on the root disk anyway.


Pete

Pete
Gavin Clarke
Trusted Contributor

Re: Erasing the root disk..

Here is a similar post (from a search):

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=964689

It seems to me that dd is the favourite, being faster but still good enough.

I thought pvcreate would make data irretrievable, the post above says otherwise.

Cheers.
Chris Fadrowski
Super Advisor

Re: Erasing the root disk..

I wasn't sure DD would work on the "root" disks. I did try that yesterday and it never finished. I let it run for over 26 hours.
Pete Randall
Outstanding Contributor
Solution

Re: Erasing the root disk..

I would think dd would work up until it overwrites the dd binary itself. After that, I'm not sure what would happen. Did you specify a blocksize:

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

It's true that pvcreate won't actually destroy any data on the disk but it makes it darn hard for anyone to recover unless they knew the layout of the disk to start with. Even destructive methods like dd and mediainit leave data behind that the determined snoop can get at.


Pete

Pete
Gavin Clarke
Trusted Contributor

Re: Erasing the root disk..

Seems like re-installing the OS is the best way now then.

I do agree with Pete that there is/should be very little to get rid of on the root disks, still better to be safe I guess.

What was the block size you used?
Chris Fadrowski
Super Advisor

Re: Erasing the root disk..

I used bs=512

It never finished. I just killed it, and i can still see all files on vg00 like it did nothing.
Gavin Clarke
Trusted Contributor

Re: Erasing the root disk..

That post suggests bs=1024k, which is quite alot different I think.

The kernel is running in memory so I would think it should be able to overwrite it's own files before it died.
Pete Randall
Outstanding Contributor

Re: Erasing the root disk..

Chris,

512 is the default and writes out 512 byte blocks - it will definitely take forever. Try it with 1024k.


Pete

Pete