How to remove a LV(logical volume) in an AIX server ?

Today in this article we will look how to remove a logical volume from a VG on IBM AIX server.

Lets have a look at this one by one to understand how to check the LV and remove it from VG.

1. Check out the available disks and logical partitions in VG.

ngeaix005 --> lsvg -p backupvg
backupvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk16           active            15998       157         154..00..00..00..03

ngeaix005 --> lsvg -l backupvg
backupvg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
ngeltlv             jfs2       2240    2240    1    open/syncd    /backup/ngelnft
loglv01             jfs2log    1       1       1    open/syncd    N/A
ngeltlv             jfs2       11440   13300   1    open/syncd    /backup/ngelp04
ngeaix005 -->

 

2. Umount the filesystem.

ngeaix005 --> umount /backup/ngelp04

 

3. Now remove this filesystem which will automatically remove LV.

ngeaix005 --> rmfs /backup/ngelp04
rmlv: Logical volume ngelplv is removed.

 

4. Check out the LVs now.
We can see the LV is now deleted.

ngeaix005 --> lsvg -p backupvg
backupvg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
hdisk16           active            15998       13757       959..3200..3199..3199..3200

ngeaix005 --> lsvg -l backupvg
backupvg:
LV NAME             TYPE       LPs     PPs     PVs  LV STATE      MOUNT POINT
ngeltlv             jfs2       2240    2240    1    open/syncd    /backup/ngelnft
loglv01             jfs2log    1       1       1    open/syncd    N/A

 

5. Now remove the entry from /etc/filesystems file.

ngeaix005 --> vi /etc/filesystems

That’s it ! Now the LV/FS is removed and is removed from auto-mount.

0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Newest
Oldest Most Voted
Inline Feedbacks
View all comments