LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
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 03-08-2010, 03:53 AM   #1
Leirith
LQ Newbie
 
Registered: Jan 2008
Posts: 6

Rep: Reputation: 0
Question What is taking up all the space on sda6?


Hi everyone,

I have run out of space in /var, and the following output confirms that there is no space on the partition mounted to /var.


lukee@au-web-1:/var$ df –h

Filesystem Size Used Avail Use% Mounted on
/dev/sda1 327M 152M 158M 50% /
tmpfs 2.0G 0 2.0G 0% /lib/init/rw
udev 10M 808K 9.3M 8% /dev
tmpfs 2.0G 390M 1.6G 20% /dev/shm
/dev/sda9 249G 3.0G 234G 2% /home
/dev/sda8 373M 11M 343M 3% /tmp
/dev/sda5 4.6G 588M 3.8G 14% /usr
/dev/sda6 2.8G 2.7G 7.0M 100% /var


The next part is where it gets confusing. What is taking up all of the space? I examine /var with the following command:


lukee@au-web-1:/var$ sudo du -skh /var
60M /var


May I ask for some help in identifying what is taking up the remaining 2.7G or more on this filesystem?

Thank you.

Last edited by Leirith; 03-08-2010 at 03:54 AM.
 
Old 03-08-2010, 04:04 AM   #2
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 97
sudo fsck /dev/sda6
sudo du -hs /var/*

Last edited by troop; 03-08-2010 at 04:07 AM.
 
Old 03-08-2010, 06:34 AM   #3
AlucardZero
Senior Member
 
Registered: May 2006
Location: USA
Distribution: Debian
Posts: 4,824

Rep: Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615Reputation: 615
unmount /var

If it won't let you, reboot, or kill the processes using /var, then unmount it. Use "fuser -cu /var" to list the processes using it. THEN fsck.

On the other hand, if you have a runaway process holding large files open, merely unmounting /var may fix your problem.
 
1 members found this post helpful.
Old 03-08-2010, 09:43 AM   #4
troop
Member
 
Registered: Feb 2010
Distribution: gentoo, arch, fedora, freebsd
Posts: 379

Rep: Reputation: 97
mount -o remount,ro /var is better, IMHO.
 
Old 03-08-2010, 10:58 AM   #5
raju.mopidevi
Senior Member
 
Registered: Jan 2009
Location: vijayawada, India
Distribution: openSUSE 11.2, Ubuntu 9.0.4
Posts: 1,155
Blog Entries: 12

Rep: Reputation: 92
Hi Leirith,
this link has a article which say every directory under /var.

/var/log

Log files from the system and various programs/services, especially login (/var/log/wtmp, which logs all logins and logouts into the system) and syslog (/var/log/messages, where all kernel and system program message are usually stored). Files in /var/log can often grow indefinitely, and may require cleaning at regular intervals. Something that is now normally managed via log rotation utilities such as 'logrotate'. This utility also allows for the automatic rotation compression, removal and mailing of log files. Logrotate can be set to handle a log file daily, weekly, monthly or when the log file gets to a certain size. Normally, logrotate runs as a daily cron job. This is a good place to start troubleshooting general technical problems.


so please check the size of the /var/log. It may be possible that it's size may increase indefinitely.
 
Old 03-08-2010, 05:48 PM   #6
Leirith
LQ Newbie
 
Registered: Jan 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Question

Thanks AlucardZero and everyone who replied. I ran AZ's and troop's advice and all looks well again.

$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 327M 152M 158M 50% /
tmpfs 2.0G 0 2.0G 0% /lib/init/rw
udev 10M 808K 9.3M 8% /dev
tmpfs 2.0G 46M 1.9G 3% /dev/shm
/dev/sda9 249G 3.0G 234G 2% /home
/dev/sda8 373M 11M 343M 3% /tmp
/dev/sda5 4.6G 563M 3.9G 13% /usr
/dev/sda6 2.8G 159M 2.5G 6% /var

Last edited by Leirith; 03-14-2010 at 10:42 PM. Reason: The problem has returned
 
Old 03-14-2010, 10:41 PM   #7
Leirith
LQ Newbie
 
Registered: Jan 2008
Posts: 6

Original Poster
Rep: Reputation: 0
Hey folks,

The problem seems to have resurfaced since I performed the above commands. Something is slowly filling sda6 and /var is staying the same size. Could anyone offer insight into how this could be happening, and what to do about it?

Thanks!
 
Old 03-15-2010, 02:29 AM   #8
vendtagain
Member
 
Registered: Sep 2009
Distribution: Slackware, Debian, Mac OS X, Zenwalk, Puppy, Gentoo
Posts: 199

Rep: Reputation: 32
what I do to track down what is taking up space is to use the command:

sudo du -a -h --max-depth=1

this will show you the size of all files and folders in the current directory, just start from the root directory and look which dir has lots of space, cd to that directory and type the command again.

note: you can do this without sudo, but it will probably spit out alot of "permission denied" errors as the command traverses all dirs.
 
Old 03-15-2010, 03:07 AM   #9
catkin
LQ 5k Club
 
Registered: Dec 2008
Location: Tamil Nadu, India
Distribution: Debian
Posts: 8,578
Blog Entries: 31

Rep: Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208Reputation: 1208
One possibility is open unlinked files; these will not show up in du output but are counted in df's "used" total. See here, here and here for how to find them. rsync is one program that writes to unlinked open files.
 
Old 04-17-2012, 02:54 PM   #10
Poki
LQ Newbie
 
Registered: Apr 2009
Posts: 21

Rep: Reputation: 0
Quote:
Originally Posted by catkin View Post
One possibility is open unlinked files; these will not show up in du output but are counted in df's "used" total. See here, here and here for how to find them. rsync is one program that writes to unlinked open files.
this helped me.. i had a process running. which when i killed it.. freed a lot of space.. thank you
 
  


Reply

Tags
disk full



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
Why is Fedora 10 64-bit taking 10GB of space? LloydM Fedora 3 02-17-2009 10:14 PM
ubuntu gutsy taking up 15 gb of space paulwall Ubuntu 12 03-13-2008 11:09 AM
Deleted files taking up space airwolf2 Linux - Newbie 2 12-09-2007 02:42 PM
Simple Question - How much space is a dir taking up? elitecodex Linux - Newbie 4 06-22-2005 09:17 AM
Symbolic Links taking up space?! N2technology Linux - General 7 01-02-2002 01:37 AM

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

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