VG 刪除重建

  1. 重建 VG 必須先將現有的 VG 刪除,現有的所有資料都將被刪除,若資料必須被保留下來,就要先備份,否則還是以修改方式較好。要刪除 VG 前必須先將該 VG 內的 LV FS 卸載,SWAP 關閉。
    [root@kvm10 ~]# umount /dev/vg_mntx/pubx
    [root@kvm10 ~]# swapoff /dev/vg_mntx/swap
    
  2. 移除 VG 時會同時移除所有 LV,回答 y 即可一併刪除 LV。
    [root@kvm10 ~]# vgremove vg_mntx 
    Do you really want to remove volume group "vg_mntx" containing 2 logical volumes? [y/n]: y
    Do you really want to remove active logical volume vg_mntx/pubx? [y/n]: y
      Logical volume "pubx" successfully removed
    Do you really want to remove active logical volume vg_mntx/swap? [y/n]: y
      Logical volume "swap" successfully removed
      Volume group "vg_mntx" successfully removed
    [root@kvm7 ~]# umount /mnt/pub/
    
  3. 再重新建立 VG, LV 即可。