yhw-miracle / blog

思想,知识,认知的沉淀地
https://yhw-miracle.github.io
0 stars 0 forks source link

LVM #27

Open yhw-miracle opened 1 year ago

yhw-miracle commented 1 year ago

PV(物理卷 physical volume)

pvdisplay
--- Physical volume ---
  PV Name               /dev/sda3
  VG Name               pve
  PV Size               <99.50 GiB / not usable 2.98 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              25471
  Free PE               0
  Allocated PE          25471
  PV UUID               kdqgod-NbTP-k4SL-HwLh-RjAn-quPU-MngDpg

VG(卷组 volume group)

vgdisplay
--- Volume group ---
  VG Name               pve
  System ID
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  10
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                2
  Open LV               2
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <99.50 GiB
  PE Size               4.00 MiB
  Total PE              25471
  Alloc PE / Size       25471 / <99.50 GiB
  Free  PE / Size       0 / 0
  VG UUID               YCy0eY-TFCV-iW28-c8cV-f2QS-LfR0-tQuMa4

LV(逻辑卷 logical volume)

lvdisplay
--- Logical volume ---
  LV Path                /dev/pve/swap
  LV Name                swap
  VG Name                pve
  LV UUID                y0eZZ8-Qy12-C2dL-hXat-csxb-TKb3-3MC7uY
  LV Write Access        read/write
  LV Creation host, time proxmox, 2023-08-17 09:33:28 +0800
  LV Status              available
  # open                 2
  LV Size                4.00 GiB
  Current LE             1024
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

  --- Logical volume ---
  LV Path                /dev/pve/root
  LV Name                root
  VG Name                pve
  LV UUID                GorAbn-eZKy-ygLl-aX7k-ktwC-mrlE-Tm866b
  LV Write Access        read/write
  LV Creation host, time proxmox, 2023-08-17 09:33:28 +0800
  LV Status              available
  # open                 1
  LV Size                <95.50 GiB
  Current LE             24447
  Segments               3
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1
lvremove /dev/pve/data
lvextend -l +100%FREE /dev/mapper/pve-root
resize2fs /dev/mapper/pve-root