Date: Fri, 07 May 2010 16:17:43 -0400 From: Michael Powell <nightrecon@hotmail.com> To: freebsd-questions@freebsd.org Subject: Re: Space on root partition Message-ID: <hs1sif$g9i$1@dough.gmane.org> References: <20100507185752.GA24228@libertas.local.camdensoftware.com>
next in thread | previous in thread | raw e-mail | index | archive | help
Chip Camden wrote: > When partitioning the drive, I took the defaults -- which seems to create > a root partition that's too small. I'm at 59% usage, and every time I > install a new kernel I have to rm /boot/kernel.old to get it to go. > > Two questions: > > 1. Is there an easy way to resize partitions? It is not too much of a problem if it is the last partition followed by free space. But the location of / in the scheme of things generally precludes this. There are a few different approaches one can take to accomplish this, but my general feeling is doing so on a production box can invite disaster and you wind up with more problems than you started with. > 2. Is there anything in root I could safely symlink off to another > partition? I would tend to not want to go this route, as it is good to have / a fairly self-contained entity for recovery purposes. A lot of things can go wrong with a box, and if you can get to / in single user many may be fixable. > Here's a df: > > Filesystem 1K-blocks Used Avail Capacity Mounted on > /dev/ad4s1a 507630 273388 193632 59% / > devfs 1 1 0 100% /dev > /dev/ad4s1e 507630 18 467002 0% /tmp > /dev/ad4s1f 463086528 21941374 404098232 5% /usr > /dev/ad4s1d 4848462 201194 4259392 5% /var Example from one of my servers: Filesystem Size Used Avail Capacity Mounted on /dev/ad0s1a 193M 91M 87M 51% / [snip] The other approach would be to decrease the size of what is installed in /. The main question [criterion] you should use if you need to pursue this is exactly how much code debugging do you need to hold in abeyance? For instance, I only run Release on production boxen with the only maintenance for security branch updates. For me the bits have been very stable, but if you should ever need code debugging the following practice will be a problem. You can comment out 'makeoptions DEBUG=-g' from your kernel config file along with all other debugging facilities, and set WITHOUT_PROFILE= true in src.conf. I also have STRIP= -s in my make.conf, but IIRC this should only apply to ports builds. Delete all of the symbol files in /boot/kernel and /boot/kernel.old. After two kernel builds/installs the huge GENERIC gets moved out of the way. My i386 box has 91MB of space used in / and the 64 bit boxen are typically about 93-95MB. I only have one i386 box left and it's crunched down kernel is 4.2MB, and my 64 bit ones average around 4.5MB. This will mitigate a / being too small, but at the cost of kernel code debugging. If you are running Release on production boxen which just sit there and do their job, you may be able to forego the debugging facilities. In a different situation such as following -STABLE or -CURRENT and the code changing from time to time, you may need the kernel debugging facilities to assist the developers with problem resolution. Whether you can use this approach depends on your situation, e.g., do I need debugging or can I get away without it? YMMV! -Mike
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?hs1sif$g9i$1>