From owner-freebsd-rc@FreeBSD.ORG Fri Sep 11 15:20:06 2009 Return-Path: Delivered-To: freebsd-rc@freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:4f8:fff6::34]) by hub.freebsd.org (Postfix) with ESMTP id BD5AA106566B; Fri, 11 Sep 2009 15:20:06 +0000 (UTC) (envelope-from ady@ady.ro) Received: from mail-ew0-f208.google.com (mail-ew0-f208.google.com [209.85.219.208]) by mx1.freebsd.org (Postfix) with ESMTP id F40568FC12; Fri, 11 Sep 2009 15:20:05 +0000 (UTC) Received: by ewy4 with SMTP id 4so1189123ewy.36 for ; Fri, 11 Sep 2009 08:20:04 -0700 (PDT) MIME-Version: 1.0 Sender: ady@ady.ro Received: by 10.211.141.7 with SMTP id t7mr678272ebn.99.1252682402179; Fri, 11 Sep 2009 08:20:02 -0700 (PDT) In-Reply-To: <20090911122050.GC1673@garage.freebsd.pl> References: <200909091831.n89IVOS9065418@freefall.freebsd.org> <78cb3d3f0909110334g6757f08fh57a0ab97c02b2d9a@mail.gmail.com> <20090911122050.GC1673@garage.freebsd.pl> From: Adrian Penisoara Date: Fri, 11 Sep 2009 17:19:41 +0200 X-Google-Sender-Auth: 2ae435233c56130f Message-ID: <78cb3d3f0909110819m35f2d5ceo64de128320091a76@mail.gmail.com> To: Pawel Jakub Dawidek Content-Type: text/plain; charset=ISO-8859-1 Cc: guido@freebsd.org, freebsd-rc@freebsd.org Subject: Re: conf/120228: [zfs] [patch] Split ZFS volume startup / ease ZFS swap volumes management X-BeenThere: freebsd-rc@freebsd.org X-Mailman-Version: 2.1.5 Precedence: list List-Id: "Discussion related to /etc/rc.d design and implementation." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 11 Sep 2009 15:20:06 -0000 Hi, On Fri, Sep 11, 2009 at 2:20 PM, Pawel Jakub Dawidek wrote: [...] >> >> We're probably speaking of SVN changeset 195938 ? > > Yes. > >> > rc.d/zfs script was broken and there is now also rc.d/zvol script. It was >> > created so ZVOL-based file systems can be mounted from /etc/fstab. >> > Using ZVOL property to setup swap was intended - ZFS file systems are also not >> > mounted from /etc/fstab. All in all using ZVOL for swap is unreliable anyway. >> >> While I do understand the "unreliable" part I still fail to understand >> why do we need to complicate matters with ZFS user property signatures >> to mount ZFS swap volumes instead of the traditional /etc/fstab way -- >> is there a concrete reason for this (besides said reliability) ? > > The idea is to keep things consistent. You can still use /etc/fstab to > put swap on ZVOLs, no? You can also set mountpoint property for file Actually using /etc/fstab for zvol swap is not quite working in the current setup since /etc/rc.d/swap1 does not automatically swapoff upon shutdown which makes 'zvol stop' attempt to close the (swap) volume(s) while still in use. I guess 'zfs volfini' should be triggered by a shutdown hook similarly to what geom(4) classes are using. I see Guido committed a swapoff hook in changeset 189624 (similar to what I suggested in my initial PR) but immediately backed it out the next day. Funny thing is that this swapoff hook flip-flopped over time, see changesets 135389, 137255. Is there a reason not to have the swap devices automatically unmounted from /etc/swap1 upon shutdown ? > system to 'legacy' and then you can mount it from to /etc/fstab too. > Perhaps not the best idea: what if I export and then import a zpool from one system to another -- then I will have some swap volumes automatically mounted upon boot, breaking POLA. You can argue that ZFS filesystems will also be automatically mounted too, but this is a consistent behavior across different OSes while the discussed swap volume automount is FreeBSD specific. Sorry to insist, but I still think we should we keep it simple... Unless people are already using/depending on this feature. Regards, Adrian.