I’ve just finished moving data over to a new fileserver. And for the first time, I’m trusting file storage to Linux… Ubuntu Hardy Heron, to be precise.
After much deliberation regarding clustering filesystems and block-level replication, I’ve decided to keep it simple. The fileserver is a 2TB array on an XFS filesystem. Replication is passed to a read-only failover server by rsync and failover is handled by scripts and proxies. Simple and effective. The last thing I want is a system that introduces downtime when dealing with complexities that were supposed to save me from downtime.
I needed a high performance fs with quotas and nfs support, so I decided on XFS. I’ve never really liked ext(x) filesystems and I’ve heard a lot of good things about XFS.
Moving hundreds of gigabytes from a UFS FreeBSD system to an Ubuntu XFS system was not the easiest thing. I had moved most of the data over before quotas were enabled on the XFS (you have to edit GRUB to enable XFS quotas on / — who knew??). I mounted the old data via NFS and then rsynced (-av) it over. I needed root access to the source and I decided to do it this way instead of changing my sshd on the source. So anyway, not sure what happened, but after I created the uid’s my xfs_quota gave some pretty alarming stats.
xfs_quota -x -c report / showed that most of my uid’s were using 8E (yep — exabytes) of data! Being that their quotas were 30G and the whole array is only 2TB, I found this hard to be believe. The fix? Well, I created a new user with a new uid, set the quota, and then did a chown -R. It worked — block usage was back below 30GB. Don’t ask — just move on
Although it’s pretty hard to beat apt-get for simplicity, I still kind of know why I stick to FreeBSD. There are somethings that are vastly superior with this new fileserver:
1) FreeBSD 7.0 couldn’t get the right geometry from the 3ware RAID controller. I tried and tried and then decided to move to Ubuntu with XFS.
2) MySQL queries are still a million times faster than FreeBSD — even in comparison to FBSD 7.0 with its new malloc(). Even though it’s a fileserver, I still need to access the ndbcluster.
3) With LVM and XFS, I should be able to resize the partitions without too much pain. On FreeBSD, I’m still doing very time-consuming dump and restore’s
4) Look at all the stuff I can install! And no compiling either!
I don’t think the weaknesses are enough to make me switch back to a FBSD fileserver, but here they are:
1) Damn Linux binaries don’t seem to have the same options as FBSD. Sure — sometimes they have better features, but Murphy makes it so only the bins I regularly use are weaker on Linux. Where’s the -d option for du?
2) xfs_quota support is a bit alien on Ubuntu — I do not have feelings of great confidence
3) The NFS-quota support on FBSD 7.0 worked flawlessly for me… from what I’ve read I’m not even going to try it with Linux.
4) Well I guess it’s not a big deal that the NFS-quota wouldn’t work — the fscking Linux fileserver can’t seem to use the bi-map from my FBSD router as well as the old FBSD fileserver did. Suddenly, ftp can’t connect — srry, it can connect but can’t do an ls or send data.
5) I set up iptables (still not a big fan of the syntax), did iptables-save, rebooted and watched them all disappear. Nice. Thanks Ubuntu. I would’ve stuck with ufw, but finding useful documentation took more time than it was worth. Fix? Script in iptables-restore during ifup.
6) What did Ubuntu do to pure-ftpd? Do you seriously have to put each variable as a separate file in the conf directory? Wow — that sucks — what was the logic here??
Anywho, the fileserver is up and happy and I like looking at all that free space in my cacti graphs. All in all, I’m pleased with Ubuntu and XFS and I managed to do the moving without causing any downtime.