Archive for the ‘Linux System Administration’ Category

“Resource Already Exists” on a Citrix Netscaler when adding an SSL certificate

Thursday, February 2nd, 2012
No Gravatar

I ran into a bit of trouble with a Citrix Netscaler recently. It wasn’t letting me upload an intermediate CA certificate for geotrust so I could link it to a server certificate I had already added. It was giving me the error when uploading the intermediate CA cert that the “Resource already exists”. I found this quite helpful page: http://support.citrix.com/article/CTX117284 Which tells you to compare Issuer and Serial of the certificates on the thing. I couldn’t get this to work on the netscaler’s shell itself, so I downloaded all of the certs in /nsconfig/ssl/ to my linux workstation, and used this script to compare all of the serials: 

Common RAID and LVM RAID1 Setup

Wednesday, August 31st, 2011
No Gravatar

My last RAID discussion was about growing the size of an existing RAID1 partition. I thought I’d back up a little bit and show an example of how we get a RAID1 in the first place.

Bacula Server Backup Complexities

Friday, August 12th, 2011
No Gravatar
Bacula is a very powerful backup managing product. Free (as in beer and speech), and quite mature. I recently had the task of setting up proper backups of a new server to a backup server. The way we wanted to do it caused a lot of complexity. I needed to minimize bandwidth use, minimize disk use, and keep increments back to about two weeks. I also wanted multiple jobs to be running at the same time, and didn’t want to transfer a complete full backup every month.

Bacula lets us do that! But it’s not immediately obvious how things work from the documentation. The documentation is probably geared towards someone familiar with this style of backup product, but coming from using rsync for backups, I had some learning to do. I’m still learning in fact, so if you have a better way of doing things, let me know!

Growing a RAID1 While the Server is Live

Monday, April 11th, 2011
No Gravatar

I recently ran into a problem that most of us are very familiar with: the fileserver has nearly run out of storage space!

There were a few things compounding the upgrade.

  1. The server has only two SATA ports
  2. Both SATA ports were in use by the existing RAID1 so I could not connect another RAID array and rsync the files across.
  3. I needed to minimize downtime as the fileserver ran an important accounting and project management application. 10 hours of downtime to run a grow operation using a live-cd was unacceptable.

Curiosity vs Risk

Monday, November 15th, 2010
No Gravatar

Curiosity killed the cat, right? I bet if the cat had anything to say about it, his mindset was still worth it.

I was recently thinking about what drove me to become a programmer when I was asked if it’s hard to write code. I realized that the range of understanding necessary to stop any career from being akin to magic is narrow. With some basic understanding of something, you can start learning the rest of it. I came to the conclusion that programming was one of many occupations that could be a natural good choice for my curious personality.

Interacting With a chroot Environment

Thursday, July 15th, 2010
No Gravatar

Some services are capable of running in a chroot environment without having to build a separate chroot environment for them. OpenSSH and bind9 are both examples of chroot aware services. Simple config options will get you on your way to secure use of either of those. But for other services, like Apache2, things get more complicated.

It’s sometimes helpful to make a stand alone chroot environment so that you can run multiple versions of software. For example, it’s sometimes useful to run one version of php for your live server and experiment with upgrading to the newest php by running the newest php in a chroot. But how can you interact with the services running in the chroot?

Rebel Code

Friday, January 29th, 2010
No Gravatar

I was passed a very loved copy of Rebel Code by Glyn Moody. It’s about the beginnings of GNU, GPL liscensing, Linux, the Free Software Foundation, and the Open Source movement.

Running a completely different linux distro with chroot

Wednesday, October 21st, 2009
No Gravatar

The Linux chroot environments are often used to run pieces of software that are not compatable with the running distribution. For example, people running 64 bit Linux distributions will often create a 32 bit chroot environment based on that same distribution to run 32 bit software that might have better support. Adobe’s flash is a good example from the past: before 64 bit linux really gained popularity, only the 32 bit version of Adobe flash was available natively. But what if you need to install something that isn’t supported natively by your distribution at all, but is under a different distribution, and you’d like to keep package management the same?

Logrotate

Monday, September 21st, 2009
No Gravatar

Is the log for your custom app getting a little long? Have a need to keep your logs around but would like to keep their size down to a more managable size? Logrotate is the easy and powerful answer. You can tell logrotate to rotate your logs on various different triggers (daily, weekly, some other time, on a specific file size, on a specific number of lines, etc). You can tell it what to do before and after rotating (to put mysql into a safe state, or to restart apache to rebuild deleted log files, for example).

Expandable and fault tolerant filesystem

Tuesday, August 18th, 2009
No Gravatar

There are several problems with trying to create a large filesystem to store important data:

  • raid 5 isn’t expandable unless you find a harddrive that’s the same size as the others
  • LVM (Linux Volume Management) isn’t fault tolerant by itself, so if you lose one drive, your data is lost.

One of the best solutions I’ve found in dealing with these problems involves combining LVM with the Linux software RAID. You can cut up your collection of harddrives into common sized partitions, raid them together into several RAID5 collections (or even RAID1 collections), and LVM the resulting RAIDs.