# gentoo system old with rootfs 100% used?

## agrypa1

Hi,

I came to a point where "startx" doesn't go through. It complains about "not enough space".

Command "df" reveals that rootfs which phisically resides on /dev/sda3 is full.

I removed all of the distfiles from /usr/portage/distfiles and was able to gain 4% space.

I suspect that somethning might have happen during my last compilation: the power went off, with no UPS.

Where to look for some posssible dispersed files?

What should I do to get thing right?

```

df

Filesystem           1K-blocks      Used Available Use% Mounted on

rootfs                96132968  86728084   4521528  100% /

/dev/root             96132968  86728084   4521528  100% /

rc-svcdir                 1024       112       912  11% /lib64/rc/init.d

udev                     10240       224     10016   3% /dev

none                   1547352         0   1547352   0% /dev/shm

/dev/sda1               101089     47885     47985  50% /boot

```

agryppa

----------

## Jaglover

Boot from a liveCD and run fsck.

Make sure all logs are rotated so they won't go out of hand.

Clean up /var/local/portage.

Remove unused kernel sources.

----------

## ToeiRei

also a nice space killer: mysql bin-logs

----------

## Hu

 *Jaglover wrote:*   

> Clean up /var/local/portage.

 What normally goes here?  I do not have a /var/local at all.

Another space eater: $PORTAGE_TMPDIR, which defaults to /var/tmp/portage.  If you get interrupted during a compile, the partially completed work can be left there.  (This might have been what Jaglover meant to mention, but I will add it in case he had something else in mind.)

----------

## Jaglover

Thanks for correction,  Hu.  :Smile:  I meant /var/tmp/portage indeed.

I was posting before my first cap of coffee this morning.   :Wink: 

----------

## Hu

 *Jaglover wrote:*   

> I was posting before my first cap of coffee this morning.  

 Happy to help.  However, if you need an entire cap of coffee in the mornings, I really hope you get a good discount on your brew.  :Wink: 

----------

## Jaglover

It's not getting any better, I see.  :Sad:  Just one of those days ... I hope tomorrow will be different ...    :Razz: 

----------

## idella4

agrypa1, 

if you're still looking, there are heaps of ways of liberating space, besides deleting the obvious.

IF you have a spare partition of device of some sort (maybe a usb flash drive) you could move a folder like /usr and/or /var or /home out of your system partition; just remember to make the new entry in /etc/fstab.

----------

## agrypa1

 *idella4 wrote:*   

> agrypa1, 
> 
> if you're still looking, there are heaps of ways of liberating space, besides deleting the obvious.
> 
> IF you have a spare partition of device of some sort (maybe a usb flash drive) you could move a folder like /usr and/or /var or /home out of your system partition; just remember to make the new entry in /etc/fstab.

 

The deletion of var/tmp/portage helped significantly, 8% storage gain.

I am now thinking of adding a new hardrive and migrate into lvm. I hope to find some goog howto on how to convert non-lvm system into anlvm one.

thanks all for the suggestions

Agryppa

----------

## Hu

If you are not converting in place, then just make filesystems on the destination drive and copy the files over via a tar pipeline:

```
cd /mnt

mkdir old new

for fs in '' usr var home; do

    mount --bind /$fs old

    mount /dev/mapper/lvm-${fs:-root} new

    tar -C old -c -f - . | tar -C new -x -f -

    umount old

    umount new

done

rmdir old new
```

----------

