[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 423
  • Last Modified:

Format disk to zeros

I need to format a disk to zeros. I don't want anything traceable on the disk, it is for a disaster recovery test and we need a way to format the disk completely and write zeros across the disk. Any help?
0
AIX25
Asked:
AIX25
2 Solutions
 
Kent OlsenData Warehouse Architect / DBACommented:
Hi AIX25,

For your use, simply copying a large file (repeatedly) across you file system should do nicely.  If you need more than that, you'll want to investigate some of the DOD tools.



Good Luck,
Kent
0
 
AIX25Author Commented:
So there is no command to format the disk?
0
 
Kent OlsenData Warehouse Architect / DBACommented:
You're likely not going to have physical disks.  I'd bet a significant sum that your DR site uses a SAN to allocate disk, just like most installations do these days.

The disks are already formatted (at a hardware/firmware level).  A format from AIX won't affect the firmware formatting.  You can use SMIT to manage the devices, but I don't believe that it will allow you to affect the physical disks in a way to ensure that your data is obliterated.

That said, once the LUN is returned to the SAN pool, it takes a very dedicated effort to rebuid your disks and recover/steal your data.

A small shell script that copies a system library repeatedly until the disk is full should do exactly what you want with minimal effort.


Kent

0
Concerto's Cloud Advisory Services

Want to avoid the missteps to gaining all the benefits of the cloud? Learn more about the different assessment options from our Cloud Advisory team.

 
AIX25Author Commented:
These will be physical disks. We are not using san. It will be a stand alone server.
0
 
Kent OlsenData Warehouse Architect / DBACommented:

Physical disk.  Wow.  Didn't realize that you had dedicated equipment.

The diag menu should give you the tools to format these devices.  :)


Kent
0
 
AIX25Author Commented:
Will it provide a "zeros" format in the diag menu?
0
 
Kent OlsenData Warehouse Architect / DBACommented:

Note that formatting these disks won't overwrite the data.  It will still be there, but rebuilding the data from the formatted devices is not trivial.

You should investigate wiping software (to overwrite the entire device) or do it yourself.

  cat /dev/zero | dd if=- of=/dev/hdisk2


After you've deleted all of the files on hdisk2, that should fill it with zeroes, overwriting anything that's there.

As long as you don't have user data on the root volume (and you shouldn't) this should do fine.


Kent
0
 
shadowmantxCommented:
I have had good success using this free program.

http://www.dban.org/

0
 
AIX25Author Commented:
Kdo, can you give me a break down of this command you provided earlier.

You should investigate wiping software (to overwrite the entire device) or do it yourself.

  cat /dev/zero | dd if=- of=/dev/hdisk2
0
 
Kent OlsenData Warehouse Architect / DBACommented:

Sure.  :)

  /dev/zero is a pseudo file that returns binary 0x00.  (ASCII NUL)

The value is piped into the dd command (if=-) and streamed to /dev/hdisk2.


Kent
0
 
AIX25Author Commented:
Kdo, we have PII data on our volume groups, which sits on several disks. When I run this command on each disk, will this clean out everything off the disks...including volume groups? Also, will the OS stay intact? Have you ran this command before?
0
 
woolmilkporcCommented:
Before running any command against your disks remove the VG information from them and from the ODM to avoid discrepancies.

The easiest way (if all logĂ­cal volumes are closed, i.e. filesystems unmounted) is:

exportvg vgname

If you plan to use dd run it against the raw device /dev/rhdiskx.

As long as you don't work against disks in rootvg the OS will remain intact.

The official tool to securely erase a disk's data for AIX 5.2 ML6 and above is the  "Format media service aid" in the AIX diagnostic package.

Docs are in "Diagnostic Information for Multiple Bus Systems"
http://www-05.ibm.com/e-business/linkweb/publications/servlet/pbi.wss?CTY=US&FNC=SRX&PBL=SA38-0509-23

To erase a hard disk run the following command:

diag -T "format"

This will start the Format media service aid menu. If prompted, select your terminal.

You will then see a resource selection list.
Select the hdisks you want to erase from this list and commit your changes according to the instructions.

Once you have committed your selections, select Erase Disk from the menu.
Next you will be asked to confirm your selection. Choose Yes.

You will be asked if you want to Read data from drive or Write patterns to drive.
Select Write patterns to drive.

Now you have the opportunity to modify the disk erasure options.
Specify the options you prefer and select Commit Your Changes.

The disk is erased.
This process can take a long time!


wmp
0

Featured Post

Important Lessons on Recovering from Petya

In their most recent webinar, Skyport Systems explores ways to isolate and protect critical databases to keep the core of your company safe from harm.

Tackle projects and never again get stuck behind a technical roadblock.
Join Now