0

I have a problem with used space and available disk space in lvm. Please see this results :

[root@localhost ~]# vgs
  VG       #PV #LV #SN Attr   VSize VFree
  VolGroup   3   3   0 wz--n- 6.78t 736.00m

[root@localhost ~]# pvs
  PV         VG       Fmt  Attr PSize   PFree
  /dev/sda2  VolGroup lvm2 a--u   3.50t      0
  /dev/sdb1  VolGroup lvm2 a--u   2.50t      0
  /dev/sdb2  VolGroup lvm2 a--u 798.72g 736.00m

[root@localhost ~]# lvs
  LV      VG       Attr       LSize  Pool Origin Data%  Meta%  Move Log Cpy%Sync Convert
  lv_home VolGroup -wi-ao----  6.73t
  lv_root VolGroup -wi-ao---- 50.00g
  lv_swap VolGroup -wi-ao----  4.90g

[root@localhost ~]# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                       50G  2.5G   45G   6% /
tmpfs                 4.9G     0  4.9G   0% /dev/shm
/dev/sda1             477M   28M  425M   7% /boot
/dev/mapper/VolGroup-lv_home
                      6.7T  5.8T  531G  92% /home
[root@localhost ~]# df -Th
Filesystem           Type   Size  Used Avail Use% Mounted on
/dev/mapper/VolGroup-lv_root
                     ext4    50G  2.5G   45G   6% /
tmpfs                tmpfs  4.9G     0  4.9G   0% /dev/shm
/dev/sda1            ext4   477M   28M  425M   7% /boot
/dev/mapper/VolGroup-lv_home
                     ext4   6.7T  5.8T  529G  92% /home

[root@localhost ~]# arch
x86_64

as you see I assigned about 6.7T to /home via lvm but I can't use more than 6.3T ( difference of Used and Avail in df ) space.

I would be glad if someone could help me. Thanks

AhleDL
  • 3
  • 3

1 Answers1

1

I think that the part of storage in lake in the Logical Volume, is the part reseved of root rescue, the 5% reserved for root for emergency situation, this part is 5% by default, it's set when its you create the file system.

look, with dumpe2fs -h /dev/mapper/VolGroup-lv_home | grep -i reserved , will give you the amount of blok reserved, you multiply the value by the size of the block, and you will get the size in bits, you convert to Gb and you will find the lost space. to have the lost space back to 0% or 1% do this and print us the result of df after :

tune2fs -m 1 /dev/mapper/VolGroup-lv_home

or , for freeing the total space reserved do this :

tune2fs -m 0 /dev/mapper/VolGroup-lv_home