Skip site navigation (1)Skip section navigation (2)
Date:      Wed, 28 Nov 2012 02:11:05 +0000
From:      Ben Morrow <ben@morrow.me.uk>
To:        =?iso-8859-1?Q?Efra=EDn_D=E9ctor?= <efraindector@motumweb.com>
Cc:        freebsd-stable@freebsd.org
Subject:   Re: How to clean up /
Message-ID:  <20121128021105.GI76138@anubis.morrow.me.uk>
In-Reply-To: <64EBD6BA13904807892DEBECE7EEE821@CMOTUM25PC>
References:  <20121128005316.GA31348@anubis.morrow.me.uk> <64EBD6BA13904807892DEBECE7EEE821@CMOTUM25PC>

next in thread | previous in thread | raw e-mail | index | archive | help
At  7PM -0600 on 27/11/12 Efraín Déctor wrote:
> From: Ben Morrow
>> Quoth =?utf-8?Q?Efra=C3=ADn_D=C3=A9ctor?= <efraindector@motumweb.com>:
>> >
>> > I recently upgraded to 9.1-RC3, everything went fine, however the /
>> > partition its about to get full. Im really new to FreeBSD so I don’t
>> > know what files can be deleted safely.
>> >
>> > 76M    /compat/linux/usr/lib/locale/locale-archive.tmpl
>> 
>> This shouldn't be in /. You should create a new filesystem for /compat
>> alongside /usr and /var, or just make a symlink /compat -> /usr/compat
>> and move everything there.
>
> I have a custom kernel on this system (for using IPFW) could be this reason 
> so compat is there?.

[Do you realise you don't need a custom kernel for ipfw? ipfw is
available as a module, so you can keep GENERIC and put

    ipfw_load="YES"

into /boot/loader.conf. This will cause ipfw to be loaded at boot time,
before the network is started; you can load it at runtime by running

    kldload ipfw

]

No, this is nothing to do with a custom kernel: it is part of one of the
linux_base ports, which you must have installed. It needs to be where it
is, under /compat/linux, but /compat/linux itself should not be on the
root filesystem.

Since the list of large files you posted is relatively short, I assume
you are using the traditional partioning scheme, with a small root
partition and larger partitions for /usr and /var (and maybe /home).
There is not as much point to this as there used to be, but if you are
going to use this scheme you need to avoid putting anything in the root
partition that doesn't need to be there. 

/compat/linux contains libraries, binaries and other files needed for
FreeBSD's Linux API emulation; this most certainly does *not* need to be
in the root partition, so it should be moved somewhere else. There are
two possible 'somewhere else's: you can put it in its own partition,
which means you need to have space on your disk to allocate a new
partition; or you can move the whole lot onto one of your other existing
partitions, and use a symlink (or a nullfs mount, but let's not get
complicated) to make the directory appear where it's supposed to be.

Probably the latter is the easier option. /usr is the right filesystem
to be storing this sort of thing on, so you want to

    mv /compat /usr
    ln -s usr/compat /compat

The mv will take some time, since it is moving files cross-filesystem so
it has to copy them all.

Ben




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20121128021105.GI76138>