"lvdisplay"로 표시되는 크기가 "df -h" 명령의 크기와 다른 이유는 무엇입니까?

"lvdisplay"로 표시되는 크기가 "df -h" 명령의 크기와 다른 이유는 무엇입니까?

몇 번 시도한 후에 이것부터 시작해보자.우편 엽서파티션 시스템이나 뭔가를 망쳤을 수도 있습니다. 각 명령에 대해 다음 출력을 확인합니다.

# pvdisplay 
  --- Physical volume ---
  PV Name               /dev/sda6
  VG Name               pc_rperez_lvm
  PV Size               105.38 GiB / not usable 2.00 MiB
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              26976
  Free PE               0
  Allocated PE          26976
  PV UUID               A3t5RY-fk2V-qud5-hQQ5-coJ0-5Z8X-wLerqT

# lvdisplay 
  --- Logical volume ---
  LV Path                /dev/pc_rperez_lvm/root
  LV Name                root
  VG Name                pc_rperez_lvm
  LV UUID                m7XejM-82cZ-hODn-nT8H-y2BM-3B4s-lq2xgn
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                50.00 GiB
  Current LE             12800
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:0

  --- Logical volume ---
  LV Path                /dev/pc_rperez_lvm/home
  LV Name                home
  VG Name                pc_rperez_lvm
  LV UUID                Ehl9tF-XV30-uF4Y-T1Bc-WB8r-Pfim-ONQFn3
  LV Write Access        read/write
  LV Status              available
  # open                 1
  LV Size                47.38 GiB
  Current LE             12128
  Segments               3
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:2

  --- Logical volume ---
  LV Path                /dev/pc_rperez_lvm/swap
  LV Name                swap
  VG Name                pc_rperez_lvm
  LV UUID                pJuBnV-fhD1-NgOe-xMUc-gck8-CfeM-YkQHAX
  LV Write Access        read/write
  LV Status              available
  # open                 2
  LV Size                8.00 GiB
  Current LE             2048
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           253:1

$ df -h
Filesystem                           Size  Used Avail Use% Mounted on
devtmpfs                             3.9G     0  3.9G   0% /dev
tmpfs                                3.9G   32M  3.9G   1% /dev/shm
tmpfs                                3.9G  1.4M  3.9G   1% /run
tmpfs                                3.9G     0  3.9G   0% /sys/fs/cgroup
/dev/mapper/pc_rperez_lvm-root       50G   38G  9.2G  81% /
tmpfs                                3.9G  2.2M  3.9G   1% /tmp
/dev/sda5                            453M  140M  286M  33% /boot
/dev/mapper/pc_rperez_lvm-home       11G  9.3G  591M  95% /home
tmpfs                                798M   24K  798M   1% /run/user/1000

lvdisplay표시된 치수가 다른 이유는 무엇입니까 df -h? 파티션의 실제 크기는 얼마입니까? 나에게 남은 여유 공간은 얼마나 됩니까?

답변1

조던의 의견에 따르면:

파일 시스템이 전체 볼륨에 걸쳐 있지 않습니다. resize2fs /dev/mapper/pc_rperez_lvm-homeext2/3/4를 사용한다면 이 문제가 해결될 것입니다.

그런데 파일 시스템이 마운트되어 있더라도 라이브 시스템에서 이 작업을 수행하는 것이 안전하지만 만일의 경우를 대비해 항상 백업을 가지고 있어야 합니다.

관련 정보