LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu
User Name
Password
Ubuntu This forum is for the discussion of Ubuntu Linux.

Notices


Reply
  Search this Thread
Old 03-09-2009, 08:06 PM   #1
redhawk1973
Member
 
Registered: Jul 2003
Location: Woodbridge VA
Distribution: Red Hat, Suse, AIX, Fedora, Cent OS, Ubuntu, Mint Linux
Posts: 58

Rep: Reputation: 18
root partition full


Can someone help me figure this out.
It states that it has no space left on the drive

#sudo df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda1 143G 141G 0 100% /
tmpfs 1012M 0 1012M 0% /lib/init/rw
varrun 1012M 116K 1012M 1% /var/run
varlock 1012M 0 1012M 0% /var/lock
udev 1012M 3.0M 1009M 1% /dev
tmpfs 1012M 12K 1012M 1% /dev/shm
lrm 1012M 2.0M 1010M 1% /lib/modules/2.6.27-11-generic/volatile
/dev/sdd1 111G 67G 39G 64% /home

did a du -sh on each of the directory

6.1M bin
31M boot
3.0M /dev
16M /etc
4.0K /initr
247M lib
16K lost+found
138M opt
7.7M root
7.3M sbin
2.9G usr
400M var

As you can see this does not total up to 141G
the home directory is mounted on a different drive
 
Old 03-10-2009, 04:54 AM   #2
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
What about /tmp ?
 
Old 03-10-2009, 06:02 AM   #3
syg00
LQ Veteran
 
Registered: Aug 2003
Location: Australia
Distribution: Lots ...
Posts: 21,120

Rep: Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120Reputation: 4120
Do this instead - might take a while ...
Code:
sudo du / -x --max-depth=1 | sort -nr | less
 
Old 03-10-2009, 07:00 AM   #4
emi_ramo
Member
 
Registered: Apr 2007
Location: Barcelona, Spain
Distribution: Debian, KUbuntu
Posts: 213

Rep: Reputation: 36
Also, have in mind that normal & modern linuxes take a 10% of your partitions just to prevent them from collapse. Think, transactional partitions need more space for doing operations, so completely full partitions are unusable. So, if it is "full", you still can load your own system (no rescue/live cd needed) and free some space.

Ah! du is not at all a good solution, because if your partition is divided in 4096bytes blocks, a file with just 1 byte will be seen as 1 byte file by du, but it will be filling an entire block, so 4096 bytes will be locked.

emi

Edit: 'du' DOES count sizes by partition block size. See below.

Last edited by emi_ramo; 03-10-2009 at 10:09 AM.
 
Old 03-10-2009, 07:58 AM   #5
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 356

Rep: Reputation: 43
Quote:
Originally Posted by emi_ramo View Post

Ah! du is not at all a good solution, because if your partition is divided in 4096bytes blocks, a file with just 1 byte will be seen as 1 byte file by du, but it will be filling an entire block, so 4096 bytes will be locked.

emi
What do you propose as the more suitable alternative?
 
Old 03-10-2009, 08:41 AM   #6
emi_ramo
Member
 
Registered: Apr 2007
Location: Barcelona, Spain
Distribution: Debian, KUbuntu
Posts: 213

Rep: Reputation: 36
'df' is the only one, I suppose. The only problem with 'df' is the percentage: 99,6% full will be seen as 100%, just it.
Just a trick: 'df' doesn't need root privileges to be run: it's ok to run it as a normal user (without 'sudo' or 'su').

Edit: 'du' DOES count sizes by partition block size. See below.

Last edited by emi_ramo; 03-10-2009 at 10:09 AM.
 
Old 03-10-2009, 09:37 AM   #7
TBC Cosmo
Member
 
Registered: Feb 2004
Location: NY
Distribution: Fedora 10, CentOS 5.4, Debian 5 Sparc64
Posts: 356

Rep: Reputation: 43
Quote:
Originally Posted by emi_ramo View Post
'df' is the only one, I suppose.
I mean for displaying the disk usage of files/directories within the mounted filesystems.

Last edited by TBC Cosmo; 03-10-2009 at 09:38 AM.
 
Old 03-10-2009, 09:59 AM   #8
Linux.tar.gz
Senior Member
 
Registered: Dec 2003
Location: Paris
Distribution: Slackware forever.
Posts: 2,534

Rep: Reputation: 100Reputation: 100
du -sk / .[0-9A-Za-z]* | sort -n
 
Old 03-10-2009, 10:07 AM   #9
emi_ramo
Member
 
Registered: Apr 2007
Location: Barcelona, Spain
Distribution: Debian, KUbuntu
Posts: 213

Rep: Reputation: 36
Sorry to all. I correct myself: 'du' DOES count sizes by block size. It's ok to use it as a real disk usage tool. Only keep in mind that numbers shown by plain 'du' are in kB. So a file with just 1 byte will show a '4' in a 4kB block size partition. I'll now correct previous posts to prevent errors to others

Edit: syg00 first post is what probably you're looking for.

Last edited by emi_ramo; 03-10-2009 at 10:11 AM.
 
  


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
root partition full trashbird1240 Slackware 10 05-27-2008 09:04 PM
root partition full laan97ac Mandriva 6 07-23-2007 01:09 PM
Root partition full juleslinux Red Hat 4 01-12-2006 10:00 AM
root ('/') partition is FULL inon^ Linux - Hardware 2 08-08-2005 01:19 PM
Root partition is full, what now? Joe Soap Linux - Newbie 30 03-31-2005 11:38 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Distributions > Ubuntu

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