coolcommands.com - the search engine for unix sysadmins :: unix commands and scripts
Thursday September 9, 2010


 Home
 Search
 Advanced Search
 Category Search
 Affiliates
 Acknowledgements
 Cool Links

Username

Password

Remember me
Forgot your password?
Create an account

Who's Online
We have 24 guests online and 1 member online

Newest Member

santoshd

Hit Counter
4775890 Visitors

cool Statistics
coolcommands:1313
Categories:82
Total queries:524277
Members:4288





Search coolcommands.com
Search Keyword:


coolcommand

how to format a disk in IBM AIX
Description

Sometimes, you need to return old disks (disk replacement, return after lease, selling your old hardware), but you want to ensure that all the data is erased before doing it (by formatting the disk).

For regular SCSI disks, just use the AIX diagnostics, but for some disk type, AIX Diagnostics don't support them.

So if you want to completely erase a disk, you can use the following method:

1- Remove the disk from any existing VG

# reducevg vg hdisk#

2- Get the disk size (in MB)

# bootinfo -s hdisk#

OR

# bootinfo -s vpath#

3- Erase the content (with the previously identified size)

# dd if=/dev/zero of=/dev/hdisk# bs=1024k count=

OR

# dd if=/dev/zero of=/dev/vpath# bs=1024k count=

4- Remove the disk

# rmdev -dl hdisk#

OR

# rmdev -dl vpath#

HINT: If you just want a to do a "quick format" (to prevent internal usage of this disk), just erase the first cylinders by putting "count=1"
Example

dd if=/dev/zero of=/dev/hdisk33 bs=1024k count=$(bootinfo -s hdisk33)

Return to search results

Random coolcommands

coolcommand: ln - how to created a symbolic (soft) or hard link
Example: ln /www/home1 /www; ln -s /usr/local/apache2 /usr/local/apache
[show me the details]
coolcommand: how to delete all arp entries in Linux
Example: for i in $(sed '1d' /proc/net/arp | awk '{print $1 }'); do arp -d $i; done
[show me the details]
coolcommand: how to test if an integer variable is less than another integer variable in a shell script
Example: test $int1 -lt $int2; [ $int1 -lt $int2 ]
[show me the details]
coolcommand: metareplace - how to re-enable a disk of a raid5 volume in Solaris Volume Manager
Example: metareplace -e d0 c1t1d0s2
[show me the details]

coolcommands.com - the search engine for UNIX sysadmins :: unix commands and scripts



FREE
myPMS

Password
Management
System

by

LVOware.com




Top 5 Submitters

lvo1138
audet37
kah00na32
Mariom24
lebjf00013

Top 5 Searches

Category Solaris42738
Category AIX38092
Category General UNIX34293
solaris20874
aix19395

Terms of Use
Privacy
Contact


 
coolcommands.com © 2010. All Right Reserved.
Programming by PRATTICO Consulting . Hosting by Apricusum