From owner-freebsd-bugs@freebsd.org Fri Oct 9 15:17:24 2015 Return-Path: Delivered-To: freebsd-bugs@mailman.ysv.freebsd.org Received: from mx1.freebsd.org (mx1.freebsd.org [IPv6:2001:1900:2254:206a::19:1]) by mailman.ysv.freebsd.org (Postfix) with ESMTP id 7C6419D11EC for ; Fri, 9 Oct 2015 15:17:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from kenobi.freebsd.org (kenobi.freebsd.org [IPv6:2001:1900:2254:206a::16:76]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 4F29013CF for ; Fri, 9 Oct 2015 15:17:24 +0000 (UTC) (envelope-from bugzilla-noreply@freebsd.org) Received: from bugs.freebsd.org ([127.0.1.118]) by kenobi.freebsd.org (8.15.2/8.15.2) with ESMTP id t99FHOo6095999 for ; Fri, 9 Oct 2015 15:17:24 GMT (envelope-from bugzilla-noreply@freebsd.org) From: bugzilla-noreply@freebsd.org To: freebsd-bugs@FreeBSD.org Subject: [Bug 187081] swapoff runs too early during shutdown Date: Fri, 09 Oct 2015 15:17:24 +0000 X-Bugzilla-Reason: AssignedTo X-Bugzilla-Type: changed X-Bugzilla-Watch-Reason: None X-Bugzilla-Product: Base System X-Bugzilla-Component: conf X-Bugzilla-Version: unspecified X-Bugzilla-Keywords: X-Bugzilla-Severity: Affects Only Me X-Bugzilla-Who: c.kworr@gmail.com X-Bugzilla-Status: In Progress X-Bugzilla-Priority: Normal X-Bugzilla-Assigned-To: freebsd-bugs@FreeBSD.org X-Bugzilla-Target-Milestone: --- X-Bugzilla-Flags: X-Bugzilla-Changed-Fields: cc attachments.created Message-ID: In-Reply-To: References: Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: 7bit X-Bugzilla-URL: https://bugs.freebsd.org/bugzilla/ Auto-Submitted: auto-generated MIME-Version: 1.0 X-BeenThere: freebsd-bugs@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Bug reports List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Fri, 09 Oct 2015 15:17:24 -0000 https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=187081 c.kworr@gmail.com changed: What |Removed |Added ---------------------------------------------------------------------------- CC| |c.kworr@gmail.com --- Comment #1 from c.kworr@gmail.com --- Created attachment 161855 --> https://bugs.freebsd.org/bugzilla/attachment.cgi?id=161855&action=edit fix "swaplate" to deal only with "late" swap devices Hi. I like to join this heated conversation. :) It seems to me you are bitten with /etc/rc.d/swaplate which should remove swap partitions that are not directly available. Yet due to bug in the swapon/swapoff logic it rather removes all swap partitions. I'm bored with this too as on my machine swap is used constantly and when rebooting for some weird reason I need to wait while the system gets all my sleepy daemons from swap back to the memory instead of just stopping them. The key problem is "-a" and "-L" options to swapon/swapoff as they give only two choices: 1. Single "-a" selects only not "late" "auto" devices (the ones without "noauto" and "late") from /etc/fstab. 2. Both options ("-aL") select whole range of "auto" devices (only skipping "noauto" ones) from /etc/fstab. This two choices doesn't give us a possibility to turn off only "late" devices, that can really be dependent on some daemons with higher priorities so they MAY fail further down "shutdown" sequence and as such they SHOULD be turned off early during "shutdown". The fix I propose actually breaks compatibility but I don't think this would be an issue as: * there's not that much consumers of mentioned options in the scripts; * the fix brings clarity and usability. In this fix: * single "-a" still select only not "late" "auto" devices; * option "-L" inverts "-a" meaning and selects only "late" "auto" devices; * documentation and starting script are fixed. -- You are receiving this mail because: You are the assignee for the bug.