Ask Ubuntu is a question and answer site for Ubuntu users and developers. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm using native-zfs and was wondering if there is a way to use a ZFS partition for SWAP. I'm running my server off of a thumbdrive and thought that would be a good way to speed it up a little bit.

share|improve this question

Using ZFS for swap should just work, just like it does under Solaris and FreeBSD.

zfs create pool/swap -V 1G -b 4K
mkswap -f /dev/pool/swap
swapon /dev/pool/swap
share|improve this answer

Swap partitions have to be in a particular format that is suited for swapping, so you cannot use any other file system for swap. This rules out zfs for this reason.

share|improve this answer
ZFS is more than a file system, it is also a volume manager that can provide raw devices (zvols). – jlliagre Dec 12 '12 at 7:23

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.