next up previous contents
Next: 刪除 vda5 vda6 Up: 邏輯卷冊變更 Previous: 變更掛載目錄   Contents

PV resize

  1. 查詢 VG vvv 時出現 PV size 警告訊息,必須 PV resize。
    [root@kvm5 ~]# vgdisplay vvv 
      WARNING: Device /dev/vda6 has size of 378880 sectors which is smaller than corresponding 
      PV size of 460800 sectors. Was device resized?
      One or more devices used as PVs in VG vvv have changed sizes.
      --- Volume group ---
      VG Name               vvv
      System ID             
      Format                lvm2
      Metadata Areas        1
      Metadata Sequence No  2
      VG Access             read/write
      VG Status             resizable
      MAX LV                0
      Cur LV                1
      Open LV               1
      Max PV                0
      Cur PV                1
      Act PV                1
      VG Size               224.00 MiB
      PE Size               8.00 MiB
      Total PE              28
      Alloc PE / Size       9 / 72.00 MiB
      Free  PE / Size       19 / 152.00 MiB
      VG UUID               ko1PvB-7MPu-kYOO-qSwy-ixEw-UhIs-BOAzDS
    
  2. /dev/vda6 做 PV resize。
    [root@kvm5 ~]# pvresize /dev/vda6
      WARNING: Device /dev/vda6 has size of 378880 sectors which is smaller than corresponding PV size of 460800 sectors. Was device resized?
      One or more devices used as PVs in VG vvv have changed sizes.
      Physical volume "/dev/vda6" changed
      1 physical volume(s) resized / 0 physical volume(s) not resized
    
  3. 再查詢 VG vvv 時沒有警告訊息了。
    [root@kvm5 ~]# vgdisplay vvv 
      --- Volume group ---
      VG Name               vvv
      System ID             
      Format                lvm2
      Metadata Areas        1
      Metadata Sequence No  3
      VG Access             read/write
      VG Status             resizable
      MAX LV                0
      Cur LV                1
      Open LV               1
      Max PV                0
      Cur PV                1
      Act PV                1
      VG Size               184.00 MiB
      PE Size               8.00 MiB
      Total PE              23
      Alloc PE / Size       9 / 72.00 MiB
      Free  PE / Size       14 / 112.00 MiB
      VG UUID               ko1PvB-7MPu-kYOO-qSwy-ixEw-UhIs-BOAzDS
    



De-Yu Wang 2018-11-30