Wednesday, January 21, 2015

How I got started with BSD

I watch the BSDNow show, and a little while back they asked people to submit stories for how they got started with BSD.  I didn't submit my own story, but listening to the stories submitted by others I figured I'd share it on my own crappy blog.

So back in late 2001 or early 2002 I started looking into Linux and at the time the distribution I decided to use was SuSE. An uncle at the time worked for a university that actually mirrored SuSE (this was before the Novell acquistion and the creation of OpenSUSE). I want to say SuSE 7.3 was my first version and I remember he got me 3 burned CDs. I had at the time a Gateway with a Celeron, 40GB Hard Drive and 1 GB of Ram that came pre-loaded with Windows XP.  However I wanted to try Linux and decided to install it over the whole thing.  I didn't know about Gnome or KDE and I think SuSE defaulted to gnome so that's what I installed.  I used SuSE for quite some time and kept my system pretty up to date and as the releases came out I downloaded them, usually via torrent.  I think the last version I used was 10.2 or possibly 10.3 although it was OpenSUSE at that time.

Now I was in University at that time, and had been playing around with other systems. Briefly Ubuntu, but frankly I hate that and will never use it again. I had an old laptop I ran Linux Mint and it was pretty fun, but had no practical purpose other than giving life to an older laptop.

Then my junior and senior year I came work for the computer science department, as a lab assistant. Basically I just helped people print, login and a few other things, but hey it paid money.  Well the guy in charge was for a while actually running the department behind an OpenBSD firewall.  I had never heard of OpenBSD before this, and well decided to look into the world of BSD.  I tried to figure out OpenBSD, but I'll be honest I was a little scared because I was used to the GUI filled linux world.  However I also stumbled into FreeBSD and it's installer reminded me of something like slackware which I also played around with a little before then.

I didn't however end up running any BSD systems until I got into my current position.  I mostly had Windows knowledge and some Linux knowledge and they mostly used Windows and had some CentOS systems and not much else.  However then came a problem that needed an immediate fix.  A Cisco 7206 (I think that's what it was) was being DDOS'd or otherwise kept getting knocked offline and other than restarting the equipment Cisco wasn't any help because as I understood someone let the smartnet lapse and well Cisco doesn't help you much without that.  One of the other guys had this great idea - or idea anyway - he suggested getting some hardware that was just laying around  and putting OpenBSD on it.

They basically took the config of the Cisco device and made a similar config in PF and the 7206 basically became a glorified media converter for some DS3s.  Over time I eventually become more involved in the networking where I work and started learning OpenBSD.  We also started using FreeBSD leveraging the awesomeness of ZFS for storage servers, everything from email archiving to backup systems (using bacula) and even just web servers, dns servers and mail servers.  We also replaced a bunch of Cisco 2801 devices with OpenBSD firewalls mostly because we did away with T1s and most of our customers now have Ethernet connections or are provided copper pairs.  We now maintain some 35 customers with OpenBSD firewalls, plus 8 core firewalls at various locations setup in CARP pairs, plus close to 70 Soekris based devices running OpenBSD using OpenVPN to connect back to our main campus.

Perhaps the most surprising thing is is that all of this is actually happening in East Texas, an area not known for being technologically forward.

Now we are still a Windows environment on the desktop and still use Windows servers for several purposes, but whenever possible BSD is the preferred OS for simplicity of setup and use, not to mention the ease of securing and the large community of support that is available should you have a question or need something resolved.

raidz

One of the more interesting things about ZFS is the raidz functions which are raidz, raidz2 and raidz3 - and are supposed to be technically equivalent or at least similar to RAID-5, RAID-6 and well there isn't anything comparable to raidz3 that I know of, anyway I recently had to setup a system using raidz, mostly because I don't trust the hardware RAID controller I am using anymore and just setup all the disks in what the card refers to as single disk mode, which is apparently different than JBOD at least the way this card does things.

I found this google doc that someone else made that explains all the cost involved in each raidz type as far as percentage of usable space afterwards.

If you want or need a crash course in raidz or zfs in general, this guide provides a lot of good documentation.

If you're just starting out with ZFS definitely look it over, especially the VDEVs section.

In case you're curious my new setup was 3 raidz vdevs of 5 1500GB disks in making one zpool which gave me 16T of space.

NAME        STATE     READ WRITE CKSUM
        vol         ONLINE       0     0     0
          raidz1-0  ONLINE       0     0     0
            da1     ONLINE       0     0     0
            da2     ONLINE       0     0     0
            da3     ONLINE       0     0     0
            da4     ONLINE       0     0     0
            da5     ONLINE       0     0     0
          raidz1-1  ONLINE       0     0     0
            da6     ONLINE       0     0     0
            da7     ONLINE       0     0     0
            da8     ONLINE       0     0     0
            da9     ONLINE       0     0     0
            da10    ONLINE       0     0     0
          raidz1-2  ONLINE       0     0     0
            da11    ONLINE       0     0     0
            da12    ONLINE       0     0     0
            da13    ONLINE       0     0     0
            da14    ONLINE       0     0     0
            da15    ONLINE       0     0     0

Also on the other side of this if you're using hardware raid it is probably always a good idea to use a third party utility such as Nagios, PRTG or whatever utility you may use to monitor it if possible. The good news for me is that the Nagios exchange shows several options for checking zfs and zpools so I'll be implementing that shortly. It seems that even PRTG can monitor ZFS via SNMP.

I don't have a clue

I'm so very tired. It's almost all the time now.