Home AIX AIX: Remove EMC LUNs/VGs/disks from AIX – powerpath

AIX: Remove EMC LUNs/VGs/disks from AIX – powerpath

by Kliment Andreev
Reading Timee: < 1 minute

I had to remove some EMC drives from an AIX box that were not used anymore. I had 5 filesystems, but I’ll describe the procedure for 1 filesystem. The first thing to do is to unmount the filesystems.

umount /data45
rmfs /data45 

I had a volume group that was consisting of only one filesystem, so when I removed the file system, volume group was automatically removed. There is no need to use rmlv. Then I checked the volume group.

lsvg -M datavg04 

I saw that there was a log logical volume, so I have to remove it manually.

rmlv loglv04 

Now, you have to list physical volumes (actual EMC drives) that are part of datavg04:

lspv -L | grep datavg04 

Write down these hpowerdisk devices and for each of them do

powermt display dev=hdiskpowerXYZ 

You will see that hpowerdiskXYZ is a representation of (in my case) two hard disks named hdiskAA and hdiskBB. AA and BB are random numbers. This means that hdiskpowerXYZ is a virtual single hard drive for AIX, but it is an actual mirrored hard drive for EMC consisting of two physical drives. Now that we have this information, we can remove the drives from the volume group first.

reducevg datavg04 hdiskpowerXYZ
reducevg datavg04 hdiskpowerZYX 

Once you delete the last hdiskpower device from the VG (volume group), the VG will be removed automatically. But we are not done yet. We have to remove the drives, so the OS won’t look for them.

powermt remove dev=hdiskpowerXYZ
rmdev -Rdl hdiskpowerXYZ
rmdev -Rdl hdiskAA
rmdev - Rdl hdiskBB 

Once you remove every instance of hdiskpower and hdisk devices, you can:

 powermt save
0 comment

Related Articles

Leave a Comment

This website uses cookies to improve your experience. We'll assume you're ok with this, but you can opt-out if you wish. Accept Read More