Date: Tue, 7 Jul 2009 03:45:39 +0300 From: Dan Naumov <dan.naumov@gmail.com> To: freebsd-fs@freebsd.org Subject: ZFS: swap on a ZVOL Message-ID: <cf9b1ee00907061745l3d2dbe97t98f85f8a522e027f@mail.gmail.com>
next in thread | raw e-mail | index | archive | help
Hello list. As far as I know, using swap on top of a "non-trivial" filesystem like ZFS is considered "unsupported", but it does in fact work. You can create a ZVOL of arbitrary size (say, 4G) and then do the following: zfs set org.freebsd:swap=on pool/swapvolname to have /etc/rc.d/zfs enable swap on said ZVOL on every boot. You can also do this in an ugly way: put swapon /dev/zvol/<poolname>/<swapvolname> into your /etc/rc.local (without having to pass the "org.freebsd:swap=on" option to the ZVOL). Now the question remains, what kind of issues are expected to arise when using swap on a ZVOL and is there any work going to in order to resolve them? One of the issues mentioned is that ZVOL swap cannot handle kernel dumps and another, more serious potential issue is a race condition where "more swap is needed to swap". Assuming I have a machine with 2gb ram, if I use a 4gb ZVOL swap, am I likely to run into any serious issues assuming that under normal operation, the system uses from none to very little swap? - Sincerely, Dan Naumov
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?cf9b1ee00907061745l3d2dbe97t98f85f8a522e027f>
