Matt Riddell wrote:
> -----BEGIN PGP SIGNED MESSAGE-----
> Hash: SHA1
> 
> Darrick Hartman wrote:
>> Matt,
>>
>> It should be, but before you do such stuff, take a look at what's in 
>> /var and what other options we have put in place to do what you think 
>> you need to do. :)  There are options in the rc.conf file which do 
>> things like "preserve logs" which would set up /var/log as a link to 
>> /mnt/kd instead of leaving log in tempfs.  Some things like CDR files 
>> are already stored on /mnt/kd and already are setup with symbolic links.
>>
>> Perhaps let us know what you're trying to accomplish.  It's probably 
>> possible to do what you're trying to do without using a stick of 
>> dynamite and a baseball bat.  Otherwise you'll have to maintain your own 
>> images (which you may want to do anyway).
> 
> Heh :-)
> 
> We had a couple of machines crash because /var/log got filled up.  So,
> I'm kinda trying a few options here.
> 
> Firstly I've set up remote syslog - didn't seem to work for normal
> messages, then remote syslog for Asterisk - worked but hard to
> differentiate between lots of machines.
> 
> I change VM to go to email.
> 
> I have around 700Mb free on the flash in the root partition, so I
> figured temporarily I'd be best off storing there.
> 
> I'm not using a key disk, I'm am however using unionfs.
> 
> I realise that using /var off the root will eventually fill up, but am
> also removing /var/log/messages.* (i.e. .0, .1 etc).
> 
> I'm using a SanDisk CF with wear levelling, so the writes shouldn't be a
> problem (except for the fact the disk will shrink as sectors get marked
> bad for overuse).
> 
> At this stage, this is just a test here in the lab at work, but
> depending on how it goes I'll roll it out.
> 
> When the boxes crashed, they crashed hard and required someone to reset
> the power.  I've now changed /proc/sys/kernel/panic to 5 (think that's
> the file) and so the boxes will restart themselves if they panic.

Matt,

Ok.  You should be OK setting PERSISTLOG in rc.conf.  Here's a segment 
from the rc file that runs at boot.

   if [ -n "$PERSISTLOG" ]; then

     if [ ! -d /mnt/kd/log ]; then
       mkdir /mnt/kd/log
       touch /var/log/wtmp
     fi

     ln -s /mnt/kd/log /var/log

   else
     mkdir /var/log
     touch /var/log/wtmp
   fi


SO, if you set PERSISTLOG to a value, AND create a directory in /mnt/kd 
(I know you don't have a key disk, but the unionfs partition will be 
used and has /mnt/kd for historical purposes), then all the logging will 
go to that directory on the flash drive and not to the ramdisk.

The panic level is a good idea.  I've only had a box do that to me one 
time (because openvpn logging was set to a verbose level).  Not good 
when that happens in the middle of the day.

Darrick
-- 
Darrick Hartman
DJH Solutions, LLC
http://www.djhsolutions.com
http://www.djhsolutions.com/wiki

-------------------------------------------------------------------------
This SF.Net email is sponsored by the Moblin Your Move Developer's challenge
Build the coolest Linux based applications with Moblin SDK & win great prizes
Grand prize is a trip for two to an Open Source event anywhere in the world
http://moblin-contest.org/redirect.php?banner_id=100&url=/
_______________________________________________
Astlinux-users mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/astlinux-users

Donations to support AstLinux are graciously accepted via PayPal to [EMAIL 
PROTECTED]

Reply via email to