LinuxQuestions.org
Review your favorite Linux distribution.
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 06-05-2013, 10:23 PM   #1
rabirk
Member
 
Registered: Dec 2012
Location: Maryland, US
Distribution: Debian
Posts: 87
Blog Entries: 8

Rep: Reputation: Disabled
Running out of storage; system ignoring home partition


My laptop has 500 GB of storage, and I'm dual-booting Linux Mint and Slackware. This has worked fine, but when trying to download software today I started getting errors that I didn't have enough memory. I have one 15 GB partition for Mint, another 15 GB for Slackware, a swap partition, and the rest of the storage is for the /home partition. Slackware seems to be filling up only the root partition I designated for Slackware and not using /home.

Here is my fstab:


/dev/sda1 swap swap defaults 0 0
/dev/sda2 / ext4 defaults 1 1
/dev/sda4 /home ext4 defaults 1 2
#/dev/cdrom /mnt/cdrom auto noauto,owner,ro,comment=x-gvfs-show 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
 
Old 06-05-2013, 10:38 PM   #2
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,448
Blog Entries: 7

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Please post the output of the following commands:

mount

df -h
 
1 members found this post helpful.
Old 06-05-2013, 10:44 PM   #3
Richard Cranium
Senior Member
 
Registered: Apr 2009
Location: McKinney, Texas
Distribution: Slackware64 15.0
Posts: 3,858

Rep: Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225Reputation: 2225
Are you downloading stuff as root?
 
Old 06-05-2013, 11:31 PM   #4
ttk
Senior Member
 
Registered: May 2012
Location: Sebastopol, CA
Distribution: Slackware64
Posts: 1,038
Blog Entries: 27

Rep: Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484Reputation: 1484
Which command or utility are you using to download?

I ask because some tools download to /tmp or /var/tmp and then move the files into their final destination.
 
Old 06-06-2013, 12:32 AM   #5
shane25119
Member
 
Registered: Aug 2003
Location: Illinois
Distribution: Linux Mint XFCE
Posts: 654

Rep: Reputation: 53
To piggyback on ttk, take a look at /tmp and /var/tmp.

It may be that those directories are full of temporary files. Emptying them out may solve your problem.
 
Old 06-06-2013, 03:24 AM   #6
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,058

Rep: Reputation: Disabled
First thing would be to find out which files are filling up your root partition and where they are. To know here they are, open a terminal and type as root:
Code:
du -ah --max-depth=1 /
then refine according to the results. For instance to check /tmp's content:
Code:
du -ah --max-depth=1 /tmp
Now to find big individual files, for instance those that are more than 200 M big:
Code:
find / -size +200M
Be aware that depending on their verbosity's level some programs (tomcat server comes to mind) can quickly fill up you logs.

Also, it is a good habit to check /tmp content before switching off your computer and erase what you don't need to keep there.

Last edited by Didier Spaier; 06-11-2013 at 01:29 AM.
 
1 members found this post helpful.
Old 06-06-2013, 07:08 AM   #7
rabirk
Member
 
Registered: Dec 2012
Location: Maryland, US
Distribution: Debian
Posts: 87

Original Poster
Blog Entries: 8

Rep: Reputation: Disabled
Thank you for the responses so far. In response to some of the questions, no, I was not downloading as root. I was using KDE as a regular user and my Downloads folder is at /home/roy/Downloads.

Output of mount:
/dev/sda2 on / type ext4 (rw,commit=600)
proc on /proc type proc (rw)
sysfs on /sys type sysfs (rw)
/dev/sda4 on /home type ext4 (rw,commit=600)
tmpfs on /dev/shm type tmpfs (rw)
gvfs-fuse-daemon on /home/roy/.gvfs type fuse.gvfs-fuse-daemon (rw,nosuid,nodev,user=roy)

Output of df -h
Filesystem Size Used Avail Use% Mounted on
/dev/sda2 15G 9.9G 4.2G 71% /
/dev/sda4 422G 5.5G 395G 2% /home
tmpfs 3.9G 0 3.9G 0% /dev/shm

That output is after having deleted everything from /tmp, which had 4.4G of data in it. So that was probably filling up my / partition. I wonder if I should try increasing the size of that partition. I don't need as much space in /home.

I suppose that answers my issue: Just too much stuff in /tmp. I had thought there was some underlying issue and Slackware wasn't recognizing the /home partition, but I guess that is not the case. If nobody has anything to add, I suppose this is closed. Thanks again.
 
Old 06-06-2013, 07:23 AM   #8
rkelsen
Senior Member
 
Registered: Sep 2004
Distribution: slackware
Posts: 4,448
Blog Entries: 7

Rep: Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553Reputation: 2553
Quote:
Originally Posted by rabirk View Post
I suppose that answers my issue: Just too much stuff in /tmp.
You can avoid this by running a 'tmpfs' mountpoint for /tmp. This puts /tmp on a "RAM drive" which is cleared at shutdown.

Enabling this is quite simple. You just add this line to your /etc/fstab:

tmpfs /tmp tmpfs defaults,size=1000m 0 0

Note that the 'size' option there is a limit. I've never needed more than a Gig or so. You may even want to make it smaller.
 
1 members found this post helpful.
Old 06-06-2013, 07:30 AM   #9
rabirk
Member
 
Registered: Dec 2012
Location: Maryland, US
Distribution: Debian
Posts: 87

Original Poster
Blog Entries: 8

Rep: Reputation: Disabled
Quote:
You can avoid this by running a 'tmpfs' mountpoint for /tmp.
That certainly seems like a good idea. I'll give that a try. Thank you!
 
Old 06-06-2013, 07:49 AM   #10
Gerard Lally
Senior Member
 
Registered: Sep 2009
Location: Leinster, IE
Distribution: Slackware, NetBSD
Posts: 2,180

Rep: Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763Reputation: 1763
Quote:
Originally Posted by rabirk View Post
My laptop has 500 GB of storage, and I'm dual-booting Linux Mint and Slackware. This has worked fine, but when trying to download software today I started getting errors that I didn't have enough memory. I have one 15 GB partition for Mint, another 15 GB for Slackware, a swap partition, and the rest of the storage is for the /home partition.
Just to be clear: do Mint and Slackware share /home? If so, what is the output of mount and cat /etc/fstab on Mint?

edit: problem appears to be solved

Last edited by Gerard Lally; 06-06-2013 at 07:51 AM.
 
Old 06-06-2013, 07:50 AM   #11
Didier Spaier
LQ Addict
 
Registered: Nov 2008
Location: Paris, France
Distribution: Slint64-15.0
Posts: 11,058

Rep: Reputation: Disabled
Increasing the size of your / partition could certainly help.

I don't even have a dedicated /home partition and live very well without it.

To save room on /tmp you can also avoid using it when you know some program can put a lot of things in it. For instance you can create a /home/tmp directory that should have same ownership and permissions as /tmp.

Then you can either symlink /tmp to it, or for instance when you build a package using a SlackBuild (that can need a lot of space in /tmp, some of them even more than 1G) run the Slackbuild like this:
Code:
TMP=/home/tmp ./<package>.SlackBuild
I think this works with most if not all SlackBuilds included in Slackware and found on http://slackbuilds.org. You can check looking in the SlackBuild what is the default value for $TMP.

Last edited by Didier Spaier; 06-06-2013 at 07:57 AM.
 
Old 06-06-2013, 08:09 AM   #12
rabirk
Member
 
Registered: Dec 2012
Location: Maryland, US
Distribution: Debian
Posts: 87

Original Poster
Blog Entries: 8

Rep: Reputation: Disabled
Quote:
Just to be clear: do Mint and Slackware share /home?
Yes, that is the setup. Here are the results of mount in Mint:

/dev/sda3 on / type ext4 (rw,errors=remount-ro)
proc on /proc type proc (rw,noexec,nosuid,nodev)
sysfs on /sys type sysfs (rw,noexec,nosuid,nodev)
none on /sys/fs/fuse/connections type fusectl (rw)
none on /sys/kernel/debug type debugfs (rw)
none on /sys/kernel/security type securityfs (rw)
udev on /dev type devtmpfs (rw,mode=0755)
devpts on /dev/pts type devpts (rw,noexec,nosuid,gid=5,mode=0620)
tmpfs on /run type tmpfs (rw,noexec,nosuid,size=10%,mode=0755)
none on /run/lock type tmpfs (rw,noexec,nosuid,nodev,size=5242880)
none on /run/shm type tmpfs (rw,nosuid,nodev)
none on /run/user type tmpfs (rw,noexec,nosuid,nodev,size=104857600,mode=0755)
/dev/sda4 on /home type ext4 (rw)
gvfsd-fuse on /run/user/roy/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,user=roy)

And here's fstab (editing out the comments):

# <file system> <mount point> <type> <options> <dump> <pass>
proc /proc proc nodev,noexec,nosuid 0 0
# / was on /dev/sda3 during installation
UUID=0cfcc32b-3e9f-4856-acc1-7cdc273b7609 / ext4 errors=remount-ro 0 1
# /home was on /dev/sda4 during installation
UUID=858bfc47-412f-4f52-b55e-f8ee94a6e35a /home ext4 defaults 0 2
# swap was on /dev/sda1 during installation
UUID=0f351beb-088f-4b00-a844-9fbddfa948a7 none swap sw 0 0

Everything seems to be in order.

Didier:
Quote:
. . .you can create a /home/tmp directory that should have same ownership and permissions as /tmp.
That seems like an excellent idea. I'll have to give it a little more thought and see if I can get that /home/tmp working with a symlink.
 
Old 06-06-2013, 08:56 AM   #13
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 393

Rep: Reputation: 81
I haven't tried this - but it oughtta work:
in /etc/rc.d/rc.local_shutdown, put the following:
rm -r /tmp/*

That way you always keep /tmp clean (just as if it had been in ram). and you don't need to worry (too much) about running out of ram.
Infact - in the 'good ole days', that used to happen automagically!!

Using /tmp as a link is also a good idea, but I can see some race-problems when /home is on a separate partition - the system _may_ want to put something in /tmp before the /home-partition is mounted ... I dunno

Last edited by perbh; 06-06-2013 at 08:59 AM.
 
1 members found this post helpful.
Old 06-06-2013, 09:11 AM   #14
rabirk
Member
 
Registered: Dec 2012
Location: Maryland, US
Distribution: Debian
Posts: 87

Original Poster
Blog Entries: 8

Rep: Reputation: Disabled
If I had the symlink, would I be able to see what's in /tmp or would it just show me what's in /home/tmp? It would be interesting to see, with the symlink in place, what if anything is placed in /tmp before /home is mounted. I'll create the symlink and then experiment with that.

Though the solution to my problem was simple, I'm still learning a lot from this experience. I would have had a somewhat rough time finding the df and du commands on my own and never would have considered these other options. I really appreciate the ideas.
 
Old 06-06-2013, 11:13 AM   #15
dwblas
Member
 
Registered: Jun 2011
Posts: 87

Rep: Reputation: Disabled
Note that the OP is saying that they ran out of memory, not disk. Probably a bad card, so a memtest is the place to start.
 
  


Reply

Tags
slackware, storage



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
Home partition as storage area salparadise Slackware 8 05-19-2011 10:02 AM
Mount storage partition folders to home folders skykooler Linux - Newbie 4 10-07-2010 10:56 PM
running low on the home partition DirkvdM Linux - General 4 07-19-2007 07:03 PM
/home partition changed to read-only file system! Echo Kilo Linux - Software 1 03-30-2005 01:59 PM
how to partition hard drive for dual boot xp-home and linux system sabaki Linux - Laptop and Netbook 5 03-06-2004 02:10 PM

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

All times are GMT -5. The time now is 10:37 PM.

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