Ricardo Correia has been porting Sun’s recently GPLed ZFS to Linux using FUSE. I’ve been playing with it and I’m quite impressed. The FUSE port is alpha quality, so isn’t to be trusted with important data yet – but it’s fun to play with.
ZFS merges the concept of a volume manager and a filesystem. It’s a bit like LVM, with zpools being volume groups and zfs being formatted logical volumes. Zfs “partitions” can change size at any time in any way. It’s also hierarchical, so zfs partitions can have child partitions inheriting their attributes. It also does away with fstab – all mount points are specified as zfs attributes and are automatically mounted when a zpool is brought online.
ZFS does some of the following cool things too:
- protects from data corruption by hashing all blocks (and allows live “scrubbing” of data to check against those hashes)
- (almost) instantaneous snapshots (though the FUSE port doesn’t support accessing them yet)
- built in compression (can be turned on and off at any point)
- always consistent on disk (I’m not sure if this is just metadata or full data, as is possible with Reiserfs4’s dancing trees)
- RAID-like striping, for performance and/or redundancy. The merging of volume and filesystem concepts allows ZFS to do some clever things here to improve the performance of scrubbing data, or rebuilding an array after replacing a faulty disk – it doesn’t need to scrub/rebuild the whole disk as it knows what data is in use.
You can achieve some this stuff (with some fiddling) with a combination of other Linux technologies, such as LVM. The block hashing feature stands almost alone – the only other filesystem I could find that apparently does this is IBM’s GPFS. Yet ZFS beings it all together almost effortlessly.
Leave a Reply