For my (simple) file server I’ve done a minimal installation of CentOS 5.4, and added some repositories. I’ve decided to use ZFS as filesystem for my storage.

The installation of zfs-fuse went smooth, and I’ve created a pool in no-time. There were many tutorials available online on how to do this stuff.

The only problem I ran into, was running out out of memory. The server has only 512Mb Ram, and zfs-fuse was using over 400Mb RAM.

After some research, it seamed the problem was the caching mechanism of ZFS. After a while I figured out how to disable this caching mechanism. You can use the following commands:

zfs set secondarycache=none data

zfs set primarycache=none data

Where data is the name of the pool. This affects the performance of this filesystem, but at least my server doesn’t run out of memory anymore.

Another tip for ZFS: after an update, upgrade your pool to a new version with the following command:

zpool upgrade data