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

Notices


Reply
  Search this Thread
Old 01-25-2007, 07:13 PM   #1
cpd05
Member
 
Registered: Jan 2006
Distribution: Debian
Posts: 90

Rep: Reputation: 15
Why has my / partition full???


Hey

I have debian sarge installed on a ~20Gb partition of my hd, the / partition is 3.1Gb, with the rest divided up between /home /usr/local and /opt.

I've just been getting messages saying the / partition is full and df reports back:
Filesystem 1K-blocks Used Available Use% Mounted on
/dev/hda2 3236856 3179732 0 100% /
tmpfs 501860 8 501852 1% /dev/shm
/dev/hda5 5751984 951404 4508388 18% /home
/dev/hda7 5342808 459496 4611912 10% /opt
/dev/hda6 5335248 445328 4618896 9% /usr/local
tmpfs 10240 2788 7452 28% /dev


I searched around the hd and, according to xfce, the /usr partition is 2.8Gb - isnīt that on the big side? Inside /usr the share and lib directories are reported as about 750Mb a piece but when looking inside I canīt seem to find any folders that are big to be taking up this amount of space.

So help would be appreciated.

Thanks

Chris
 
Old 01-25-2007, 07:18 PM   #2
wjevans_7d1@yahoo.co
Member
 
Registered: Jun 2006
Location: Mariposa
Distribution: Slackware 9.1
Posts: 938

Rep: Reputation: 31
Try this command:

du -s /*
 
Old 01-25-2007, 07:25 PM   #3
cpd05
Member
 
Registered: Jan 2006
Distribution: Debian
Posts: 90

Original Poster
Rep: Reputation: 15
2948 /bin
12960 /boot
0 /cdrom
2900 /dev
34836 /etc
919772 /home
4 /initrd
0 /initrd.img.old
4 /john-wordlists.spec
76824 /lib
12 /media
12 /mnt
426688 /opt
918803 /proc
400 /root
3876 /sbin
4 /srv
0 /sys
32 /tmp
2877072 /usr
550336 /var
0 /vmlinuz.old

you see /usr is big. What now mate?
 
Old 01-26-2007, 02:19 AM   #4
JimBass
Senior Member
 
Registered: Oct 2003
Location: New York City
Distribution: Debian Sid 2.6.32
Posts: 2,100

Rep: Reputation: 49
I think your partition scheme needs a little help. By default, Debian does not use an /opt partition. Obviously you can create one, and since you have data in it you're obviously using it, just letting you know that's not "normal", but in no way bad. I'm a big fan of /usr/local myself, but I can't see giving it its own partition, particularly not one 5 Gb in size.

I have a setup on my laptop of similar size to yours. My entire space is 22 Gb, and I am using almost 80% of it -
Code:
jim@jimsworktop:~$ df
Filesystem           1K-blocks      Used Available Use% Mounted on
/dev/hda6             22377808  17545772   4832036  79% /
tmpfs                   128084         0    128084   0% /lib/init/rw
udev                     10240        80     10160   1% /dev
tmpfs                   128084         0    128084   0% /dev/shm
/dev/hda3                96376     65176     31200  68% /boot
By the way, my /usr partition eats up 5.5 Gb of space, and only 241 Mb of that is /usr/local.
Code:
jim@jimsworktop:~$ sudo du -hs /usr
Password:
5.5G    /usr
jim@jimsworktop:~$ sudo du -hs /usr/local
241M    /usr/local
So finding your /usr partition has 2.8 Gb is not at all on the big side, it rather is on the small!

At this point, you can keep the install. I would first backup anything important to a USB drive, or burn it off to Cd or DVD, just in case. Then boot with knoppix, or any of the live CD family. Personally, since you're using less than .5 Gb in both usr/local and /opt, I'd steal maybe 2.5 Gb from each of them, and drop that space back into the root partition. So by using the live disk, shrinking both /opt and /usr/local to 2.5 Gb each, you can expand the root partition / to be 8 Gb in size.

You're learning the hard way that not planning what the use of the space will be can return to bite you in the proverbial behind! I wouldn't over partition a home machine either. I run plenty of servers, where every directory off the root has its own partition, yet on my home machines, I make only /boot and /, or /boot, /home, and /.

You could also reinstall if there is nothing of great importance on this box. Sarge is really not the best place for a home-type system. it is intended for the super stable 100% uptime with no changes server type of build. There is no problem with using it for a home system, but that rarely is a good fit for it. Since etch will go stable very soon, you may want to upgrade to testing/etch. That won't effect your problem any, but you may find it much better behaved for a desktop.

Peace,
JimBass

Last edited by JimBass; 01-26-2007 at 02:21 AM.
 
Old 01-30-2007, 11:13 AM   #5
CrashedAgain
Member
 
Registered: Jan 2004
Posts: 307

Rep: Reputation: 33
your /usr is not abnormally large but /var is.

here is mine:
Code:
crashedagain@Desktop:~$ sudo du -s /var
223204  /var
crashedagain@Desktop:~$ sudo du -s /usr
2142604 /usr
crashedagain@Desktop:~$
do sudo du -s /var/* to see where the space is used. You may find that the system is storing a large amount of old log files.

do apt-get clean to remove any accumulated .deb packages in /var/cache/apt/archives.
Code:
dpkg-query -W --showformat='${Installed-Size} ${Package}\n' | sort -n
will list all your installed packages sorted by size; you can then identify and apt-get remove any unnecessary packages (use apt-get --purge remove to also remove the config files).

do deborphan to identify any stray lib files that are not part of an installed package.
Code:
deborphan | xargs apt-get -y remove
will remove these.

I would also agree with JimBass' advice to restructure your partitions.
I use only two, / and /home; both are about 5GB.
 
Old 01-30-2007, 11:23 AM   #6
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Here is my freshly installed SID:

Code:
/dev/hda2             4,6G  2,9G  1,5G  66% /
tmpfs                 249M     0  249M   0% /lib/init/rw
udev                   10M   68K   10M   1% /dev
tmpfs                 249M     0  249M   0% /dev/shm
/dev/hda3             3,7G   91M  3,4G   3% /home
/dev/hda4             2,2G  1,6G  512M  76% /var
If you add my /var and / you end up with 4.5G and the install is from yesterday. I have nothing in /opt and nothing in /usr/local.
While on your system you have 3.2G, so the problem lies in your partitioning...
/ is way too small.
 
Old 01-30-2007, 02:51 PM   #7
CrashedAgain
Member
 
Registered: Jan 2004
Posts: 307

Rep: Reputation: 33
nx5000, your /var is 8 times the size of mine! What do you have in there?
 
Old 01-30-2007, 02:52 PM   #8
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Which means you have 700Meg in /var if I'm right?

Try to do a dist-upgrade from stable to unstable and you will see

In var lies the apt cache. If I remember well, for dist-upgrade a complete system, you need at least 1G
 
Old 01-30-2007, 03:07 PM   #9
CrashedAgain
Member
 
Registered: Jan 2004
Posts: 307

Rep: Reputation: 33
Yes, my /var is currently 2.2 meg which I think is a typical size if there is not a lot in /var/cache/apt/archives.

and yes, a system upgrade usually requires somewhere between 600M & 1G. I have just over 2G free on / if I need it (/var is not on a separate partition).

I have another system on an old laptop which has only 2.5G total for / (including /home which is not on a separate partition). Upgrading that one is difficult, I have to do it bit-by-bit...install the big upgrades like OpenOffice separately then apt-get clean to keep the space available. It has only 6G total and is dual boot winME/Kanotix with most of the data files in a separate shared vfat partition, not in /home.
 
Old 01-31-2007, 05:09 AM   #10
nx5000
Senior Member
 
Registered: Sep 2005
Location: Out
Posts: 3,307

Rep: Reputation: 57
Last time I did an upgrade I had no more room on the complete harddisk and was stuck in the middle of the dist-upgrade, like apt-get stops with an error no more disk space, was funny.
I had to mount a share with ftp to put my /var/apt/cache on internet lol

But my /var is a bit of a waste because most of the time its far from beeing full..
 
  


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
Partition full giraf Debian 10 08-10-2006 09:08 AM
root partition gets full when using cp -a on another partition timsch75 Linux - General 2 10-02-2005 06:41 AM
What Happens when your partition is full? Echo Kilo Linux - General 4 05-30-2005 07:36 PM
Full Partition PhuckFonix Linux - Newbie 4 05-09-2004 04:55 PM
why the partition is full? xyfan Linux - Newbie 4 11-09-2003 05:24 PM

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

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