[pve-devel] [RFC/PATCH installer 0/4] don't create swap on ZFS as default

Stoiko Ivanov s.ivanov at proxmox.com
Mon Oct 1 21:11:39 CEST 2018


On Mon, Oct 01, 2018 at 07:43:41PM +0200, Fabian Grünbichler wrote:
> On Mon, Oct 01, 2018 at 12:41:57PM +0200, Stoiko Ivanov wrote:
> > I would propose to disable the default creation of a swap-zvol if installing
> > with zfs on root currently, since it introduces deadlocks in some circumstances.
> > 
> > Should a solution be implemented, we can revert the changes.
> > 
> > This patchset contains 4 changes:
> > * disabling the creation of a zvol for swap by default.
> > * adding a GTKEntry field to the ZFS advanced options for users, who still
> >   want a zvol with swap
> 
> wouldn't it make more sense to create a swap partition on all boot vdevs
> instead? if you need swap, this is very cumbersome to do after
> installation. creating a swap zvol is easily possible no matter whether
> the installer supports it or not..

I guess I wanted to avoid the change of partitioning before assigning a
device to a zpool (a.k.a. the "give ZFS whole drives mantra"). However AFAIS
most current howtos for Linux [0], [1] (in keeping the EFI partion separate)
and FreeBSD [2] don't seem to adhere to that (anymore).

But the point of repartitioning after the installation being cumbersome is
valid (to say the least). Currently my preference tends towards your
proposal (creating a partition for swap and not recommend creating a zvol
for swap).

This leaves the question open, whether we want to create the full requested
(or computed) swapspace on each device, or split it among all (e.g. for 32G
swap and 4 vdevs in a raidZ2, creating an 8G partition on each). Given
current disk-sizes vs. swapspace on average I'd lean towards the former.

Would prepare a v2 with Fabian's suggested changes (and creating the
complete swapspace on all devices), unless there are contradicting
suggestions/inputs.

[0] https://github.com/zfsonlinux/zfs/wiki/Ubuntu-18.04-Root-on-ZFS
[1] https://wiki.archlinux.org/index.php/Installing_Arch_Linux_on_ZFS
[2] https://wiki.freebsd.org/RootOnZFS/GPTZFSBoot
> 
> > * checking/creating ZFS swap when running in test mode as well
> > * tiny change to the test image creation (using truncate instead of dd,
> >   which makes the initial rsync while testing faster)
> > 
> > The last patch is independent of the others (but doesn't justify a thread of its
> > own IMO).
> > 
> > Stoiko Ivanov (4):
> >   no swap on zfs unless it's explicitly set
> >   add entry for swapsize to ZFS advanced widget
> >   add swapcreation to zfs testmode
> >   buildsys: use truncate to create test.img
> > 
> >  Makefile    |  2 +-
> >  proxinstall | 22 ++++++++++++++++++++--
> >  2 files changed, 21 insertions(+), 3 deletions(-)
> > 
> > -- 
> > 2.11.0
> > 
> > 
> > _______________________________________________
> > pve-devel mailing list
> > pve-devel at pve.proxmox.com
> > https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel
> 
> _______________________________________________
> pve-devel mailing list
> pve-devel at pve.proxmox.com
> https://pve.proxmox.com/cgi-bin/mailman/listinfo/pve-devel




More information about the pve-devel mailing list