0

Let's start saying that after several tries and coming from this post I maybe mess up with the partition system or something else. Take a look to the following output for each command:

# 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

Why, lvdisplay shown a size different than df -h? What's the real size of the partition and how many space do I've available?

  • 4
    The filesystem does not span the the entire volume. resize2fs /dev/mapper/pc_rperez_lvm-home should fix it if you are using ext2/3/4. – jordanm Aug 1 '16 at 13:27
  • @jordanm I've already run that command from the Live-CD but apparently it doesn't change anything :-\ – ReynierPM Aug 1 '16 at 13:41
  • What is the output? btw, it's safe to do that on a live system, even while the fs is mounted, but you should always have backups just in case. – jordanm Aug 1 '16 at 13:43
  • @jordanm I don't think it's possible, read my comment here and you want the output of what? – ReynierPM Aug 1 '16 at 13:45
  • -M is shrink, you don't want to shrink, you want to grow. – jordanm Aug 1 '16 at 13:46

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.