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 08-02-2012, 03:01 AM   #1
sjampoo
Member
 
Registered: Jan 2009
Location: Oosterbeek, The Netherlands
Distribution: Desk and Lap: Slackware13.1 64
Posts: 203
Blog Entries: 4

Rep: Reputation: 27
Can't startx - no space left on device ( What/How to clean/remove stuff)


Dear all,

I'm stuck.
A Slackware 13.37 x64 machine, running mainly an installation of VirtualBox has stopped working.

Somehow the root partition got full.

It's 46GB in size, and 100% in use.

The VM disk images are on a different partition

df -h shows:
/dev/root 46G 46G 0 100% /
/dev/sda2 42G 984M 39G 3% /home
/dev/sda3 358G 98G 242G 29% /other
tmpfs 3.9G 1.7M 3.9G 1% /dev/shm

So as you can see: I was confident there was enough space for the / partition to grow a bit.

I suspect there's some log of tmp directory that got full, but as I'm no hero at the commandline, and I can't start XFCE.. I'm stuck.

I can ssh into the machine, and that's a comfort, since the machnie is down in the basement; warm, dark and very uncomfortable.

Where on / should I start looking? and which commands do I use?

* can I remove /var/cache/ or is this an unsafe operation? *

Last edited by sjampoo; 08-02-2012 at 03:06 AM. Reason: question about /var/cache added
 
Old 08-02-2012, 03:07 AM   #2
ponce
LQ Guru
 
Registered: Aug 2004
Location: Pisa, Italy
Distribution: Slackware
Posts: 7,096

Rep: Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173Reputation: 4173
try this command (better as root), it will generate a sorted file that you can inspect
Code:
cd /
du -a -x | sort -n > /home/disk_space.tmp
then you can inspect the generated file with tail: for example, to see the last 20 lines
Code:
tail -20 /home/disk_space.tmp
when you had deleted the superfluos stuff with "rm -fR", you can rm the generated file too.
 
2 members found this post helpful.
Old 08-02-2012, 03:12 AM   #3
NoStressHQ
Member
 
Registered: Apr 2010
Location: Geneva - Switzerland ( Bordeaux - France / Montreal - QC - Canada)
Distribution: Slackware 14.2 - 32/64bit
Posts: 609

Rep: Reputation: 221Reputation: 221Reputation: 221
Well first of all, manually clean your '/tmp'...

Then ponce gave your the right path, a more "assisted" path would be using ncdu instead (graphical browsing of your fs), it can be found on sbopkg and takes no time to install.

Cheers

Garry.

Code:
# ncdu -x /
The -x avoids ncdu (/du) to scan other physical device than the original one...

Last edited by NoStressHQ; 08-02-2012 at 03:14 AM.
 
1 members found this post helpful.
Old 08-02-2012, 03:12 AM   #4
Celyr
Member
 
Registered: Mar 2012
Location: Italy
Distribution: Slackware+Debian
Posts: 321

Rep: Reputation: 81
You can safely delete everyting in a tmp directory (/tmp and /var/tmp). Then i suggest you to play a bit with du because a full slackware install uses around 8G
 
1 members found this post helpful.
Old 08-02-2012, 03:17 AM   #5
sjampoo
Member
 
Registered: Jan 2009
Location: Oosterbeek, The Netherlands
Distribution: Desk and Lap: Slackware13.1 64
Posts: 203

Original Poster
Blog Entries: 4

Rep: Reputation: 27
Oh. Rats!

Norman ( Virusscanner ) has got about 38GB as .tmp files.
(or had,. )

Thanx a million Ponce!
 
Old 08-02-2012, 03:20 AM   #6
sycamorex
LQ Veteran
 
Registered: Nov 2005
Location: London
Distribution: Slackware64-current
Posts: 5,836
Blog Entries: 1

Rep: Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251Reputation: 1251
Additionally as a more permanent solution, you could add the following command:
Code:
/usr/bin/find /tmp -mindepth 1 -maxdepth 1 -print0 | xargs -0r /bin/rm -rf
to your /etc/rc.d/rc.local_shutdown which will automatically clear your /tmp directory during a shutdown.
 
1 members found this post helpful.
Old 08-02-2012, 09:05 AM   #7
mrascii
Member
 
Registered: Jun 2012
Location: on the Net
Distribution: Slackware
Posts: 100

Rep: Reputation: Disabled
My church called me a few months back with the same problem on their Linux file server. Strangely, it was the /media directory which was causing / to overflow. The server was being backed up to an external USB drive daily and then the drive removed and stored in the safe until the next day. One day the drive wasn't attached when the backup script ran and the script not finding the /media/backup directory created the directory (on the internal drive, of course) and started the backup. Adding a line to the script to test for the presence of the correct directory before starting the backup fixed the problem.

DNA
AKA mrascii

Last edited by mrascii; 08-02-2012 at 09:07 AM. Reason: Minor clarification
 
Old 08-02-2012, 01:41 PM   #8
perbh
Member
 
Registered: May 2008
Location: Republic of Texas
Posts: 393

Rep: Reputation: 81
Just as an apropos to the last post - this is how all _my_ backup-scripts work:
Code:
myusb=".................." # insert appropriate blkid for usb-drive
usbdev=""
mountpoint=""
die() { echo "$*"; unset myusb usbdev mountpoint; exit 1; }

usbdev="`blkid -U $myusb`" || usbdev=""
test x$usbdev = x && die "-- usbdisk is NOT present"

# now check if it's allready mounted
mountpoint="`grep -w "^$usbdev" /etc/mtab | cut -d ' ' -f 2`"
test "x$mountpoint" = x && {    # not mounted, so go do it
   mountpoint=/tmp/dir.$$
   test -d $mountpoint || mkdir -p -m 0777 $mountpoint || \
      die "-- could not create $mountpoint"
   mount $usbdev $mountpoint || \
      die "-- error mounting $usbdev on $mountpoint"
   echo ":: $usbdev is mounted on $mountpoint"
}

# do the neccessary backup ...

# unmount
umount $mountpoint
rmdir $mountpoint
unset myusb usbdev mountpoint
exit 0

Last edited by perbh; 08-02-2012 at 01:54 PM.
 
2 members found this post helpful.
  


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
[SOLVED] No space left on device edhe1 Debian 7 05-12-2011 12:40 PM
rm: unable to remove `/coredump/SUNSP .webgo.core.7942': No space left on device ranganathchalla Linux - Networking 0 01-19-2010 07:16 AM
No space left on device pinga123 Linux - Newbie 2 11-05-2009 12:47 AM
No space left on device even though it has free space? enine Linux - General 8 05-30-2007 04:22 PM
No space left on device clintdavis Linux - Software 2 05-04-2006 10:38 PM

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

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