Showing posts with label freebsd. Show all posts
Showing posts with label freebsd. Show all posts

Friday, March 13, 2009

FreeBSD 7 and the SiI 3114 SATA150 controller

Well, it turns out that the issue with my ZFS box was only that my SiI 3114 SATA card hard outdated firmware. FreeBSD 7 with ZFS has been running solid for a few days now while under moderate load from Samba.

I discoved the solution after having the exact same types of problems with my setup and a Debian software Raid-6 configuration. After a bit of googling for "SiI 3114 debian timeout" I found my answer. A firmware update and a FreeBSD reinstall later, everything was peachy.

I'll pick up where I left off with the media server part of the project soon.

Saturday, March 7, 2009

I'm sorry FreeBSD...I'm moving out and I'm taking the Raid with me

Well, at least I managed to figure out the issue with FreeBSD not booting. Unfortunately, I can't get it to stabilize with ZFS and it looks to be the fault of the ATA driver. It's sad but it seems like the community has lost much of it's luster of the last few years. My questions in the freenode irc channel fell on deaf ears. It appears I'm not alone, even in the newsgroups many well documented questions go unanswered unless very simple. Have all the helpful gurus moved to other operating systems?

And so I've moved to debain with md raid-6. It's not quite everything i'm dreaming of, but at least it works. Hopefully, in a couple of years when I build my next home raid, ZFS will be mature on a platform that will work on my old hardware. My home server is always my previous desktop.

Update: the problem is fixed and ZFS is running without issue.

Wednesday, February 18, 2009

Streaming Video from FreeBSD to XBox 360..or Not

After much searching, it seems as though the options for serving up video from my FreeBSD server to my XBox 360 are quite limited. With the help of google and a year old article on this very same topic, It seems as though there are five options:

Name In Ports? Supports 360? Transcoding? Free? Last Release
GMediaServer No With Patch No Yes 11/10/07
MediaTomb Yes No Yes Yes 03/01/08
360MediaServer No Yes Yes Yes 08/29/07
uShare Yes Yes No Yes 12/09/07
Fuppes No Yes Yes Yes 12/19/07

Ahh, if only MediaTomb worked with the 360, life would be so much simpler.

Given the options it looks like my only real choice here is Fuppes. Although, that means I’m going to need to manually compile and configure it. Good thing Fruppes comes with complete instructions on how to do this. Compiling things in FreeBSD can sometimes get kind of messy.

Edit: Right after I got to this point ZFS vomited everywhere and now FreeBSD refuses to get past the boot0 stage unless my onboard SATA controllers are both disabled. If you are interested, read more about it on the luck.freebsd.questions mailing list.

Update: I've since fixed this issue. FreeBSD 7 with ZFS is working great.

ZFS with LZJB Compression

I've still been working on tweaking out my FreeBSD-based 6 Disk ZFS setup. It's mainly going to be used for file storage and so it had crossed my mind that perhaps it would be best to use some type of filesystem level compression. Initially, as in all of the tutorials, I was going to use gzip. However, with a small amount of googling I discovered that LZJB compression is far superior in most cases. In fact, because it's cpu and memory utilization is so low, LZJB outperforms an uncompressed filesystem under many circumstances. This is mainly due to fewer bytes being read or written to the disk. Also, with the 2x-3x compression, I can easily bump up my redundancy from two to three copies of important files with almost no cost.

The real question is, is my compressed data more susceptible to corruption? Of course, the answer to this is yes. Each bit is holding more information and so flipping it causes more information to be lost. It seems to me though that the triple parity more than offsets this. I just need to remember to set a zfs scan on crontab.

Truthfully, using compression in a filesystem leaves me a bit uneasy under any circumstances. I lost more than one installation to stacker and diskdoubler corruption back in the day. It may not have been a lot of bytes I lost, but those bbs lists and space quest save files were worth a lot more to me then than any image or music file is to me now.

Thursday, February 5, 2009

FreeBSD ZFS Running Strong, Rocking Hard

I decided about a month ago to back up my current Ubuntu-based file server and put ZFS with raidz on it. Tonight, I finally got around to doing it. If you haven't heard about ZFS or Raidz, I suggest being ready to have your mind blown.

I've been a FreeBSD user on and off since about 2.6. Initially, I only chose it because I wanted the help of all of my FreeBSD guru buddies on IRC (I really should drop in and say hi to those guys, it's been too long). It really grew on me though. I feel extremely comfortable with it's kernel, filesystem layout and ports system.

That's why I was so happy to hear that it supported ZFS out of the box in 7.0. However, after a bit of research and reading about all the tuning necessary and how out of date the FreeBSD 7.1 branch of ZFS was, I thought I'd go to the source instead. I decided to try OpenSolaris.

Unfortunately, OpenSolaris 2008.11 refused to boot. It would get to the copyright notice and just lock up solid. I messed around with it and tried some kernel flags but nothing seemed to help. In the end I went back to my old friend FreeBSD.

The last version I used was 5.0 as a file server in my dorm room. One of the best things about FreeBSD is it has a winning formula and it hasn't changed much in all of the years i've used it. I just picked it up and everything was right where I remembered it being. Microsoft could learn from this example of strong consistency (cough, office2007-vista-windows 7, cough).

The only issue I ran into is lack of support for my integrated NIC. I didn't feel too bad about that though. The server is running on an old AS-ROCK 939Dual-SATA2 motherboard with Realtek RTL8201CL onboard. It's pretty much trash anyway. So I went over to my box of PCI cards, grabbed an old Intel 82558 Pro NIC, and off I went.

After that it was a hop skip and a jump to getting ZFS going. I added the standard lines to my loader.conf to tune for conservative memory usage and sprinkled in some vfs.zfs.vdev.cache.size="5M" to compinsate for my meager one gigabyte of ram. After that simply added zfs_enable="YES" to my rc.conf and off I went. One command and less than a second later it was finished:

# zpool create pool raidz2 ad4 ad6 ad8 ad10 ad12 ad16

I had a full 2TB, 6 drive, double parity raidz array ready to go. Wow.

For an even bigger shock take a walk down memory lane with me and check out what I had to go through to build my RAID-5 array in FreeBSD 5.0. What a pain in the ass that setup was. The funniest part is that it's not even taking into account how software raid in 5.0 would randomly crash or how the raid service would have to be manually started from a command line after each boot.