So, XFS is officially the best file system around at the moment. Why do I say this?
1.) It’s fast, especially when I have around 50,000 3MB-4GB files being pulled by apache for a site almost constantly.
2.) It supports online defragmenting.
3.) When I know the drive is going to fail, backup/restore is a piece of cake.
#3 was the reason for this post.
I had to move a bunch of stuff from one drive to another. Normally this is easy, just move all the said shit.
This is not so easy when it’s / with linux installed on it.
Normally, I’d say fuck my life a lot and have to reinstall everything, since moving an OS is never an easy task. With windows, might as well forget about it. I tried that once, no go at all.
Linux theoretically doesn’t care, which is awesome. The problem I was stuck at was how to do this efficiently, with minimal downtime. This is on a production server after all.
Did some research, found out that normally this would involve firing up a live CD and using dd to mirror image the drive to another one, then adjust the partition size on the new drive since it’s bigger, then expand the file system size to match it. This would have meant close to a day of downtime. Not an option.
XFS saves the day. There’s a few awesome tools that come with it, but not by default, that make this job quick and easy.
How I saved the day with these great tools: xfsdump, xfsrestore, & a Debian Lenny live CD.
1.) Quickly rebooted to the live CD and ran xfsdump to copy the file system to an external.
2.) Quickly rebooted back to the installed version, with only 32 minutes downtime to copy the drive to the external.
3.) While everything was back up, used xfsrestore to put the image onto the hard drive that was getting swapped. Nice thing is, I was able to have the drive pre-partitioned and pre-formatted for this already.
4.) Once done, shutdown and drive swap, followed by another quick boot into the live CD to reinstall grub to the new drive.
5.) Reboot back to the installed version, and everything worked perfectly, with only another 10 minutes of downtime.
So, I replaced the OS drive in under 45 minutes of downtime. Beat that!
Well, overall I give it a high rating. 8.5 sounds about right. I was impressed by a lot of it, yet hated some major portions.
All in all, I’ll give a short non-biased report.
The good:
Stability – It’s virtually impossible to fuck up, and doesn’t crash.
Looks – Sure, its GNOME, so nothing new, but they did some good work on it.
Ease of use – As long as you can deal with the lack of current software, it’s simple to use.
Easy to update – It takes a second to get used to, but the package manager is nice.
ZFS – Finally something that doesn’t use EXT3 natively. Not that there’s anything wrong with EXT3, but there’s better (XFS).
The bad:
Lack of software – compiling everything yourself sucks, the packages in the repository are all old compared to other operating systems.
Compiling sucks – getting a development environment set up and working is a pain, this is where I killed my 2nd install.
Sluggish – Yes, they make an x86 version, but it’s sluggish compared to other OS’s. Might be VMWare.
All in all, it’s something I’ll come back to again at some point. Sun is sending me a free install CD, so once I get my nice box setup, I’ll give it another try. Maybe by then the above stated bad things will be better.