Skip to main content

Remove Unused Logical Volume(lvm) from Linux

1. Un-mount the desired lvm mount point:

[root@hostname ~]# umount /mount_point


[root@hostname ~]# umount /u02

Here /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/fstab

UUID=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 ~]# lvdisplay


[root@hostname ~]# lvs

3.2. Now, remove the right Logical volume,

[root@hostname ~]# lvremove /dev/vg_name/lv_name


[root@hostname ~]# lvremove /dev/vg_u02/lv_u02

4. Now, remove the associated Volume group:

4.1. See the list of Volume group,

[root@hostname ~]# vgdisplay


[root@hostname ~]# vgs

4.2 Now, remove the right Volume group,

[root@hostname ~]# vgremove vg_name


[root@hostname ~]# vgremove vg_u02

5. Now, remove the associated Physical volume:

5.1. See the list of Physical volume,

[root@hostname ~]# pvdisplay


[root@hostname ~]# pvs

5.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_name


[root@hostname ~]# pvremove /dev/sdc1

6. Now remove the associated disk if possible or format it again to reuse this disk.


Popular posts from this blog

Upgrading Issue for RHEL 7 to 8 With Leapp

Overview The Leapp utility is a framework for updating and upgrading operating systems as well as applications. The operations of this utility consist of two phases 1. the preupgrade Phase – that chack the upgrade possibilities and 2. the actual upgrade phase – that map packages between previous and current versions of the software packages. Issue – 01: After running ‘ sudo leapp preupgrade ‘ sometimes you find the below issue in ‘ /var/log/leapp/leapp-report.txt ‘. Detail: Risk Factor: high (inhibitor) Title: Leapp detected loaded kernel drivers which have been removed in RHEL 8. Upgrade cannot proceed. Summary: Support for the following RHEL 7 device drivers has been removed in RHEL 8: – pata_acpi Key: f08a07da902958defa4f5c2699fae9ec2eb67c5b Remediation: 1. Disable detected kernel drivers in order to proceed with the upgrade process using the rmmod or modprobe -r . rmmod – Simple program to remove a module from the Linux Kernel modprobe – Add and remove modules from the Linux Ke

Upgrading Oracle Linux 6 to 7

Overview It is possible to upgrade an Oracle Linux 6 system to Oracle Linux 7.6 under the following conditions: The system meets the minimum installation requirements for Oracle Linux 7 as described in Chapter 1, System Requirements and Limits. The Oracle Linux 6 system has been completely updated from the ol6_x86_64_latest channel or ol6_latest repository. UEK R3 or UEK R4 has been installed on the system to be upgraded and is the default boot kernel. Upgrading from UEK R2 is not supported. Note that the system is upgraded to use the UEK R5 release provided with Oracle Linux 7.6. Upgrading is supported only for systems that are installed with the Minimal Install base environment. If additional packages are installed from an alternative repository or channel, upgrade might fail or the resulting upgrade might not function as expected. reference: Verifying the system before Upgrade: #

Software-only Installation of oracle Database 21c on RHEL 8

Overview Oracle Database 21c is a multi-model database that provides full support for relational and non-relational data, such as JSON, XML, text, spatial and graph data. There are lots of new features available in this new release like partitioned hybrid tables, encryption capabilities in the built-in data dictionary, statistics-only queries, and many more. It also enables Oracle's Autonomous Database Cloud Services. This article describes the installation of Oracle Database 21c 64-bit on Red Hat 8 64-bit. Lab Environment Particulars                                     Database Info --------------                                            ------------------------------------------------------- OS Release                                     Red Hat Enterprise Linux release 8.4 (Ootpa) Kernel                                              4.18.0-425.10.1.el8_7.x86_64 IP Address                                     1 Host Name                                  oemsrv User Na