1. Un-mount the desired lvm mount point:
[root@hostname ~]# umount /mount_pointi.e.
[root@hostname ~]# umount /u02Here /u02 is the unwanted mount point that will no longer be needed in my case.
2. Remove the mount point entry from /etc/fstab file:
[root@hostname ~]# vim /etc/fstabUUID=bbc37d9d-f553-486b-81e9-c2cae03e434a /u02 xfs defaults 0 0
In my case, I need to remove the above line.
3. Remove the associated Logical volume:
3.1. See the list of Logical volume,
[root@hostname ~]# lvdisplayor
[root@hostname ~]# lvs3.2. Now, remove the right Logical volume,
[root@hostname ~]# lvremove /dev/vg_name/lv_namei.e.
[root@hostname ~]# lvremove /dev/vg_u02/lv_u024. Now, remove the associated Volume group:
4.1. See the list of Volume group,
[root@hostname ~]# vgdisplayor
[root@hostname ~]# vgs4.2 Now, remove the right Volume group,
[root@hostname ~]# vgremove vg_namei.e.
[root@hostname ~]# vgremove vg_u02
5. Now, remove the associated Physical volume:
5.1. See the list of Physical volume,
[root@hostname ~]# pvdisplayor
[root@hostname ~]# pvs5.2 Now, remove the right Physical volume,
You must verify that your Physical volume does not assign to any Volume group before performing this step.
[root@hostname ~]# pvremove /dev/disk_partition_namei.e.
[root@hostname ~]# pvremove /dev/sdc16. Now remove the associated disk if possible or format it again to reuse this disk.
Comments
Post a Comment