移除 LVM 等於 format 硬碟一樣嚴重喔
1.umount 掛載點
# umount /home/
2.移除 LV
[root@test ~]# lvremove /dev/Volgroup01/home
Do you really want to remove active logical volume “home”? [y/n]: y
Logical volume “home” successfully removed
3.讓 Volgroup01 離線
-a, –available
y/n, yes/no
# vgchange -a n Volgroup01
0 logical volume(s) in volume group “Volgroup01” now active
4.Volgroup01 離線之後才能 remove
# vgremove Volgroup01
Volume group “Volgroup01” successfully removed
5.移除 /dev/hdb1 跟 /dev/hdd1 的 PV 格式
# pvremove /dev/hdb1
Attempt to close device ‘/dev/cdrom’ which is not open.
Labels on physical volume “/dev/hdb1” successfully wiped
# pvremove /dev/hdd1
Attempt to close device ‘/dev/cdrom’ which is not open.
Labels on physical volume “/dev/hdd1” successfully wiped