Question & Answer
Question
How do I erase or decommission an AIX LPAR disk data?
Cause
According to Security reason, many of Customers might want to erase disks specially for critical unwanted data.
Answer
There are two ways you can erase the contents of the disks:-
1) Using dd low-level command with clearing the VGDA:
# chpv -C hdisk#
# dd if=/dev/zero of=/dev/rhdisk# bs=1024 count=10
This command deletes any VGDA and writes zeros blocks. Each block is 1024 overwriting anything on the disk, which is like a low-level format. This action is valid against any type of disks.
2) Using AIX diagnostic menu for local disks (IDE, SCSI, or NVME)
# diag -T format -> this command takes you into the format media service aid menu and starts the “Format media” service aid in a menu driven interface.
A resource selection list is displayed. Select the hdisk devices you want to erase from this list and commit your changes according to the instructions on the screen.
See screen captures for more information:
For SAN or vscsi disks:
Boot in maintenance mode:
Type the number of your choice and press Enter.
1- Access a Root Volume Group
2- Copy a system dump to Removable Media
3- Access Advanced Maintenance Functions
4- Erase Disks <--
5- Configure Network Disks (iSCSI)
6- Select Storage adapters
It is better to run the dd command to erase everything on that disk.
Remember the dd command erases everything,
Remember the dd command erases everything,
So if you want anything on that disk to be saved, make a backup first.
[{"Type":"MASTER","Line of Business":{"code":"LOB08","label":"Cognitive Systems"},"Business Unit":{"code":"BU058","label":"IBM Infrastructure w\/TPS"},"Product":{"code":"SWG10","label":"AIX"},"ARM Category":[{"code":"a8m0z0000001fMuAAI","label":"AIX General Support"}],"ARM Case Number":"","Platform":[{"code":"PF025","label":"Platform Independent"}],"Version":"All Versions"}]
Was this topic helpful?
Document Information
Modified date:
30 December 2021
UID
ibm16537604