Archive for category Solaris

New LISA Blog Entry: ZFS: a Filesystem for Modern Hardware

I just published a blog entry on the Usenix blog for LISA 2009. “ZFS: A Filesystem for Modern Hardware at LISA 2009″

No Comments

Syslog Project: Limiting Logfile Size

I had a busy weekend and Monday, so I didn’t get to work on this project as much as I would have liked.

Today, I worked on splitting out the emerg, crit, and alert messages so they may be acted upon more rapidly.  I also got the max file size with rotation set up for all the files that will be read by SEC.  The rotation was incredibly simple with rsyslog.

After today’s work (and some new filesystem creation) the config file for rsyslog looks like this:

$ModLoad immark
$ModLoad ommail
$MarkMessagePeriod 1200
$ModLoad imuxsock
$ModLoad imudp
$UDPServerAddress *
$UDPServerRun 514
$ModLoad imtcp

$template HostDirs,"/logs/archive/%HOSTNAME%/%$year%/%$month%/%$day%/%syslogfacility-text%-%syslogseverity-text%.log"

$outchannel all_log, /logs/current/all.log, 52428800, /logs/current/rotate.all.log.sh
$outchannel emerg_log, /logs/current/emerg.log, 52428800, /logs/current/rotate.emerg.log.sh
$outchannel crit_log, /logs/current/crit.log, 52428800, /logs/current/rotate.crit.log.sh
$outchannel alert_log, /logs/current/alert.log, 52428800, /logs/current/rotate.alert.log.sh

*.* ?HostDirs
& $all_log

*.=emerg $emerg_log

*.=alert $alert_log

*.=crit $crit_log

Unless something unforeseen comes up, I think I’m probably done with the rsyslog config file.  All the heavy lifting will be done by SEC.

First, I’ll write SEC config files that parse through the emerg, alert, and crit logs in the same way a Perl script does today.  It shouldn’t be too hard to port a Perl script in to SEC config language.  The hard part will be the handling of everything that goes in to all.log.

This morning, rsyslog 4.2.0 was released with a tag of STABLE.  Given the stable tag, I’ll probably update my package to 4.2.0 and start using it in a few days.

No Comments

Syslog Project: Initial configuration

So, I got the package built and installed yesterday.  Today I worked on an initial configuration file.

For long term storage, I want to store the data in a directory structure like: /var/log/<hostname>/<year>/<month>/<day>/<facility>-<severity>.log

I plan to use SEC to handle the filtering of the log messages and acting on them.  To make it easy to get log entries into  SEC, I’m going to send all log entries to a single log file.

$ModLoad immark
$ModLoad ommail
$MarkMessagePeriod 1200
$ModLoad imuxsock
$ModLoad imudp
$UDPServerAddress *
$UDPServerRun 514
$ModLoad imtcp
$template HostDirs,"/var/log/%HOSTNAME%/%$year%/%$month%/%$day%/%syslogfacility-text%-%syslogseverity-text%.log"
*.* ?HostDirs
& /var/log/test.log

Tomorrow, I’m going to use an output template to limit the size of test.log file.

No Comments

Syslog Project: Choice of Syslog Daemon

First choice to make in my syslog project is which daemon to use.  Syslog-ng seems to be the best supported by the community.  Rsyslog is also another contender.

I started down the path of using Syslog-ng.  Solaris is our platform of choice for infrastructure systems.  I’ve spent several weeks (part time) trying to get Syslog-ng to compile on Solaris 10.  I’ve had different problems on x86, sun4u and sun4v.  I’ve tried 3.x, 2.x, and 1.6.x.

After a particularly frustrating afternoon of build errors with Syslog-ng, I decided to give Rsyslog a shot.  I first downloaded the version dubbed ’stable’, 3.22.0.  It had a couple of build problems right out of the box that were Solaris specific.  They showed up clearly on the mailing lists.  The build problems were addressed in the 4.x branch, so I downloaded 4.1.7.  It compiled and installed without incident.

At this point, I think I’m going with Rsyslog.  It has all the features I need and doesn’t look like it will consume much of my time.

Tomorrow I’ll try to create a package for Solaris with SMF and default config file.

No Comments

New Project: Scalable Syslog Infrastructure

I’m starting a new project.  I need to refresh our aging syslog infrastructure.

Currently, we have a FreeBSD based central syslog server.  It receives about 10 million syslog messages per day.  They messages come from a mix of Solaris, Cisco, Windows, VMware, and NetApp servers.

The only automation is a simple perl scripts that generates an email when an event is alert or higher severity.  I would like to change the way we react to syslog messages.  Instead of reacting solely on the basis of severity, I would like to process all the well known, frequently hit cases.  Over time we could reduce the number of unknown log messages that appear in the system.

In the end, we will have fewer alerts and a deeper understanding of what is going on in our systems.

No Comments

Update to post about OpenSSL 0.9.7m on SPARC

I just wanted to update my previous post about OpenSSL 0.9.7m on SPARC.

It appears that 0.9.7m will be the terminal release from the 0.9.7 chain. 0.9.8 has been stable for quite some time now, and 1.0.0 is in beta. It looks to me like if you want to use an up to date OpenSSL on your SPARC box, you have no choice except to track the 0.9.8 chain.

I’ve verified that 0.9.8k works well in my environment. The only problem will be if someone has an application that only works with 0.9.7.

No Comments

Data migration from SUSE to NetApp

I’ve been tasked with moving about 6T of data from an aging SUSE box (9.x) to a CIFS share on a NetApp. The data is currently being shared out via SAMBA, but we want to retire the box because it is a few Dell PowerEdge 220s trays going out of support.

My initial thought was to mount the CIFS share on the NetApp from the SUSE box and use rsync to do the data migration. I figured that if I only moved the data across the network once I would get the best performance. I had a ton of trouble with this. I’m guessing the mount_smb in this old SUSE box just wasn’t up to snuff. I got all kinds of permissions problems and timeouts on the writes. For the data that actually did get copied, I only got about 100G-200G per day throughput. I know the NetApp is capable of significantly higher throughput, so I looked for another way to move the data.

Since my normal tool of choice is Solaris, I looked for a Solaris solution. Solaris 10 update 6 is the current version we use in my shop. I couldn’t find an elegant solution on Solaris 10. What I did come up with was mount_smbfs on OpenSolaris.

I downloaded a copy of OpenSolaris 2009.06 B108 and installed it in a VM. I mounted the old and new locations via mount_smbfs and I’m using rsync to do the copies. I don’t have the performance information yet, but after about four hours there have been no errors and the speed looks *very* good. Even though I added another network hop, I was able to remove the weakest link from the data flow, mount_smb on SUSE 9.x.

If I can remember, I’ll update with some performance numbers when I have them.

No Comments

grrr. . . Sol10 U6 slower than U1 on a v210

Isn’t that a kick in the pants. Unpatched Sol10 U1 is MUCH faster than fully patched U6 or fully patched Sol9 on a Sunfire v210. At least for the most important web app I host.

I’m not talking 10% or 15% either. I’m talking 2x-3x.

No Comments

OpenSolaris on Amazon EC2

Solaris in the cloud! Amazon and Sun team up to offer OpenSolaris on the EC2 platform.

http://www.amazon.com/gp/browse.html?node=643950011

No Comments

OpenSSL 0.9.7m doesn’t compile on SPARC

OpenSSL 0.9.7m doesn’t compile on SPARC. The problem is that the Makefile assumes -mcpu was deprecated on SPARC like it was on i386 for GCC. This is not the case. The author has fixed the problem in CVS and it should be corrected in 0.9.7n. 0.9.7m was not a bugfix version, but rather a feature addition, so this isn’t really a big deal.

http://rt.openssl.org/Ticket/Display.html?id=1493

No Comments