Score:0

Filesystem reports less available disk space than LVM (lvm with luks)

fr flag

There is this issue that has been bothering me for a while. LVM, lvdisplay, vgdisplay, pvdisplay, lsblk all shows the disk has the assigned 3.64 TB, but the filesystem is reporting it's only 1.5 TB.

I don't understand where I would need to resize, or if it's even possible?

pvdisplay

  --- Physical volume ---
  PV Name               /dev/mapper/dm_crypt-2
  VG Name               vg1
  PV Size               <3.64 TiB / not usable 0   
  Allocatable           yes (but full)
  PE Size               4.00 MiB
  Total PE              953857
  Free PE               0
  Allocated PE          953857
  PV UUID               SAyraf-pldk-qlV2-N0op-BIGR-6HDV-TwG3O2

vgdisplay

  --- Volume group ---
  VG Name               vg1
  System ID             
  Format                lvm2
  Metadata Areas        1
  Metadata Sequence No  10
  VG Access             read/write
  VG Status             resizable
  MAX LV                0
  Cur LV                1
  Open LV               0
  Max PV                0
  Cur PV                1
  Act PV                1
  VG Size               <3.64 TiB
  PE Size               4.00 MiB
  Total PE              953857
  Alloc PE / Size       953857 / <3.64 TiB
  Free  PE / Size       0 / 0   
  VG UUID               LCH86H-YzSJ-jCs4-tZKb-5mwz-Cedc-8FNro8

lvdisplay

  --- Logical volume ---
  LV Path                /dev/vg1/lvol0
  LV Name                lvol0
  VG Name                vg1
  LV UUID                6ofnPd-JNfD-wXhV-3Jny-kNAh-qu1d-TPDPJ0
  LV Write Access        read/write
  LV Creation host, time arch, 2021-12-22 15:56:41 +0100
  LV Status              available
  # open                 0
  LV Size                <3.64 TiB
  Current LE             953857
  Segments               1
  Allocation             inherit
  Read ahead sectors     auto
  - currently set to     256
  Block device           254:4

lsblk

NAME            MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINTS
sdb               8:32   0   3.6T  0 disk  
└─sdb2            8:34   0   3.6T  0 part  
  └─dm_crypt-2  254:3    0   3.6T  0 crypt 
    └─vg1-lvol0 254:4    0   3.6T  0 lvm   /mnt/bigdata

df -h

Filesystem                           Size  Used Avail Use% Mounted on
/dev/mapper/vg1-lvol0                1.5T 1020G  363G  74% /mnt/bigdata

How do I resize this partition to use the full 3.64 TB?

Score:0
fr flag

The issue is that everything is resized correctly except the filesystem itself.

You can resize it with sudo resize2fs /dev/mapper/vg1-lvol0 in this case. This was done while the disk was mounted, can't confirm if mounted or not solves the solution.

I sit in a Tesla and translated this thread with Ai:

mangohost

Post an answer

Most people don’t grasp that asking a lot of questions unlocks learning and improves interpersonal bonding. In Alison’s studies, for example, though people could accurately recall how many questions had been asked in their conversations, they didn’t intuit the link between questions and liking. Across four studies, in which participants were engaged in conversations themselves or read transcripts of others’ conversations, people tended not to realize that question asking would influence—or had influenced—the level of amity between the conversationalists.