Re: var out of space

2006-12-20 Thread Jerry McAllister
On Tue, Dec 19, 2006 at 06:22:45PM -0800, Bradley Giesbrecht wrote:

 Thanks for all help.
 
 uname says FreeBSD 4.10-SECURITY
 
 Looks like I should do a fresh install. What's a bugger is this  
 server does dns (bind 8) and web hosting (Apache 1.3) for a few  
 hundred domains.
 
 I can backup the zone and web data no problem but I've only installed  
 FreeBSD a few times while looking for a replacement for Gentoo.
 
 I need to get this right.
 
 This server will only be doing dns and some minor (low hit) web hosting.
 
 I will do my own homework and google like hell before I do this but  
 I'd like to ask here on this list what version of FreeBSD I should go  
 with

Go with the latest _RELEASE version.   Currently that is 6.1_RELEASE
but 6.2_RELEASE is expected out very soon - maybe before you finish 
reading handbook and DNS and Apache documentation.

 if there is a good howto for a combo bind/apache/php/mysql build.

There is good information in the FreeBSD handbook plus for DNS, check
out the O'Reilly DNS and Bind Grasshopper book and the O'Reilly DNS and
Bind Cookbook Opossum book.   There are several Apache books that each
have a slightly different style, but you might want to start with one
of the FreeBSD books such as 'FreeBSD Unleashed' that have a piece
more specific to setting it up on FreeBSD.  Go for the latest editions
of these books.  They tend to re-release them every so often, updated
for later versions.

 
 Thanks for sharing your valuable time.

Have fun,

jerry

 
 //Brad
 
 On Dec 16, 2006, at 11:31 PM, Bradley Giesbrecht wrote:
 
 Hello,
 
 
 I inherited a freebsd installation with a var slice/mount that is  
 to small and filling up all the time.
 
 What type of info should I provide to allow someone to help me with  
 a solution?
 
 I would very much prefer to not install another drive just for /var.
 
 /usr has plenty of space. Can I mount var off of /usr?
 
 Here is the output of df for starters:
 
 /dev/ad0s1a128990  119970-1298   101%/
 /dev/ad0s1f257998  1852465211478%/tmp
 /dev/ad0s1g 112755734 4533434 99201842 4%/usr
 /dev/ad0s1e257998  2069563040487%/var
 procfs  4   40   100%/proc
 
 
 and ls -la at / looks like this:
 
 -rw-r--r--   2 root  wheel  802 May 25  2004 .cshrc
 -rw-r--r--   2 root  wheel  251 May 25  2004 .profile
 -r--r--r--   1 root  wheel 6355 May 25  2004 COPYRIGHT
 drwxr-xr-x   2 root  wheel 1024 Nov 29 17:39 bin
 drwxr-xr-x   3 root  wheel  512 Nov  5 15:27 boot
 drwxr-xr-x   2 root  wheel  512 Jan 16  2005 cdrom
 lrwxr-xr-x   1 root  wheel   10 Jan 16  2005 compat - usr/compat
 drwxr-xr-x   3 root  wheel20480 Jan 16  2005 dev
 drwxr-xr-x  16 root  wheel 2560 Dec  1 16:11 etc
 lrwxrwxrwx   1 root  wheel9 Jan 16  2005 home - /usr/home
 -r-xr-xr-x   1 root  wheel  4344469 Nov  5 13:22 kernel
 -r-xr-xr-x   1 root  wheel  4344469 Nov  5 13:22 kernel.GENERIC
 drwxr-xr-x   2 root  wheel  512 May 25  2004 mnt
 drwxr-xr-x   2 root  wheel 4608 Nov  5 13:22 modules
 dr-xr-xr-x   1 root  wheel  512 Dec 17 01:10 proc
 drwxr-xr-x   3 root  wheel  512 Nov  5 13:36 root
 drwxr-xr-x   2 root  wheel 2048 Nov  5 15:27 sbin
 drwxr-xr-x   4 root  wheel 1024 Jan 16  2005 stand
 lrwxr-xr-x   1 root  wheel   11 Nov  5 15:27 sys - usr/src/sys
 drw---   7 root  wheel 2048 Dec 17 01:09 tmp
 drwxr-xr-x  18 root  wheel  512 Jan 16  2005 usr
 drwxr-xr-x  21 root  wheel  512 Nov  6 11:54 var
 
 
 Thanks for any help,
 Brad
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to freebsd-questions- 
 [EMAIL PROTECTED]
 
 ___
 freebsd-questions@freebsd.org mailing list
 http://lists.freebsd.org/mailman/listinfo/freebsd-questions
 To unsubscribe, send any mail to [EMAIL PROTECTED]
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: var out of space

2006-12-19 Thread Bradley Giesbrecht

Thanks for all help.

uname says FreeBSD 4.10-SECURITY

Looks like I should do a fresh install. What's a bugger is this  
server does dns (bind 8) and web hosting (Apache 1.3) for a few  
hundred domains.


I can backup the zone and web data no problem but I've only installed  
FreeBSD a few times while looking for a replacement for Gentoo.


I need to get this right.

This server will only be doing dns and some minor (low hit) web hosting.

I will do my own homework and google like hell before I do this but  
I'd like to ask here on this list what version of FreeBSD I should go  
with

if there is a good howto for a combo bind/apache/php/mysql build.

Thanks for sharing your valuable time.

//Brad

On Dec 16, 2006, at 11:31 PM, Bradley Giesbrecht wrote:


Hello,


I inherited a freebsd installation with a var slice/mount that is  
to small and filling up all the time.


What type of info should I provide to allow someone to help me with  
a solution?


I would very much prefer to not install another drive just for /var.

/usr has plenty of space. Can I mount var off of /usr?

Here is the output of df for starters:

/dev/ad0s1a128990  119970-1298   101%/
/dev/ad0s1f257998  1852465211478%/tmp
/dev/ad0s1g 112755734 4533434 99201842 4%/usr
/dev/ad0s1e257998  2069563040487%/var
procfs  4   40   100%/proc


and ls -la at / looks like this:

-rw-r--r--   2 root  wheel  802 May 25  2004 .cshrc
-rw-r--r--   2 root  wheel  251 May 25  2004 .profile
-r--r--r--   1 root  wheel 6355 May 25  2004 COPYRIGHT
drwxr-xr-x   2 root  wheel 1024 Nov 29 17:39 bin
drwxr-xr-x   3 root  wheel  512 Nov  5 15:27 boot
drwxr-xr-x   2 root  wheel  512 Jan 16  2005 cdrom
lrwxr-xr-x   1 root  wheel   10 Jan 16  2005 compat - usr/compat
drwxr-xr-x   3 root  wheel20480 Jan 16  2005 dev
drwxr-xr-x  16 root  wheel 2560 Dec  1 16:11 etc
lrwxrwxrwx   1 root  wheel9 Jan 16  2005 home - /usr/home
-r-xr-xr-x   1 root  wheel  4344469 Nov  5 13:22 kernel
-r-xr-xr-x   1 root  wheel  4344469 Nov  5 13:22 kernel.GENERIC
drwxr-xr-x   2 root  wheel  512 May 25  2004 mnt
drwxr-xr-x   2 root  wheel 4608 Nov  5 13:22 modules
dr-xr-xr-x   1 root  wheel  512 Dec 17 01:10 proc
drwxr-xr-x   3 root  wheel  512 Nov  5 13:36 root
drwxr-xr-x   2 root  wheel 2048 Nov  5 15:27 sbin
drwxr-xr-x   4 root  wheel 1024 Jan 16  2005 stand
lrwxr-xr-x   1 root  wheel   11 Nov  5 15:27 sys - usr/src/sys
drw---   7 root  wheel 2048 Dec 17 01:09 tmp
drwxr-xr-x  18 root  wheel  512 Jan 16  2005 usr
drwxr-xr-x  21 root  wheel  512 Nov  6 11:54 var


Thanks for any help,
Brad

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to freebsd-questions- 
[EMAIL PROTECTED]


___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: var out of space

2006-12-19 Thread Garrett Cooper
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Bradley Giesbrecht wrote:
 Thanks for all help.
 
 uname says FreeBSD 4.10-SECURITY
 
 Looks like I should do a fresh install. What's a bugger is this server
 does dns (bind 8) and web hosting (Apache 1.3) for a few hundred domains.
 
 I can backup the zone and web data no problem but I've only installed
 FreeBSD a few times while looking for a replacement for Gentoo.
 
 I need to get this right.
 
 This server will only be doing dns and some minor (low hit) web hosting.
 
 I will do my own homework and google like hell before I do this but I'd
 like to ask here on this list what version of FreeBSD I should go with
 if there is a good howto for a combo bind/apache/php/mysql build.
 
 Thanks for sharing your valuable time.
 
 //Brad
 
 On Dec 16, 2006, at 11:31 PM, Bradley Giesbrecht wrote:
 
 Hello,


 I inherited a freebsd installation with a var slice/mount that is to
 small and filling up all the time.

 What type of info should I provide to allow someone to help me with a
 solution?

 I would very much prefer to not install another drive just for /var.

 /usr has plenty of space. Can I mount var off of /usr?

 Here is the output of df for starters:

 /dev/ad0s1a128990  119970-1298   101%/
 /dev/ad0s1f257998  1852465211478%/tmp
 /dev/ad0s1g 112755734 4533434 99201842 4%/usr
 /dev/ad0s1e257998  2069563040487%/var
 procfs  4   40   100%/proc


 and ls -la at / looks like this:

 -rw-r--r--   2 root  wheel  802 May 25  2004 .cshrc
 -rw-r--r--   2 root  wheel  251 May 25  2004 .profile
 -r--r--r--   1 root  wheel 6355 May 25  2004 COPYRIGHT
 drwxr-xr-x   2 root  wheel 1024 Nov 29 17:39 bin
 drwxr-xr-x   3 root  wheel  512 Nov  5 15:27 boot
 drwxr-xr-x   2 root  wheel  512 Jan 16  2005 cdrom
 lrwxr-xr-x   1 root  wheel   10 Jan 16  2005 compat - usr/compat
 drwxr-xr-x   3 root  wheel20480 Jan 16  2005 dev
 drwxr-xr-x  16 root  wheel 2560 Dec  1 16:11 etc
 lrwxrwxrwx   1 root  wheel9 Jan 16  2005 home - /usr/home
 -r-xr-xr-x   1 root  wheel  4344469 Nov  5 13:22 kernel
 -r-xr-xr-x   1 root  wheel  4344469 Nov  5 13:22 kernel.GENERIC
 drwxr-xr-x   2 root  wheel  512 May 25  2004 mnt
 drwxr-xr-x   2 root  wheel 4608 Nov  5 13:22 modules
 dr-xr-xr-x   1 root  wheel  512 Dec 17 01:10 proc
 drwxr-xr-x   3 root  wheel  512 Nov  5 13:36 root
 drwxr-xr-x   2 root  wheel 2048 Nov  5 15:27 sbin
 drwxr-xr-x   4 root  wheel 1024 Jan 16  2005 stand
 lrwxr-xr-x   1 root  wheel   11 Nov  5 15:27 sys - usr/src/sys
 drw---   7 root  wheel 2048 Dec 17 01:09 tmp
 drwxr-xr-x  18 root  wheel  512 Jan 16  2005 usr
 drwxr-xr-x  21 root  wheel  512 Nov  6 11:54 var


 Thanks for any help,
 Brad

Brad,
Just get the latest stable (6.x); it's a good, solid release. New
version of 6.x is coming out soon though (6.2) FYI.
- -Garrett
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (FreeBSD)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFiKSFEnKyINQw/HARAhh7AJ9dorBmPBOqSC2k9JEGcyochy63jgCfZlu0
Y0pq72/YB/2AlWdjlxN7aPw=
=6vJ1
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: var out of space

2006-12-18 Thread Jerry McAllister
Howdy,

 Hello,
 
 
 I inherited a freebsd installation with a var slice/mount that is to  
 small and filling up all the time.
 
 What type of info should I provide to allow someone to help me with a  
 solution?
 
 I would very much prefer to not install another drive just for /var.
 
 /usr has plenty of space. Can I mount var off of /usr?
 
 Here is the output of df for starters:
 
 /dev/ad0s1a128990  119970-1298   101%/
 /dev/ad0s1f257998  1852465211478%/tmp
 /dev/ad0s1g 112755734 4533434 99201842 4%/usr
 /dev/ad0s1e257998  2069563040487%/var
 procfs  4   40   100%/proc


You are right, whoever built that machine put all the spare space 
in to /usr (wouldn't be my choice, but...) so you can make use of
that space.

The first thing to do is to figure out what is using the space.
use du(1) for that.
probably something like:  (NOTE: do this as root or single user)
  cd /var
  du -sk *

The most like culprits are /var/mail,  var/spool,  /var/log,  and /var/db
Rather than moving all of /var in to /usr, just move the worst of
those and make symlinks.

Of course you might also want to clean up some of the stuff, for example
if /var/log is taking up all the space, use newsyslog(8) to manage
rotation of logs and clearing of old logs.

But, really your /var is too small so even after you clean up you will
have to move some things.

For example, you can move /var/spool to /usr by:

  cd /var/spool
  tar cpf /usr/spool.tar *
  cd /usr
  mkdir var.spool
  cd var.spool
  tar xpf ../spool.tar
  cd /var
  mv spool old-spool
  ln -s /usr/var.spool spool
Now check things out by doing looking around:   cd /var/spool  should
get you to /usr/var.spool and find all the files in place.  When you
are convinced it is good, then:
  cd /var
  rm -rf old-spool
You might just find some files it refused to rm because flags are
set on them, particularly 'schg'  so you will have to unset those
flags to nuke the files.  
  chflags noschg file_namefor example
Then remove those files by hand.
See chflags(1)

At this point you would have /var/spool actually living in /usr
with no problem.

NOTE that doing the tar to a file and then untarring and also moving 
/var/spool to a different file and checking things first is being a
little more careful(chicken) than absolutely necessary, but I prefer
being safe.   Also, my naming convention (making the directory be
var.spool) helps me keep track of things sort of like using mnemonic
variable names.

This doesn't muck with your partition layout like moving all of /var
in to /usr would.

But, if you really want to move all of /var to /usr and change the
mounts, then use dump/restore as follows:

  cd /usr
  mkdir newvar
  cd newvar
  dump 0af - /var | restore -rf -
  umount /var
  cd /etc
Edit /etc/fstab to remove or comment out the /var line 
  cd /
  rmdir var
  ln -s /usr/newvar var
Check it out - it should work just fine.

Of course, you don't have to use the name 'newvar' for the
directory name in /usr, but it makes it clearer what happened.
  
Now the 260MB in the ad0s1e partition will be essentially unused
for anything unless you mount it as something else.
  
I really think the former solution is a little better, but either 
will work.

NOTE also that a possibly better overall solution that either is to 
completely reinstall FreeBSD from scratch and completely reorganize 
your disk at the same time especially if it is below version 6.1.
Of course, you would want to make complete backups before doing that
so you can put what parts of your data you want to keep back on after
the installation.

But, if you are new to FreeBSD, just moving a couple of things to free
up space in /var will easily give you time to play around and become 
familiar and then you can do the complete re-install later when you 
have a better picture of what you want and after 6.2 RELEASE comes out.
  
jerry

 
 
 and ls -la at / looks like this:
 
 -rw-r--r--   2 root  wheel  802 May 25  2004 .cshrc
 -rw-r--r--   2 root  wheel  251 May 25  2004 .profile
 -r--r--r--   1 root  wheel 6355 May 25  2004 COPYRIGHT
 drwxr-xr-x   2 root  wheel 1024 Nov 29 17:39 bin
 drwxr-xr-x   3 root  wheel  512 Nov  5 15:27 boot
 drwxr-xr-x   2 root  wheel  512 Jan 16  2005 cdrom
 lrwxr-xr-x   1 root  wheel   10 Jan 16  2005 compat - usr/compat
 drwxr-xr-x   3 root  wheel20480 Jan 16  2005 dev
 drwxr-xr-x  16 root  wheel 2560 Dec  1 16:11 etc
 lrwxrwxrwx   1 root  wheel9 Jan 16  2005 home - /usr/home
 -r-xr-xr-x   1 root  wheel  4344469 Nov  5 13:22 kernel
 -r-xr-xr-x   1 root  wheel  4344469 Nov  5 13:22 kernel.GENERIC
 drwxr-xr-x   2 root  wheel  512 May 25  2004 mnt
 drwxr-xr-x   2 root  wheel 4608 Nov  5 13:22 modules
 dr-xr-xr-x   1 root  wheel  512 Dec 17 01:10 proc
 drwxr-xr-x   3 root  wheel  512 Nov  5 13:36 root
 drwxr-xr-x   2 root  wheel 2048 Nov  5 15:27 sbin
 drwxr-xr-x   4 

Re: var out of space

2006-12-17 Thread Anders Gulden Olstad
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Bradley Giesbrecht wrote:
 Hello,
 
 
 I inherited a freebsd installation with a var slice/mount that is to
 small and filling up all the time.
 
 What type of info should I provide to allow someone to help me with a
 solution?
 
 I would very much prefer to not install another drive just for /var.
 
 /usr has plenty of space. Can I mount var off of /usr?

Given that I don't know what version of FreeBSD you're running, I would
first try to move and symlink /var into /usr

Got to single user mode first. Then copy /var with cpio

# find /var -print | cpio -pvdmu /usr

Remove the old /var and make a symlink to /usr/var

# rm -rf /var
# ln -s /usr/var var

Reboot to normal operations.

Second - if all seems like to work well - I would perhaps prefer to
expand the g partition into the old e partition and do a growfs on /usr
to make use of the extra space left over from old /var, IF these two
partitions are close neighbours on the disk.

As I understand it's only possible to growfs within a partition, so we
need to merge the old e partition with the existing g.

Go to single user mode again

# bsdlabel -e /dev/ad0s1

Add the size of the g partition to the f partition in the editor. Delete
the g partition line and save.

Run a growfs on the new g

# growfs /dev/ad0s1g

Reboot. You will probably run into some fsck problems, but that will
hopefully be a one timer.

I have only done the last approach one time myself on a 6.2-RC1 install
- - so any second opinions from some more seasoned users would be grateful.

Don't forget to study the man pages for bsdlabel and growfs - and do
your backups. But it would give you a general idea of how your problems
may be solved.

/Anders
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (FreeBSD)
Comment: Grunbacher Altweizen Dunkel
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFhP1UMVyOPWVstbURAgYRAKCikpLatgEUq5L1bDOccUOf21wrfACfT/YJ
gu41y+tiHOnNyn4yJk2/9pc=
=alP4
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: var out of space

2006-12-17 Thread Anders Gulden Olstad
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Anders Gulden Olstad wrote:

 Add the size of the g partition to the f partition in the editor. Delete
 ^^^^^^
 the g partition line and save.

I mean of course partition 'e' and 'g'!

Sorry!

/Anders
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (FreeBSD)
Comment: Grunbacher Altweizen Dunkel
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFhP6TMVyOPWVstbURAhzvAJ47AkzDjvgbCvdnRAA2OtFFsYhycgCg+PJX
Cu1AvBtZJxonzKBQL912rNA=
=Q/YR
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: var out of space

2006-12-17 Thread Anders Gulden Olstad
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

 Add the size of the g partition to the f partition in the editor. Delete
 ^^^^^^
 the g partition line and save.
 ^^^

I mean of course partition 'e' and 'g'!

Sorry!

/Anders

dev/ad0s1a128990  119970-1298   101%/
/dev/ad0s1f257998  1852465211478%/tmp
/dev/ad0s1g 112755734 4533434 99201842 4%/usr
/dev/ad0s1e257998  2069563040487%/var
procfs  4   40   100%/proc



-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (FreeBSD)
Comment: Grunbacher Altweizen Dunkel
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFhQIUMVyOPWVstbURApa4AKCzXGTSvab8ctegIpT7QHUIbLcvcwCgvQ02
T3UghfNK4xNLNIP2fPqCgHI=
=xs1t
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: var out of space

2006-12-17 Thread Anders Gulden Olstad
-BEGIN PGP SIGNED MESSAGE-
Hash: SHA1

Anders Gulden Olstad wrote:

 Given that I don't know what version of FreeBSD you're running, I would
 first try to move and symlink /var into /usr
 
 Got to single user mode first. Then copy /var with cpio
 
 # find /var -print | cpio -pvdmu /usr
 
 Remove the old /var and make a symlink to /usr/var
 
 # rm -rf /var
 # ln -s /usr/var var

I forgot: Edit your /etc/fstab and comment out the /var line

 Reboot to normal operations.
-BEGIN PGP SIGNATURE-
Version: GnuPG v1.4.6 (FreeBSD)
Comment: Grunbacher Altweizen Dunkel
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFFhRJkMVyOPWVstbURAoOlAKC86TOaYYl6fpbMW41/3bvM7Yc/LACglfih
fF3dS+0oNwW2DtdWp7Oe/Wc=
=usf8
-END PGP SIGNATURE-
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: var out of space

2006-12-17 Thread [EMAIL PROTECTED]

On 17/12/06, Bradley Giesbrecht [EMAIL PROTECTED] wrote:

Hello,


I inherited a freebsd installation with a var slice/mount that is to
small and filling up all the time.

What type of info should I provide to allow someone to help me with a
solution?

I would very much prefer to not install another drive just for /var.

/usr has plenty of space. Can I mount var off of /usr?



You could do that.


/dev/ad0s1e257998  2069563040487%/var


More to the point, you might want to find out what is
filling your /var as that is quite a lot of space being used
if you are not running a mailserver.
du -d1 -h /var (as root) should give you some clues.
The usual suspects are /var/tmp and /var/log, though
on occasion I have had logfile rotation not do its thing
correctly and leave a program writing to a nonexistant
file, filling up /var.


--
--
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: var out of space

2006-12-17 Thread Robert Huff

[EMAIL PROTECTED] writes:

  More to the point, you might want to find out what is
  filling your /var as that is quite a lot of space being used
  if you are not running a mailserver.
  du -d1 -h /var (as root) should give you some clues.

Allow me to suggest instead:

du /var | sort -nr | head -n 25

Run daily (or even weekly), you can become familiar with what's
using space and have a chance to notice when things change.


Robert Huff
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: var out of space

2006-12-17 Thread James Long
 Date: Sat, 16 Dec 2006 23:31:58 -0800
 From: Bradley Giesbrecht [EMAIL PROTECTED]
 Subject: var out of space
 To: freebsd-questions@freebsd.org
 Message-ID: [EMAIL PROTECTED]
 Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed
 
 Hello,
 
 
 I inherited a freebsd installation with a var slice/mount that is to  
 small and filling up all the time.
 
 What type of info should I provide to allow someone to help me with a  
 solution?
 
 I would very much prefer to not install another drive just for /var.
 
 /usr has plenty of space. Can I mount var off of /usr?

Here is a slightly simpler solution than what Anders proposed that 
may work for you.

Find out which sub-directories of /var are the disk space consumers:

du -d1 /var | sort -rn | head

That will list the top ten.  This method assumes you have only one
or two large directories, and that moving them would yield
a substantial reduction in /var disk space usage.

Let's assume that /var/log and /var/db are the top two directories.

Shutdown to single-user mode.  Stop any daemons like syslog, sendmail,
etc. that might write to /var/log or /var/db, since you will be working
with those two directories.

cd into /var and move the log sub-directory onto the /usr mount point,
and then create a symlink to make /var/log redirect to the new location
on /usr:

cd /var
mv log /usr/var-log
ln -s /usr/var-log log

Repeat for /var/db:

mv db /usr/var-db
ln -s /usr/var-db db

Reboot.

This procedure eliminates the need to mess with your disklabel or your 
fstab.

BTW, it looks like your / partition is a bit crowded, also. :)


Jim

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


Re: var out of space

2006-12-17 Thread Garrett Cooper

James Long wrote:

Date: Sat, 16 Dec 2006 23:31:58 -0800
From: Bradley Giesbrecht [EMAIL PROTECTED]
Subject: var out of space
To: freebsd-questions@freebsd.org
Message-ID: [EMAIL PROTECTED]
Content-Type: text/plain; charset=US-ASCII; delsp=yes; format=flowed

Hello,


I inherited a freebsd installation with a var slice/mount that is to  
small and filling up all the time.


What type of info should I provide to allow someone to help me with a  
solution?


I would very much prefer to not install another drive just for /var.

/usr has plenty of space. Can I mount var off of /usr?



Here is a slightly simpler solution than what Anders proposed that 
may work for you.


Find out which sub-directories of /var are the disk space consumers:

du -d1 /var | sort -rn | head

That will list the top ten.  This method assumes you have only one
or two large directories, and that moving them would yield
a substantial reduction in /var disk space usage.

Let's assume that /var/log and /var/db are the top two directories.

Shutdown to single-user mode.  Stop any daemons like syslog, sendmail,
etc. that might write to /var/log or /var/db, since you will be working
with those two directories.

cd into /var and move the log sub-directory onto the /usr mount point,
and then create a symlink to make /var/log redirect to the new location
on /usr:

cd /var
mv log /usr/var-log
ln -s /usr/var-log log

Repeat for /var/db:

mv db /usr/var-db
ln -s /usr/var-db db

Reboot.

This procedure eliminates the need to mess with your disklabel or your 
fstab.


BTW, it looks like your / partition is a bit crowded, also. :)


Jim
Depends on what your cluster size is too for the slice. I created a 3.9 
GB partition for /usr recently with 16kB clusters (not thinking), and 
installed ports-which ate up almost all the free space. After I started 
installing stuff I ran out of space.


Solution (in my case):
-Delete files (otherwise tunefs has no effect).
-Reboot into single-user mode.
-Run tunefs on slice setting the average filesize (-f flag) to something 
a lot lower.

-Boot into multiuser mode.

Voila! Problem fixed.

In your case though, you may want to just backup and redo the system if 
stuff fills up far too quickly, or look into circular buffer logging 
with syslog. I don't remember how to accomplish it but it has been done.

-Garrett
___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]


var out of space

2006-12-16 Thread Bradley Giesbrecht

Hello,


I inherited a freebsd installation with a var slice/mount that is to  
small and filling up all the time.


What type of info should I provide to allow someone to help me with a  
solution?


I would very much prefer to not install another drive just for /var.

/usr has plenty of space. Can I mount var off of /usr?

Here is the output of df for starters:

/dev/ad0s1a128990  119970-1298   101%/
/dev/ad0s1f257998  1852465211478%/tmp
/dev/ad0s1g 112755734 4533434 99201842 4%/usr
/dev/ad0s1e257998  2069563040487%/var
procfs  4   40   100%/proc


and ls -la at / looks like this:

-rw-r--r--   2 root  wheel  802 May 25  2004 .cshrc
-rw-r--r--   2 root  wheel  251 May 25  2004 .profile
-r--r--r--   1 root  wheel 6355 May 25  2004 COPYRIGHT
drwxr-xr-x   2 root  wheel 1024 Nov 29 17:39 bin
drwxr-xr-x   3 root  wheel  512 Nov  5 15:27 boot
drwxr-xr-x   2 root  wheel  512 Jan 16  2005 cdrom
lrwxr-xr-x   1 root  wheel   10 Jan 16  2005 compat - usr/compat
drwxr-xr-x   3 root  wheel20480 Jan 16  2005 dev
drwxr-xr-x  16 root  wheel 2560 Dec  1 16:11 etc
lrwxrwxrwx   1 root  wheel9 Jan 16  2005 home - /usr/home
-r-xr-xr-x   1 root  wheel  4344469 Nov  5 13:22 kernel
-r-xr-xr-x   1 root  wheel  4344469 Nov  5 13:22 kernel.GENERIC
drwxr-xr-x   2 root  wheel  512 May 25  2004 mnt
drwxr-xr-x   2 root  wheel 4608 Nov  5 13:22 modules
dr-xr-xr-x   1 root  wheel  512 Dec 17 01:10 proc
drwxr-xr-x   3 root  wheel  512 Nov  5 13:36 root
drwxr-xr-x   2 root  wheel 2048 Nov  5 15:27 sbin
drwxr-xr-x   4 root  wheel 1024 Jan 16  2005 stand
lrwxr-xr-x   1 root  wheel   11 Nov  5 15:27 sys - usr/src/sys
drw---   7 root  wheel 2048 Dec 17 01:09 tmp
drwxr-xr-x  18 root  wheel  512 Jan 16  2005 usr
drwxr-xr-x  21 root  wheel  512 Nov  6 11:54 var


Thanks for any help,
Brad

___
freebsd-questions@freebsd.org mailing list
http://lists.freebsd.org/mailman/listinfo/freebsd-questions
To unsubscribe, send any mail to [EMAIL PROTECTED]