LinuxQuestions.org
Visit the LQ Articles and Editorials section
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - General
User Name
Password
Linux - General This Linux forum is for general Linux questions and discussion.
If it is Linux Related and doesn't seem to fit in any other forum then this is the place.

Notices

Reply
 
LinkBack Search this Thread
Old 02-21-2011, 04:05 PM   #1
someshpr
Member
 
Registered: Jul 2009
Location: PA, USA
Distribution: Debian, RHEL5.4, CentOS 5.4
Posts: 105

Rep: Reputation: 26
disk size mismatch using df


Hi,
This is not really a problem, but I am curious!

When I run df command, the sum of free and used space doesn't tally up to total space. Now I found an explanation in this thread:
http://www.linuxquestions.org/questi...n-size-316091/
The amount of "reserved" space seems a little too high as OP of the thread had commented, but may be that's what needed.

Now my question is is there a way to change/specify this amount of "reserved" space manually?

Also is there a way where you can see the actual disk usage for every mounted partition including the hidden "reserved" space? Because sometimes this mismatch makes the output of df very confusing!

I am attaching output of df, and fdisk from my NFS server. The amount of reserved space seems to be close to 5% of the total partition size.

Code:
[root@cretaceous ~]# df -a
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/sda2             14877092   3788520  10320668  27% /
proc                         0         0         0   -  /proc
sysfs                        0         0         0   -  /sys
devpts                       0         0         0   -  /dev/pts
/dev/sda5            1399271668 1230547024  96499220  93% /export
/dev/sda1               101086     33459     62408  35% /boot
tmpfs                  1027440         0   1027440   0% /dev/shm
none                         0         0         0   -  /proc/sys/fs/binfmt_misc
sunrpc                       0         0         0   -  /var/lib/nfs/rpc_pipefs
nfsd   
[root@cretaceous ~]# fdisk -l

Disk /dev/sda: 1499.2 GB, 1499212021760 bytes
255 heads, 63 sectors/track, 182268 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14        1925    15358140   83  Linux
/dev/sda3            1926        2435     4096575   82  Linux swap / Solaris
/dev/sda4            2436      182268  1444508572+   5  Extended
/dev/sda5            2436      182268  1444508541   83  Linux
[root@cretaceous ~]# cat /etc/fstab 
LABEL=/                 /                       ext3    defaults        1 1
LABEL=/export           /export                 ext3    defaults        1 2
LABEL=/boot             /boot                   ext3    defaults        1 2
tmpfs                   /dev/shm                tmpfs   defaults        0 0
devpts                  /dev/pts                devpts  gid=5,mode=620  0 0
sysfs                   /sys                    sysfs   defaults        0 0
proc                    /proc                   proc    defaults        0 0
LABEL=SWAP-sda3         swap                    swap    defaults        0 0
                      0         0         0   -  /proc/fs/nfsd
 
Old 02-21-2011, 04:29 PM   #2
corp769
Guru
 
Registered: Apr 2005
Posts: 5,798

Rep: Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978
Use tune2fs as such:

Code:
tune2fs -m 1 /dev/sdaX
Where the 1 is for 1 percent. Change at your discretion. Hope this helps!
 
1 members found this post helpful.
Old 02-21-2011, 07:32 PM   #3
someshpr
Member
 
Registered: Jul 2009
Location: PA, USA
Distribution: Debian, RHEL5.4, CentOS 5.4
Posts: 105

Original Poster
Rep: Reputation: 26
Quote:
Originally Posted by corp769 View Post
Use tune2fs as such:

Code:
tune2fs -m 1 /dev/sdaX
Where the 1 is for 1 percent. Change at your discretion. Hope this helps!
Thanks!
Seems like tune2fs is the command I was looking for. And tune2fs -l is the command I need to see the details.

Last edited by someshpr; 02-21-2011 at 07:33 PM.
 
Old 02-21-2011, 07:35 PM   #4
corp769
Guru
 
Registered: Apr 2005
Posts: 5,798

Rep: Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978Reputation: 978
No problem! Mark your thread as [SOLVED] if you are fully satisfied, thanks!
 
  


Reply

Tags
df, fdisk, partitionssize


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 On
HTML code is Off
Trackbacks are Off
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Partition size mismatch Changes Linux - Newbie 5 03-08-2009 08:40 AM
Mismatch file size liamkincaid25 Linux - Newbie 11 07-28-2008 10:16 AM
apt-get Failed to fetch...Size mismatch noeffort Linux - Software 2 03-24-2007 02:55 PM
usb disc - size mismatch ungua Linux - Hardware 7 12-08-2006 06:16 AM
apt-get - Size mismatch jayprakash Debian 9 04-07-2006 01:43 AM


All times are GMT -5. The time now is 04:46 PM.

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration