AIX : Remove Filesystem , Volume Group And Reclaim Associated SAN Disk

Geeks ,

Today we will see some basic set of operation to free SAN disk from AIX server and to make those disks ready/available for SAN (storage team) to reclaim.

lspv | wc -l <- its like lsscsi , here we will count total number of devices before removal

lsvg -p testvg <- it will give powerdisk associated with testvg (take all powerdisk names in a file)

powermt display dev=<powerdisk> <- it will give powerdisk paths and logical ID of powerdisk (take all paths name in a file for all powerdisks)

lsvg -l testvg <- it will list filesystems under testvg i.e. /test

fuser -cu /test <- to check if FS is in use or not

umount /test <- to unmount /test

rmfs -ir /test <- it will remove filesystem and data ( i=to show warning, r=to remove mount point )

reducevg <vgname i.e. testvg > <pwrdsk> <- it will remove phy vol from a vol grp , when all phy vol removed, the vol grp will be deleted

powermt remove dev=<powerdisk> <- remove powerdisk from powermt control

rmdev -dl <paths_of_powerdisks> <-  remove a device from the system (disk paths)

rmdev -dl <power disks> <-  once paths removed, then remove power disks.

lspv | wc -l <-  now compare this count with starting count

That`s it , Now just sit behind , take a cup of coffee and wait for those nasty disks to be fetched out by SAN team.

Cheers !!
AJ 

Comments

Popular posts from this blog

Testing

How to run fdisk in non-interactive mode

Install Perl DBD::Oracle Module