Take the 2-minute tour ×
Ask Ubuntu is a question and answer site for Ubuntu users and developers. It's 100% free, no registration required.

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
add comment

2 Answers 2

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
add comment

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
add comment

Your Answer

 
discard

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.