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 - Distributions > Slackware
User Name
Password
Slackware This Forum is for the discussion of Slackware Linux.

Notices


Reply
  Search this Thread
Old 01-31-2010, 03:07 PM   #1
agi93
Member
 
Registered: Jan 2010
Posts: 101

Rep: Reputation: 17
Where did all my disk space go?


Today I was installing a lot of software since I'm just setting up my Slackware system again after a fresh install, and I realized that my root partition has very little space left. Here is the output of df -h:

Code:
Filesystem            Size  Used Avail Use% Mounted on
/dev/root              19G   17G  931M  95% /
/dev/sda5             7.6G  2.0G  5.2G  28% /var
/dev/sda7              86G  527M   81G   1% /home
tmpfs                 999M     0  999M   0% /dev/shm
/dev/sda2              28G   25G  3.4G  88% /mnt/windows
As you can see, I have a 20G (19G here for some reason) root partition, 8G /var, and 86G of /home. I thought this would be plenty since many recent recommendations for / are 10-15G. Now, though, 17G are used up for some reason! How is this possible? I thought a full slackware install only had about 4G of software! I don't have any music or movies or any crazy huge files that I know of, and those would be in my /home directory anyway. Is there any way I can see which files are taking up all this space?

If it's necessary to allocate more space to my / partition, is it still possible to boot up a GParted live Cd, shrink /home a bit, move some partitions to the right, and expand my root partition? I would REALLY prefer I don't have to reinstall since I just spent a ton of time setting up my system again, but if worst comes to worst ... :'-(

In case you're curious, here's my /etc/fstab:

Code:
/dev/sda6        swap             swap        defaults         0   0
/dev/sda3        /                ext4        defaults         1   1
/dev/sda5        /var             ext4        defaults         1   2
/dev/sda7        /home            ext4        defaults         1   2
/dev/sda2        /mnt/windows     ntfs-3g     umask=022        1   0
#/dev/cdrom      /mnt/cdrom       auto        noauto,owner,ro  0   0
/dev/fd0         /mnt/floppy      auto        noauto,owner     0   0
devpts           /dev/pts         devpts      gid=5,mode=620   0   0
proc             /proc            proc        defaults         0   0
tmpfs            /dev/shm         tmpfs       defaults         0   0
Thanks everyone!
 
Old 01-31-2010, 03:13 PM   #2
agi93
Member
 
Registered: Jan 2010
Posts: 101

Original Poster
Rep: Reputation: 17
Well, looks like I found out the problem was my /tmp was loaded with garbage from all the builds I've done. However, I still have 7.9/19 gigs used in my root partition, and I don't know if I have enough space. Like I said, is it still possible and safe to boot up GParted and resize my /home and expand / ?

And why doesn't /tmp get cleared after a reboot? I was under the impression it always did that.
 
Old 01-31-2010, 03:14 PM   #3
Dinithion
Member
 
Registered: Oct 2007
Location: Norway
Distribution: Slackware 14.1
Posts: 446

Rep: Reputation: 59
Wow! That's a lot of used space for a fresh system. This is just a shot in the blind for my part, but error logs often use several GB when something wrong happens continuously. In example I had an .xsession-error file of 2GB if I recall correctly, and I have had another log file that was 9GB.

So I would check out /root og /tmp to see if there is some log files there building up in size. You might as well check /var even though it's on a separate partition.

Last edited by Dinithion; 01-31-2010 at 03:16 PM.
 
Old 01-31-2010, 03:33 PM   #4
agi93
Member
 
Registered: Jan 2010
Posts: 101

Original Poster
Rep: Reputation: 17
Alright, there were no log files or anything in /root. /var seems fine and not too much is being used there. It is worth mentioning that I have installed some huge packages like texlive, and I'm installing go-openoffice at the moment. Is 19G sufficient for a root partition on slackware? I was also thinking of shrinking /home and allocating about 10-12G or so to a new /tmp partition with GParted, but I don't know what I would put in /etc/fstab to change /tmp to the new partition. I have and am installed/ing lots of big packages with sbopkg, and I might decide to do a mass recompile for some reason in the future (reinstall, optimizations, etc.).
 
Old 01-31-2010, 03:56 PM   #5
w1k0
Senior Member
 
Registered: May 2008
Location: Poland
Distribution: Slackware (personalized Window Maker), Mint (customized MATE)
Posts: 1,309

Rep: Reputation: 234Reputation: 234Reputation: 234
Quote:
Originally Posted by agi93 View Post
And why doesn't /tmp get cleared after a reboot? I was under the impression it always did that.
To clean /tmp directory on shutdown put in /etc/rc.d/ directory file rc.local_shutdown:

Code:
/usr/bin/find /tmp -mindepth 1 -maxdepth 1 -print0 | xargs -0r /bin/rm -fr
 
Old 01-31-2010, 04:00 PM   #6
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,225

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
This is why I put the following in my fstab:

Code:
tmpfs            /tmp             tmpfs       defaults         0   0
It mounts /tmp on a RAM drive.
 
Old 01-31-2010, 04:09 PM   #7
agi93
Member
 
Registered: Jan 2010
Posts: 101

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by dugan View Post
This is why I put the following in my fstab:

Code:
tmpfs            /tmp             tmpfs       defaults         0   0
It mounts /tmp on a RAM drive.
That looks interesting, but I only have 2G of RAM and 2250M of swap. Won't that cause some problems if I'm compiling some large packages?
 
Old 01-31-2010, 04:43 PM   #8
manwichmakesameal
Member
 
Registered: Aug 2006
Distribution: Slackware
Posts: 804

Rep: Reputation: 110Reputation: 110
Nope, and actually rworkman had a post on here about mounting it that way too. Ahhhh, here it is. Link.
 
Old 01-31-2010, 04:53 PM   #9
agi93
Member
 
Registered: Jan 2010
Posts: 101

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by manwichmakesameal View Post
Nope, and actually rworkman had a post on here about mounting it that way too. Ahhhh, here it is. Link.
Robby is saying to set TMP and OUTPUT to totally different directories, so what exactly does that solve? If I make directories on my root partition and set those variables to those directories, then what did I accomplish beyond just leaving /tmp on root?

The tmpfs thing looks pretty cool, though.
 
Old 01-31-2010, 04:56 PM   #10
manwichmakesameal
Member
 
Registered: Aug 2006
Distribution: Slackware
Posts: 804

Rep: Reputation: 110Reputation: 110
I was talking more about mounting /tmp on tmpfs. Regarding the TMP and OUTPUT, you can specify what directory to use instead of /tmp and you can set OUTPUT to a dir that all your packages can go. You aren't really accomplishing anything much different than using /tmp. If you have /tmp mounted on tmpfs though, you will lose everything in there when you reboot. That's what OUTPUT is good for.

Last edited by manwichmakesameal; 01-31-2010 at 04:58 PM.
 
Old 01-31-2010, 05:08 PM   #11
agi93
Member
 
Registered: Jan 2010
Posts: 101

Original Poster
Rep: Reputation: 17
Would it be a bad idea to export OUTPUT to ~/src/packages with my /etc/profile? I want to make sure it doesn't break anything and that it will actually set the SlackBuild output globally.

Also, if I wanted to keep my system up for a long time and didn't feel like rebooting to clear out /tmp (on tmpfs), would a good old rm -rf /tmp/* do the trick or does having tmpfs complicate things?
 
Old 01-31-2010, 05:51 PM   #12
manwichmakesameal
Member
 
Registered: Aug 2006
Distribution: Slackware
Posts: 804

Rep: Reputation: 110Reputation: 110
Some stuff you want to leave in /tmp. AFAIK, you should be able to set OUPUT. I would set it in my ~/.bash_profile or ~/.bashrc though. You could also set it when you run the script like:
Code:
you@localhost# TMP=/your/tmp/dir OUTPUT=/your/output/dir ./appname.SlackBuild
 
Old 01-31-2010, 06:17 PM   #13
agi93
Member
 
Registered: Jan 2010
Posts: 101

Original Poster
Rep: Reputation: 17
Quote:
Originally Posted by manwichmakesameal View Post
Some stuff you want to leave in /tmp. AFAIK, you should be able to set OUPUT. I would set it in my ~/.bash_profile or ~/.bashrc though. You could also set it when you run the script like:
Code:
you@localhost# TMP=/your/tmp/dir OUTPUT=/your/output/dir ./appname.SlackBuild
Thanks. The only thing I really have in /tmp is packages and build files for when I want to build some software. It seems like that stuff would be pretty useless once I install the package (and I'm planning on keeping new packages in ~/src/packages anyway).
 
Old 01-31-2010, 09:05 PM   #14
dugan
LQ Guru
 
Registered: Nov 2003
Location: Canada
Distribution: distro hopper
Posts: 11,225

Rep: Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320Reputation: 5320
Quote:
Originally Posted by agi93 View Post
That looks interesting, but I only have 2G of RAM and 2250M of swap. Won't that cause some problems if I'm compiling some large packages?
You can set TMP to another directory just for that SlackBuild.

TMP=/wherever ./whatever.SlackBuild

Most SlackBuilds won't be a problem, and they'll build lightning-fast because you've cut out the disk access.

Last edited by dugan; 01-31-2010 at 09:06 PM.
 
Old 01-31-2010, 09:13 PM   #15
agi93
Member
 
Registered: Jan 2010
Posts: 101

Original Poster
Rep: Reputation: 17
Well I used the tmpfs line in my /etc/fstab and tested it by creating this gigantic text file with vim in /tmp (it was about 1.2GB in size) and saving it. I was monitoring the output of df -h as I did it, and as soon as it hit 999MB (I have 2GB of RAM) it stopped with a "file system full?" error. What if I'm building a gigantic package with sbopkg? If I just set the TMP variable to something else on the filesystem, I haven't really accomplished much with trying to prevent so much space from being used.

Also, now that I use this tmpfs, sbopkg always asks to create the necessary directories in /tmp when I start it because it gets cleared when I reboot. How do I make it so it doesn't bother me about this? Maybe it's a better idea to go in sbopkg.conf and set it's TMP variables to /tmp instead of /tmp/sbopkg or whatever (unless that'll just cause a big mess)?
 
  


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 space and disk space usage and free don't match nsic Linux - Newbie 3 02-22-2013 12:57 PM
hard disk partitioning/I am out of space /how to increase linux space? RMLinux Red Hat 8 09-05-2008 12:33 PM
add space to / when from spare space on disk ctsiow Linux - General 4 11-07-2007 07:55 AM
Cedega "Disk space required for the installation exceeds available disk space" Solved Spewdemon LinuxQuestions.org Member Success Stories 1 10-18-2007 06:19 PM
3Gb of disk space lost! Disk space problem or mother board conflicts with HDD Mistreated Linux - Hardware 4 12-06-2004 03:58 PM

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

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