May 23, 2021 That's what Linux should learn
When you want to redeploy LVM in a production environment or no longer need to use LVM, you need to perform the removal of LVM. To do this, you need to back up important data information in advance, and then delete logical volumes, volume groups, physical volume devices in turn, this order can not be reversed.
Step 1: Un associate the logical volume with the directory mount and remove the device parameters that are permanently in effect in the configuration file.
[root@linuxprobe ~]# umount /linuxprobe [root@linuxprobe ~]# vim /etc/fstab #
# Created by anaconda on Fri Feb 19 22:08:59 2017
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
/dev/mapper/rhel-root / xfs defaults 1 1
UUID=50591e35-d47a-4aeb-a0ca-1b4e8336d9b1 /boot xfs defaults 1 2
/dev/mapper/rhel-swap swap swap defaults 0 0
/dev/cdrom /media/cdrom iso9660 defaults 0 0
/dev/storage/vo /linuxprobe ext4 defaults 0 0
Step 2: Remove the logical volume device and enter y to confirm the operation.
[root@linuxprobe ~]# lvremove /dev/storage/vo Do you really want to remove active logical volume vo? Step 3: y Logical volume "vo" successfully removed Step 3: Delete the volume group, write only the volume group name here, and do not require the absolute path of the device.
Step root@linuxprobe 4: Remove the physical volume device.
root@linuxprobe Pvremove /dev/sdb /dev/sdc Labels on physical volume "/dev/sdb" successfully wiped Labels on physical volume "/dev/sdc" successfully wiped on physical volume "/dev/sdc" successfully wiped after the above operation is completed, then perform the lvdisplay, vgdisplay, pvdis command to view the information of LVM will not see the information (provided that the above steps are correct).