You are not logged in.

#1 2007-09-11 15:32:35

otti
Member
Registered: 2006-12-18
Posts: 64

strange disk space issue

Hi,

somehow df shows not the expected free disk space:

df -m
Filesystem    1M-blocks    Used    Available    Use%    Mounted on
/dev/sda8      3706             2769    750              79%       /
none              249               0          249              0%        /dev/shm
/dev/sda7      1977             1861    117              95%       /home

Shouldn't df show about 1GB available disk space on /dev/sda8 instead of 750MB?
By the way: the filesystem is ext3.

Offline

#2 2007-09-11 15:47:05

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: strange disk space issue

otti wrote:

Shouldn't df show about 1GB available disk space on /dev/sda8 instead of 750MB?

I have to answer by a question : why should it?


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#3 2007-09-11 16:05:11

somairotevoli
Member
Registered: 2006-05-23
Posts: 335

Re: strange disk space issue

^
total space = 3706
used space = 2769
____________________

free space  = 937


Mine is
total space = 7390
used space = 5193
____________________

free space  = 2197

Yet my df reports 1821 free

I have never noticed before , but perhaps the missing space is do to the filesystem?

Offline

#4 2007-09-11 16:10:55

robertp
Member
From: Warszawa, Poland
Registered: 2007-09-11
Posts: 123

Re: strange disk space issue

When creating file system  mkfs reserves 5% of disk space only to root. This space is unavailable to normal user and is not shown by df.
You can change amount of reserved space during file system creation using -m option to mkfs or later using tunefs program.

Here is simple calculation:
(3706 - 2764 - 750) / 3706 = 192 / 3706 = 0,051807879 ~ 5%

Offline

#5 2007-09-11 16:36:24

shining
Pacman Developer
Registered: 2006-05-10
Posts: 2,043

Re: strange disk space issue

Oh right, silly me, that "1M-blocks" name confused me so I didn't look at that column, only at the three others smile

Doesn't this 5% rule apply to all partitions by default? Looks like it isn't the case for his /home/
But here, I use a /data/ partition instead of /home/ and there is also 5% reserved space.


pacman roulette : pacman -S $(pacman -Slq | LANG=C sort -R | head -n $((RANDOM % 10)))

Offline

#6 2007-09-11 17:02:56

robertp
Member
From: Warszawa, Poland
Registered: 2007-09-11
Posts: 123

Re: strange disk space issue

Probably his /home is using fat or ntfs file system - windows doesn't reserve disk space (or at least significant amount of it) for administrator.

My df output is:

/dev/sda5                10077      5225      4340  55% /
none                          252            0           252     0%       /dev/shm
/dev/sda1                20472      8188     12284  40%   /mnt/win
/dev/sda2                10235      2584      7652  26%    /mnt/win2
/dev/sda3               147466     29116    118350  20% /dane

Both /dev/sda5 and /dev/sda3 use ext2 file system, but since I used tunefs on /dev/sda3 there is no reserved disk space for root.
/dev/sda1 contains NTFS and /dev/sda2 contains FAT32 file systems and both don't reserve any disk space.

Offline

#7 2007-09-11 17:19:28

otti
Member
Registered: 2006-12-18
Posts: 64

Re: strange disk space issue

Ah, thanx for all the replies.

My /home partition uses reiserfs, seems it also doesn't reserve disk space for root.

Offline

Board footer

Powered by FluxBB