LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - General (https://www.linuxquestions.org/questions/linux-general-1/)
-   -   Wrong size of unused space on /home partition shown by GPARTED after installing Kali Linux (https://www.linuxquestions.org/questions/linux-general-1/wrong-size-of-unused-space-on-home-partition-shown-by-gparted-after-installing-kali-linux-4175705290/)

Morbius1 12-22-2021 02:54 PM

Wrong size of unused space on /home partition shown by GPARTED after installing Kali Linux
 
Hello. I am new to this forum and I hope that I post at the right place.

I have just completed my first installation of Kali Linux on my system (NVMe SSD).

I have partitioned the space for Kali as follows:
swap : 12 GB (I have 12 GB RAM)
/ : 60 GB
/home : 350 GB

However, just after installation, GPARTED indicates that my /home partition has:
used space: 6 GB
unused space: 319 GB

I find it weird to have 6 GB of home space already used when I haven’t even started to use this newly installed system !

To be noted that I have another installation – Linux Mint LMDE4 – on the same system/SSD and I do not face this problem: right after installation, GPARTED indicated just a few MB of used space on /home.

Could anyone guess what’s going on ?

jailbait 12-22-2021 04:14 PM

I suggest that you list the files on the new /home partition to see what is on it.

boot into Linux Mint LMDE4

open a terminal

su to root

create a mountpoint, say /media/xxx

mount the new /home partition on the mount point

issue the ls command: ls -l /media/xxx


You should get a listing of the directories and files on the new /home

michaelk 12-22-2021 05:35 PM

What is displayed in gparted is the total amount of space used in relation to the partition not the filesystem itself. Filesystems contain metadata which basically is the stuff necessary to find your files. How much overhead depends on the filesystem type and ext4 is around 2%. Total space used = files + metadata = 350GB.

What is displayed using filesystem tools like df does not include metadata. In addition if using ext4 there is reserved space (defaults 5%) which is also not included.

I don't think gparted has changed....

pan64 12-23-2021 01:39 AM

additionally I would try to use df to check that partition/filesystem.

Morbius1 12-23-2021 01:21 PM

Many thanks for your answers. As per the advice I was given, I did the following.

Code:

┌──(root💀kali)-[/]
└─# mkdir /media/med
┌──(root💀kali)-[/]
└─# mount --bind /home /media/med
┌──(root💀kali)-[/]
└─# ls -lh /media/med                                                  130 ⨯
total 20K
drwxr-xr-x 16 db  db  4.0K Dec 23 22:51 db
drwx------  2 root root  16K Dec 23 22:28 lost+found


Code:

┌──(root💀kali)-[/]
└─# df -h
Filesystem      Size  Used Avail Use% Mounted on
udev            5.8G    0  5.8G  0% /dev
tmpfs          1.2G  1.3M  1.2G  1% /run
/dev/nvme0n1p3  55G  11G  42G  21% /
tmpfs          5.9G  164M  5.7G  3% /dev/shm
tmpfs          5.0M    0  5.0M  0% /run/lock
/dev/nvme0n1p4  320G  192M  304G  1% /home
/dev/sda1      196M  21M  176M  11% /boot/efi
tmpfs          1.2G  860K  1.2G  1% /run/user/1000

So I will take it from here and assume that this used space on /home comes from those metadata and reserved space, that it is just normal, and that there is no possible action from me to 'free' this space.

ondoho 12-24-2021 05:21 AM

There's also something called "reserved blocks".
See
Code:

man tune2fs


All times are GMT -5. The time now is 05:36 PM.