LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 01-16-2006, 05:11 AM   #1
C-RAF.
Member
 
Registered: Oct 2005
Distribution: Debian@work / Ubuntu@home
Posts: 42

Rep: Reputation: 15
Question DF command: 12GB of memory's missing!


hi,

This is weird but since one month when I use the df command on my webserver, there's 12 GB missing on a specific partition.

here is the output of df -h:

Filesystem Size Used Avail Use% Mounted on
/dev/md1 228G 211G 5.0G 98% /

I don't get it.. 211G+5G ain't giving me 228G. What the hell is going on? Where are the missing 12Gs?

If u have an idea about this one... would be great!
 
Old 01-16-2006, 05:36 AM   #2
scuzzman
Senior Member
 
Registered: May 2004
Location: Hilliard, Ohio, USA
Distribution: Slackware, Kubuntu
Posts: 1,851

Rep: Reputation: 47
Could you please post the output of
Code:
fdisk -l
This way we can take a look at your partition setup. The output of
Code:
cat /etc/fstab
may be useful as well.
 
Old 01-16-2006, 05:42 AM   #3
C-RAF.
Member
 
Registered: Oct 2005
Distribution: Debian@work / Ubuntu@home
Posts: 42

Original Poster
Rep: Reputation: 15
ok, here it is:

fdisk -l
Quote:
Disk /dev/sda: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sda1 1 146 1172713+ 83 Linux
/dev/sda2 147 268 979965 fd Linux raid autodetect
/dev/sda3 * 269 30401 242043322+ fd Linux raid autodetect

Disk /dev/sdb: 250.0 GB, 250059350016 bytes
255 heads, 63 sectors/track, 30401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

Device Boot Start End Blocks Id System
/dev/sdb1 1 146 1172713+ 83 Linux
/dev/sdb2 147 268 979965 fd Linux raid autodetect
/dev/sdb3 * 269 30401 242043322+ fd Linux raid autodetect
and for cat /etc/fstab:
Quote:
# /etc/fstab: static file system information.
#
# <file system> <mount point> <type> <options> <dump> <pass>
/dev/md1 / ext3 errors=remount-ro 0 1
/dev/md0 none swap sw 0 0
proc /proc proc defaults 0 0
/dev/fd0 /floppy auto user,noauto 0 0
/dev/cdrom /cdrom iso9660 ro,user,noauto 0 0

Last edited by C-RAF.; 01-16-2006 at 05:47 AM.
 
Old 01-16-2006, 05:44 AM   #4
C-RAF.
Member
 
Registered: Oct 2005
Distribution: Debian@work / Ubuntu@home
Posts: 42

Original Poster
Rep: Reputation: 15
what's the "errors=remount-ro" thing in the cat output?
 
Old 01-16-2006, 05:47 AM   #5
trickykid
LQ Guru
 
Registered: Jan 2001
Posts: 24,149

Rep: Reputation: 269Reputation: 269Reputation: 269
Space is reserved for root and don't forgot inode's and all the other good stuff..

Example: I have a 123.5 GB drive in one of my servers, this is the output of fdisk -l:

Code:
Disk /dev/hdb: 123.5 GB, 123522416640 bytes
16 heads, 63 sectors/track, 239340 cylinders
Units = cylinders of 1008 * 512 = 516096 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/hdb1               1      239340   120627328+  83  Linux
And this is the output of df -h:

Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/hdb1             114G   35G   74G  32% /data
This is totally normal behavior.. even if you have a 300GB drive in Windows and you format it as NTFS, the drive will end up being 279GB usable space available.

Last edited by trickykid; 01-16-2006 at 05:48 AM.
 
Old 01-16-2006, 05:56 AM   #6
C-RAF.
Member
 
Registered: Oct 2005
Distribution: Debian@work / Ubuntu@home
Posts: 42

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by trickykid
Space is reserved for root and don't forgot inode's and all the other good stuff..
Yeah I know... but since I got this space one month ago... I still don't understand. (I mean, 12gb for inodes??? )
 
Old 01-16-2006, 06:01 AM   #7
C-RAF.
Member
 
Registered: Oct 2005
Distribution: Debian@work / Ubuntu@home
Posts: 42

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by trickykid
This is totally normal behavior.. even if you have a 300GB drive in Windows and you format it as NTFS, the drive will end up being 279GB usable space available.
Aiight, I get the point... that's why there's 228GB of the 250GB disk in the DF command output, BUT that doesn't explain why I can't use 12GB within these 228GB?
 
Old 01-16-2006, 06:09 AM   #8
C-RAF.
Member
 
Registered: Oct 2005
Distribution: Debian@work / Ubuntu@home
Posts: 42

Original Poster
Rep: Reputation: 15
Quote:
Originally Posted by C-RAF.
what's the "errors=remount-ro" thing in the cat output?
humm, it seems to be normal:

http://lists.debian.org/debian-devel.../msg02267.html

okay... I really don't get it.
 
Old 01-16-2006, 06:39 AM   #9
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,736

Rep: Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921Reputation: 5921
Quote:
BUT that doesn't explain why I can't use 12GB within these 228GB?
Like trickykid posted. An ext2/ext3 file system by default reserves 5% for roots use. This is supposed to reduce fragmentation and allow root to access the filesystem to perform maintenance in case it becomes full. (228 * .05 = 11.4GB)

You can tune2fs to reduce the amount of reserved space.
 
Old 01-16-2006, 07:09 AM   #10
Wim Sturkenboom
Senior Member
 
Registered: Jan 2005
Location: Roodepoort, South Africa
Distribution: Ubuntu 12.04, Antix19.3
Posts: 3,794

Rep: Reputation: 282Reputation: 282Reputation: 282
Quote:
Originally Posted by C-RAF.
Aiight, I get the point... that's why there's 228GB of the 250GB disk in the DF command output
No, that's because a kilobyte is not a kilobyte. HD manufacturers specify HDs in such a way that 1000 bytes is 1kB, but computers calculate with 1024 bytes for 1kB.
The real size of your HD = 250*1000*1000*1000/(1024*1024*1024) = 232GB.
 
Old 01-16-2006, 07:21 AM   #11
C-RAF.
Member
 
Registered: Oct 2005
Distribution: Debian@work / Ubuntu@home
Posts: 42

Original Poster
Rep: Reputation: 15
Okay, that stuff confused & is still confusing me. This is crazy that I just can use 216GB on a 250GB disk.

My co-worker was saying that one month ago he was sure that we could use the 228GB.
Me too, I don't remember this hole when reading the df output.

that's w.e.i.r.d

anyway, thx for your answers guyz!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
DF command: 12GB of memory's missing! C-RAF. Linux - Hardware 6 01-16-2006 06:48 PM
Command 'services' missing? tremend0us Fedora 3 07-11-2005 01:16 PM
missing make command transccend Linux - Software 6 02-27-2005 05:24 AM
patch command missing hippo88 Linux - Newbie 4 08-31-2004 12:11 AM
missing insmod command caesarkim Linux - Networking 2 05-20-2004 02:49 PM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 02:53 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration