You are not logged in.

#1 2011-07-26 19:47:26

@op
Member
Registered: 2011-04-05
Posts: 49

running out of disk space on root partition

Hello,

I'm running gnome 3 and every time I boot and logon with my user I'm getting a warning that my root partition is running out of disk space (~350MB free out of 7.5GB). This seems really strange to me since I've not installed very much software. I've got a 1TB hard drive and the big things are stored in my home directory.

# df -h

outputs:

Filesystem                                             size    used   free  used%   mounted
udev                                                     10M       0   10M    0% /dev
run                                                      10M    168K  9,9M    2% /run
/dev/disk/by-uuid/072ba75b-a418-4795-ac0b-965815573010  7,3G    6,6G  357M   95% /
shm                                                     2,0G    444K  2,0G    1% /dev/shm
/dev/sda1                                                99M     17M   78M   18% /boot
/dev/sda4                                               910G    131G  733G   16% /home

/dev/disk/by-uuid/072ba75b-a418-4795-ac0b-965815573010 seems a little bit odd to me there although I don't have much experience using linux based systems.

# ls /dev/disk/by-uuid/072ba75b-a418-4795-ac0b-965815573010 -l
# lrwxrwxrwx 1 root root 10  (...date and time ...)  /dev/disk/by-uuid/072ba75b-a418-4795-ac0b-965815573010 -> ../../sda3

and tab completion lists the files of my home directory. What's going on here? big_smile

Offline

#2 2011-07-26 19:50:08

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: running out of disk space on root partition

Install ncdu and run it as root to see where the bloat is located:

# ncdu -x /

Install bleachbit from the AUR and run this as root (I do this after a system update):

# bleachbit --delete system.cache system.localizations system.trash system.tmp

You can even add this to your ~/.bashrc as an alias if you give yourself sudo rights to /usr/bin/bleachbit

$ grep bb ~/.bashrc
alias bb="sudo bleachbit --delete system.cache system.localizations system.trash system.tmp"

Install cacheclean from the AUR and do likewise:

$ grep cc ~/.bashrc
alias cc="sudo cacheclean 2"

Last edited by graysky (2011-07-26 19:50:56)


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#3 2011-07-26 19:55:02

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: running out of disk space on root partition

To see what's eating space (in mbs):

du -md1 / | sort -n

It's probably your pacman cache. To clean it:

pacman -Scc

Offline

#4 2011-07-26 19:59:19

@op
Member
Registered: 2011-04-05
Posts: 49

Re: running out of disk space on root partition

Since I've never installed anything from AUR I tried

pacman -Scc

and instantly ~3GB were deleted from /var - problem solved. The other ~3GB are used in /usr, that's fine I guess.
Thank's to you guys!

Offline

#5 2011-07-26 20:01:04

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: running out of disk space on root partition

@op - cacheclean is better....


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#6 2011-07-26 20:02:38

@op
Member
Registered: 2011-04-05
Posts: 49

Re: running out of disk space on root partition

I'll try cacheclean too! have to install yaourt first wink

Offline

#7 2011-07-26 20:07:54

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: running out of disk space on root partition

also make sure you have logrotate installed. I have seen a bunch of threads where the the op had issues with space on / partition, only to find out that their log files are 4GB+ sizes.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#8 2011-07-26 20:16:51

@op
Member
Registered: 2011-04-05
Posts: 49

Re: running out of disk space on root partition

logrotate is already installed, thank you for the remark

Offline

#9 2011-07-26 21:45:35

jamesbond007
Member
From: Germany
Registered: 2009-06-14
Posts: 150

Re: running out of disk space on root partition

@op: If you want to avoid this problem in the future without rearranging your partitions, one way is to move pacmans cache directory somewhere else by letting point the "CacheDir" parameter in /etc/pacman.conf to a directory on another partition.

Offline

#10 2011-07-26 22:22:10

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: running out of disk space on root partition

@op: The best practice IMO would be repartition your disk so that at least /usr and /var got their own separate partition.

Offline

#11 2011-07-26 22:23:07

graysky
Wiki Maintainer
From: :wq
Registered: 2008-12-01
Posts: 10,597
Website

Re: running out of disk space on root partition

+1 for placing /var on its own partition.


CPU-optimized Linux-ck packages @ Repo-ck  • AUR packagesZsh and other configs

Offline

#12 2011-07-27 19:38:44

ChoK
Member
From: France
Registered: 2008-10-01
Posts: 346

Re: running out of disk space on root partition

/usr should not be on a seperate partition anymore. Some programs assume it's on the same partition and fail sometime silently sometime badly.


Ah, good taste! What a dreadful thing! Taste is the enemy of creativeness.
Picasso
Perfection is reached, not when there is no longer anything to add, but when there is no longer anything to take away.
Saint Exupéry

Offline

#13 2011-07-27 19:58:49

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: running out of disk space on root partition

ChoK wrote:

/usr should not be on a seperate partition anymore. Some programs assume it's on the same partition and fail sometime silently sometime badly.

What ?? That's the first I have heard of this. What programs fail? Any examples?


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#14 2011-07-27 20:47:46

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: running out of disk space on root partition

Inxsible wrote:
ChoK wrote:

/usr should not be on a seperate partition anymore. Some programs assume it's on the same partition and fail sometime silently sometime badly.

What ?? That's the first I have heard of this. What programs fail? Any examples?

With sysvinit in Arch, this isn't such a big problem, but we're slowly starting to see evidence that this is becoming a worse and worse idea. In particular, if you set a non C locale for daemons, you will not be able to shut down cleanly, as mount(8) is trying to reference files in the locale cache (on /usr) and can't unmount /usr.

Example bug report: https://bugs.archlinux.org/task/25149

If you're using systemd, /usr on a separate partition is flat out not allowed. We're getting into the realm of filthy hacks ahead in order to try and support this -- see Tom's late comments in the above bug report.

Oh, and be on the lookout for a cache cleaning util in pacman-contrib (name pending):

http://mailman.archlinux.org/pipermail/ … 13926.html

Last edited by falconindy (2011-07-27 20:48:14)

Offline

#15 2011-07-27 20:52:39

Inxsible
Forum Fellow
From: Chicago
Registered: 2008-06-09
Posts: 9,183

Re: running out of disk space on root partition

Thanks Dave. I'll probably have to look into the actual philosophy of it. See how it figures out that /usr is on a separate partition. (UUID checking maybe).

I don't have a separate /usr, but I might just try a new install in virtualbox with a separate /usr to see what happens. smile

Gives me something to read tonight.


Forum Rules

There's no such thing as a stupid question, but there sure are a lot of inquisitive idiots !

Offline

#16 2011-07-27 21:24:00

Ashren
Member
From: Denmark
Registered: 2007-06-13
Posts: 1,229
Website

Re: running out of disk space on root partition

falconindy: That's sad. It gives the user less control and it increases the risk for a full / partition. I think I'll use the dirty hacks. The thought of extending my / logical volume when I need to install extra software just doesn't feel right. smile

Offline

#17 2011-09-10 06:25:24

gee
Member
Registered: 2006-11-29
Posts: 313

Re: running out of disk space on root partition

graysky wrote:
$ grep bb ~/.bashrc
alias bb="sudo bleachbit --delete system.cache system.localizations system.trash system.tmp"

Sorry for getting back to this old thread, but I have actually tried this one without looking too much into it and it killed most of the files in a partition I had mounted in /tmp...
I had a full backup so I don't care, but I thought I'd mention it for someone who might not.

(Or maybe I should just not mount stuff in tmp in the first place).

Offline

#18 2011-09-10 09:08:09

BabyDoc
Member
Registered: 2008-03-20
Posts: 76

Re: running out of disk space on root partition

gee wrote:
graysky wrote:
$ grep bb ~/.bashrc
alias bb="sudo bleachbit --delete system.cache system.localizations system.trash system.tmp"

Sorry for getting back to this old thread, but I have actually tried this one without looking too much into it and it killed most of the files in a partition I had mounted in /tmp...
I had a full backup so I don't care, but I thought I'd mention it for someone who might not.

(Or maybe I should just not mount stuff in tmp in the first place).

I would think someone who uses Arch has the common sense to check what a command does, before executing it. Certainly if posted on a public such forum as this one. Executing stuff without knowing what it will do is a very bad practice. (I do not mean to insult/offend you in any way, I just have seen more people behaving this way and I don't understand why really.)

And mounting stuff in /tmp does not seem the best idea to me. As far as I know this is not the purpose of the /tmp directory.

Offline

#19 2011-09-10 22:52:08

GSF1200S
Member
Registered: 2008-12-24
Posts: 474

Re: running out of disk space on root partition

I would really suggest having the Downgrade package installed from the AUR if you are going to make a habit of running pacman -Scc to keep space clear on /. pacman -Scc cleans pacman's entire package cache- if you upgrade and something breaks, you will have no local package on the system to downgrade to. With the Downgrade script from the AUR, assuming you have a network connection still, you can at least grab the offending package from the ARM and get back online. I would suggest, once you know everything is working well, running pacman -Sc instead, which clears all packages from cache except the versions matching the ones you currently have installed.

It is mentioned even in the wiki that pacman -Scc is bad practice, and I agree as this is a rolling-release distro- we never know when an upstream bug is going to bite us somewhere. If you have a massive /home partition, I would suggest you have pacman cache packages there. Otherwise, stick to pacman -Sc and have Downgrade installed. Good luck and no offense to the advice of prior posters..

Last edited by GSF1200S (2011-09-10 22:52:30)

Offline

Board footer

Powered by FluxBB