softupdates, adding space to partitions, etc

Bill Moran wmoran at potentialtech.com
Wed Aug 4 10:39:19 PDT 2004


Comrade Burnout <geektron at comradeburnout.com> wrote:

> I just noticed that I didn't create *quite* enough space in my /var 
> partition for accepting somewhat larger email attachments/ messages.
> 
> i thought softupdates was the way to go, but on reading the handbook 
> online, that's not quite what i thought it was ....

No.  Softupdates is a method of improving performance by optimizing
writes to the disk ... has no real relation to the space involved.

> is there any way with 5.2.1 to move around disc space between partitions 
> "on the fly" ?

Definately not "on the fly".

You _can_ use growfs to increase the size of a filesystem, but you must
have unused space on the hard drive to grow your partition first.

The more traditional way of solving the problem is to symlink the
directory that needs the space to a partition with more space.  For
example, if you're running out of space in /var/spool, and you've got
tons of space in /usr, the following procedure will work:

1) Stop any/all programs that might access /var/spool (best thing to
   do is "shutdown now" to go to single user mode)
2) mkdir /usr/spool
3) Compare /usr/spool to /var/spool to ensure that the permissions are
   identical.  Change as needed.
4) cp -Rp /var/spool/* /usr/spool/.
5) mv /var/spool /var/spool.old
6) ln -s /usr/spool /var/spool
7) Reboot or restart any programs that will access /var/spool
8) After a sufficient amount of time to ensure that everything worked OK,
   you can delete /var/spool.old

IMHO, the best way to avoid/deal with this problem is to do the following
the next time you install:
1) Make the entire disk one big Vinum partition
2) Make Vinum subdisks for the different partitions you want.  Size them
   accordingly, and _leave_any_unneeded_space_unused_!
3) Later if you find you messed up, Vinum gives you the power to join unused
   space to an existing subdisk, and you can then use growfs to increase the
   filesystem size.  Hell, you can even add new disks if you fill up the
   entire disk!

HTH

-- 
Bill Moran
Potential Technologies
http://www.potentialtech.com


More information about the freebsd-questions mailing list