You are not logged in.

#1 2016-02-05 07:45:27

dash_r
Member
Registered: 2016-02-05
Posts: 5

Incorrect free space displayed after filesystem resize

A few days ago I resized the fileystem from 16 GB to 26GB using GParted as the system already had consumed 15GB of the total. The file system was expanded using GParted and there wasn't error and the process finished successfully.

Today I got a "low on disk space" kind of message. When I checked available free space of the filesystem it says 25GB of 26GB used. When I scanned the filesystem using gdmap and filelight, they still show that I have only used 15.4 GB.

I issued df -h and it showed I have used 25GB of 26GB but du -sh gives 4.1G

At the moment I am not sure what is causing this and how can I fix it. Any help would be appreciated.

Thank you.

Offline

#2 2016-02-05 07:59:27

Head_on_a_Stick
Member
From: London
Registered: 2014-02-20
Posts: 7,680
Website

Re: Incorrect free space displayed after filesystem resize

Please post the actual command output rather than describing it.

See https://bbs.archlinux.org/viewtopic.php?id=57855

Which filesystem are you using?

Also post the output of:

df -i
# parted -l

Offline

#3 2016-02-05 08:22:33

dash_r
Member
Registered: 2016-02-05
Posts: 5

Re: Incorrect free space displayed after filesystem resize

Head_on_a_Stick wrote:

Please post the actual command output rather than describing it.

See https://bbs.archlinux.org/viewtopic.php?id=57855

Which filesystem are you using?

Also post the output of:

df -i
# parted -l

df -h gave me:

dev             1.9G     0  1.9G   0% /dev
run             2.0G  808K  2.0G   1% /run
/dev/sda8        25G   24G  498M  98% /
tmpfs           2.0G  3.9M  2.0G   1% /dev/shm
tmpfs           2.0G     0  2.0G   0% /sys/fs/cgroup
tmpfs           2.0G   14M  2.0G   1% /tmp
tmpfs           393M   12K  393M   1% /run/user/1000

du -sh gives:

4.1G	.

I am using ext4 filesystem and df -i gives :

Filesystem      Inodes  IUsed   IFree IUse% Mounted on
dev             493463    365  493098    1% /dev
run             502369    452  501917    1% /run
/dev/sda8      1656480 530501 1125979   33% /
tmpfs           502369      7  502362    1% /dev/shm
tmpfs           502369     12  502357    1% /sys/fs/cgroup
tmpfs           502369     44  502325    1% /tmp
tmpfs           502369     24  502345    1% /run/user/1000

and parted -l for the filesystem is:

Number  Start   End     Size    Type      File system  Flags
...

 8      60.5GB  87.7GB  27.2GB  logical   ext4
...

Offline

#4 2016-02-05 08:25:14

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Incorrect free space displayed after filesystem resize

What does "ncdu -x /" show?

Offline

#5 2016-02-05 08:46:39

dash_r
Member
Registered: 2016-02-05
Posts: 5

Re: Incorrect free space displayed after filesystem resize

lucke wrote:

What does "ncdu -x /" show?

 Total disk usage:  16.0 GiB  Apparent size:  15.9 GiB  Items: 496067           

Offline

#6 2016-02-06 22:22:51

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Incorrect free space displayed after filesystem resize

Boot from a live medium, mount /dev/sda8 somewhere and see what df/du/ncdu show about it.

Offline

#7 2016-02-08 06:31:49

dash_r
Member
Registered: 2016-02-05
Posts: 5

Re: Incorrect free space displayed after filesystem resize

lucke wrote:

Boot from a live medium, mount /dev/sda8 somewhere and see what df/du/ncdu show about it.

Tried and got exactly same result

Offline

#8 2016-02-09 22:13:15

paulkerry
Member
From: Sheffield, UK
Registered: 2014-10-02
Posts: 611

Re: Incorrect free space displayed after filesystem resize

dash_r wrote:

A few days ago I resized the fileystem from 16 GB to 26GB using GParted

Sanity check - did you use a live disk (i.e. gparted live) to resize? Is it possible that the filesystem was still mounted when you resized?

Offline

#9 2016-02-10 16:23:43

dash_r
Member
Registered: 2016-02-05
Posts: 5

Re: Incorrect free space displayed after filesystem resize

paulkerry wrote:
dash_r wrote:

A few days ago I resized the fileystem from 16 GB to 26GB using GParted

Sanity check - did you use a live disk (i.e. gparted live) to resize? Is it possible that the filesystem was still mounted when you resized?

I used a live CD to resize the partition and I am fairly sure that I didn't have the filesystem mounted at that time, even if it were, gparted wouldn't work until I unmount it.

Offline

#10 2016-02-10 16:28:25

lucke
Member
From: Poland
Registered: 2004-11-30
Posts: 4,018

Re: Incorrect free space displayed after filesystem resize

Have you run fsck on that filesystem?

Offline

#11 2016-02-13 15:36:21

Zaku140
Member
Registered: 2015-08-14
Posts: 31

Re: Incorrect free space displayed after filesystem resize

Did you try deleting the partition (after backing up important data) and resize it with cfdisk?

Offline

Board footer

Powered by FluxBB