删除逻辑卷-卷组-物理卷
一 卸载逻辑卷
1卸载 umount /dev/sonny/xiaofeng
[root@linuxprobe ~]# umount /dev/sonny/xiaofeng
2 删除配置信息 vim /etc/fstab
[root@linuxprobe ~]# vim /etc/fstab
删除最后一行的配置信息
#
# /etc/fstab
# Created by anaconda on Tue Jun 8 06:02:20 2021
#
# 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.
#
# After editing this file, run 'systemctl daemon-reload' to update systemd
# units generated from this file.
#
/dev/mapper/rhel-root / xfs defaults 0 0
UUID=2c1949d3-5cd8-4b71-b60d-8885bfc326e0 /boot xfs defaults 0 0
/dev/mapper/rhel-swap swap swap defaults 0 0
~
二 删除逻辑卷 lvremove /dev/sonny/xiaofeng
probe ~]# umount /dev/sonny/xiaofeng
[root@linuxprobe ~]# vim /etc/fstab
[root@linuxprobe ~]# lvremove /dev/sonny/xiaofeng
Do you really want to remove active origin logical volume sonny/xiaofeng with 1 snapshot(s)? [y/n]: y
Logical volume "SNAP" successfully removed
Logical volume "xiaofeng" successfully removed
三 删除卷组 vgremove sonny
[root@linuxprobe ~]# vgremove sonny
Volume group "sonny" successfully removed
四 删除物理卷 pvremove /dev/sd[b-c]
[root@linuxprobe ~]# vgremove sonny
Volume group "sonny" successfully removed
[root@linuxprobe ~]# pvremove /dev/sd[b-c]
Labels on physical volume "/dev/sdb" successfully wiped.
Labels on physical volume "/dev/sdc" successfully wiped.
大功告成!