Wednesday, December 12, 2012

unable to remove lv in aix

#rmlv fslv00
0516-1008 rmlv: Logical volume fslv00 must be closed.  If the logical volume
        contains a filesystem, the umount command will close the LV device.

#rmfs -r /mksysb
rmfs: No record matching '/fslv00' was found in /etc/filesystems.

In my case 'fslv00' was mapped to 2 different file systems in /etc/filesystems. i.e /testfs & /mksysb

#grep -ip fslv00 /etc/filesystems
/mksysb:
        dev             = /dev/fslv00
        vfs             = jfs2
        log             = /dev/loglv00
        mount           = false
        account         = false
        quota           = no

/testfs:
        dev             = /dev/fslv00
        vfs             = jfs2
        log             = /dev/loglv00
        mount           = true
        account         = false
        check           = true

#umount -f /testfs
forced unmount of /testfs
forced unmount of /testfs


#rmfs /mksysb
rmlv: Logical volume fslv00 is removed.

lslv fslv00
0516-306 lslv: Unable to find  fslv00 in the Device
        Configuration Database.

=====================

If the above solution doesn't work then try with the below commands:

# synclvodm -v <volume group> fslv00

# syncvg -l fslv00

once executed any of the above commands go and try removing the File system / LV and it should work.





No comments:

Post a Comment