LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   AIX (https://www.linuxquestions.org/questions/aix-43/)
-   -   wiping an IBM SP2 disk clean (https://www.linuxquestions.org/questions/aix-43/wiping-an-ibm-sp2-disk-clean-308734/)

zepplin611 04-01-2005 03:14 PM

wiping an IBM SP2 disk clean
 
Greetings,


I need to completely erase all data on an IBM SP2 disk...can someone lead me in the
right direction with the correct commands on how to do this?

thanks for any and all help!!!

zepp

saravkrish 04-01-2005 04:40 PM

Do you mean erase so that recovery is not possible or do u simply mean erase so I can use it for something else?

For the former, check out this.

If you meant the latter and the disk doesn't have any sensitive info, you could simply erase all partitions and create new ones to suit your need.

-Sarav

zorba4 04-02-2005 11:59 AM

Saravkrish is right.
So, if you want just to re-use your disk, simply create a volume group on it.
smit vg
add a volume group
select the disk, give a name for the volumegroup, let's say "mytest".
Then, you simply drop the volume group by means of typing
exportvg mytest.

In order to really erase everyghing, I would suggest not to use an external program, but simply use the AIX tools and make a hardware format. To do that, you use the tool named "diag". First type
diag
then choose the menu "disk format and certify"
and choose "format".
This will not stop your system, your AIX will continue beeng accessed by your other users, but the disk will be strongly busy for a long time, I expect more than one hour.

zepplin611 04-13-2005 05:51 PM

thanks zorba...question not fully answered though...

should i run diag while sitting on the node? I tried, but it says it can't format a disk if
it is active (which it is...) please help...just need to erase the disks...machine
is going to be sold and I want it cleaned off...

thanks!

ps - here is the error:

**************************************************
Device: hdisk1 in location 10-68-00-1,0

The disk erasure procedure cannot be performed.
The disk drive selected is in use.
To perform an erasure operation on this disk drive, you must
first free up the device and assure no other processes are
attempting to access the drive.

To continue, press Enter.
****************************************************

how do i free up the device?? ie. hdisk1 and hdisk0

zorba4 04-14-2005 03:45 PM

first type "lspv" in order to see which volume group is on hdisk1.
Let's suppose it's name is "datavg".
Then you type the following :
umount -a # temporary umounts all filesystems
varyoffvg datavg
exportvg datavg

Then lspv should show that hdisk1 is not used any more.
Then you can use "diag" and fully erase the disk.
Do it prefably from a "direct-attached" terminal, before you must be able to see the and of the preocess, and if you do it from a remote telnet terminal a network failure can prevent you from seeing if the process was correctly finished, and you will have to redo it.

zepplin611 04-14-2005 04:25 PM

thanks zorba...i have formatted hdisk1...how do I do the same for hdisk0???

thanks!

zorba4 04-15-2005 03:05 PM

OK.
You wiped your second disk.
Right now you cannot format your first disk because it has the operating system, which cannot suicide itself.
If you really want to wipe off also the first disk, i suggest do the following
1) type lsdev -Ccdisk, and remember the full description of hdisk0 and hdisk1.
2) boot on the first AIX CD-ROM, and install the system on the disk which has the SCSI description of hdisk0 (hdisk0 and hdisk1 can be inverted at that time).
3) This system on the newly wiped-off disk is able to wipe off the previous unaccessible disk.
4) now, you have a fully wiped-off system with only the legitimate minimal AIX system from the first boot disk. the guy who will buy it will have to install everything from scratch.

HTH
Zorba

JurgyMan 05-10-2005 03:16 PM

dd works too
 
My favorite disk cleaner:
dd if=/dev/zero bs=64k of=/dev/rhdisk0

zorba4 05-11-2005 08:33 AM

That's right, that will probably put a lot of zeros all along the hard disk.
But you must do no mistake, don't do that on hdisk0, you'd presumably better do it on hdisk1.


All times are GMT -5. The time now is 04:50 AM.