LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Server
User Name
Password
Linux - Server This forum is for the discussion of Linux Software used in a server related context.

Notices


Reply
  Search this Thread
Old 09-26-2010, 03:02 AM   #1
mario.almeida
Member
 
Registered: May 2008
Location: India
Distribution: Ubuntu 10.04, CentOS, Manjaro
Posts: 179

Rep: Reputation: 27
Question how to check disk space


Hi All,

Code:
df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              50G   47G  602M  99% /

How to find why Avail space shows only 602M?
 
Old 09-26-2010, 03:12 AM   #2
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

Most often this shows that the logfiles are growing (too big). First cd into /var/log and check the sizes of the log files.

If that doesn't solve it: You can see which directories are the biggest and zoom in with the following command:

du -sh *

Start at the root dir (/), locate the directory that shows the largest size and cd to it. Issue the du command again etc.

Hope this helps.
 
Old 09-26-2010, 03:37 AM   #3
mario.almeida
Member
 
Registered: May 2008
Location: India
Distribution: Ubuntu 10.04, CentOS, Manjaro
Posts: 179

Original Poster
Rep: Reputation: 27
Well, I used du command to check the usage but was unable to find the cause.

Below is the output

Code:
df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda3              50G   47G  595M  99% /
/dev/sda5              17G   12G  4.4G  73% /bkup
/dev/sda1              97M   13M   80M  14% /boot
none                  3.5G     0  3.5G   0% /dev/shm
/dev/sda2              60G  7.8G   49G  14% /usr
nfs-server:/data/nfs/RT
                      346G  245G   83G  75% /usr/isa/aares/reports-06
Code:
39G	backups
6.5M	bin
12G	bkup
7.3M	boot
168K	dev
52M	etc
780M	home
8.0K	initrd
90M	lib
20M	lib64
16K	lost+found
24K	media
8.0K	misc
8.0K	mnt
8.0K	opt
du: cannot access `proc/7732/task/14095/fd/194': No such file or directory
du: cannot access `proc/7732/task/22403/fd/206': No such file or directory
du: cannot access `proc/7732/task/22403/fd/207': No such file or directory
du: `proc/6532': No such file or directory
du: `proc/6533': No such file or directory
du: `proc/6536': No such file or directory
du: `proc/6539': No such file or directory
du: `proc/6542': No such file or directory
du: `proc/6543': No such file or directory
du: `proc/6549': No such file or directory
du: `proc/6550': No such file or directory
du: `proc/6551': No such file or directory
du: `proc/6571': No such file or directory
du: `proc/6572': No such file or directory
du: `proc/6573': No such file or directory
7.9G	proc
52M	root
20M	sbin
0	selinux
8.0K	srv
0	sys
96M	tmp
8.7G	usr
1.7G	var
70G	total
 
Old 09-26-2010, 03:45 AM   #4
jean-michel
Member
 
Registered: Mar 2004
Location: 78 france
Posts: 31
Blog Entries: 1

Rep: Reputation: 0
all is on the screen your backup folders take a lot of room
49G +12G
and /usr
 
Old 09-26-2010, 03:47 AM   #5
jean-michel
Member
 
Registered: Mar 2004
Location: 78 france
Posts: 31
Blog Entries: 1

Rep: Reputation: 0
39G sorry
 
Old 09-26-2010, 04:02 AM   #6
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

/bkup is on a different mounted partition, you don't have to take this one into account.

/backups seems to be the culprit and to a lesser extend /usr (both part of /).

Have a look at /backups and (re)move what isn't needed.

Hope this helps.
 
Old 09-26-2010, 05:46 AM   #7
mario.almeida
Member
 
Registered: May 2008
Location: India
Distribution: Ubuntu 10.04, CentOS, Manjaro
Posts: 179

Original Poster
Rep: Reputation: 27
Yes /backups is 39G

50 - 39 = 11G for all other then /backups, /bkup and /usr

50 - 47 = 3G

My question is about 3GB which is free and not shown in df ouput
 
Old 09-26-2010, 06:14 AM   #8
TobiSGD
Moderator
 
Registered: Dec 2009
Location: Germany
Distribution: Whatever fits the task best
Posts: 17,148
Blog Entries: 2

Rep: Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886Reputation: 4886
Don't forget the 5% spare space for the root account.
 
1 members found this post helpful.
Old 09-26-2010, 06:16 AM   #9
druuna
LQ Veteran
 
Registered: Sep 2003
Posts: 10,532
Blog Entries: 7

Rep: Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405Reputation: 2405
Hi,

If a file system is created using default options, 5% is reserved for root use only and not available for normal users.

50G -> 5% = 2.5G for root use only.
2.5G + 600M -> 3G

Hope this clears things up.
 
1 members found this post helpful.
  


Reply

Tags
diskspace



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
how to check my disk free space sanjay2004 Linux - Server 8 04-24-2010 12:09 AM
disk space check myint45 Programming 6 01-24-2008 08:26 PM
How do you check disk space? verlaine Linux - Software 4 11-12-2006 01:57 PM
How do you check disk space? tim1348 Linux - Newbie 10 10-31-2006 09:39 AM
Yum - check for disk space maimonoded Linux - Software 0 03-31-2005 09:23 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Server

All times are GMT -5. The time now is 05:26 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