LVM vs df differnce

This topic contains 0 replies, has 1 voice, and was last updated by  Dino Catona 5 months, 2 weeks ago.

  • Author
  • #17021

    Dino Catona

    I tried to go the extra mile on chapter 4 and create an encrypted LVM spanning 2 physical drives. I use Oracle Virtualbox.

    My VM has two drives 20GB and 8 GB.

    Here’s the output of some commands to consider:

    root@kali2:~# pvs
    PV VG Fmt Attr PSize PFree
    /dev/mapper/sda5_crypt kali2-vg lvm2 a– 19.75g 16.00m
    /dev/mapper/sdb1_crypt kali2-vg lvm2 a– 7.99g 7.99g
    root@kali2:~# vgs
    VG #PV #LV #SN Attr VSize VFree
    kali2-vg 2 2 0 wz–n- <27.75g <8.01g
    root@kali2:~# lvs
    LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert
    root kali2-vg -wi-ao—- 16.74g
    swap_1 kali2-vg -wi-ao—- <3.00g

    So i have two encrypted volumes of 19.75G and 7.99G both of them assigned to kali2-vg volume group.
    The vgs command returns 27.75G as expected.

    However, the lvs command shows the root partition at 16.7 and the swap partition at 3. Where did 7.75G go?

    Also, df -h shows something similar:

    Filesystem Size Used Avail Use% Mounted on
    /dev/mapper/kali2–vg-root 17G 11G 5.3G 67% /

    Tried to resize using:

    resize2fs /dev/kali2-vg/root

    and got:

    resize2fs 1.44.4 (18-Aug-2018)
    The filesystem is already 4388864 (4k) blocks long. Nothing to do!

    Been on this for a couple of hours looked at different forums but i could not find something to explain this and i am ready to move on.

    Any help or explanation will be appreciated.

You must be logged in to reply to this topic.

Back to Top