From owner-freebsd-stable@freebsd.org Sat Aug 15 19:08:13 2015 Return-Path: Delivered-To: freebsd-stable@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 4491C9BAA58 for ; Sat, 15 Aug 2015 19:08:13 +0000 (UTC) (envelope-from tundra@tundraware.com) Received: from oceanview.tundraware.com (oceanview.tundraware.com [104.236.38.227]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "oceanview.tundraware.com", Issuer "oceanview.tundraware.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 0651512ED for ; Sat, 15 Aug 2015 19:08:12 +0000 (UTC) (envelope-from tundra@tundraware.com) Received: from [192.168.0.2] (ozzie.tundraware.com [75.145.138.73]) (authenticated bits=0) by oceanview.tundraware.com (8.15.2/8.15.2) with ESMTPSA id t7FJ83lY006593 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO) for ; Sat, 15 Aug 2015 14:08:03 -0500 (CDT) (envelope-from tundra@tundraware.com) Message-ID: <55CF8E0B.7050608@tundraware.com> Date: Sat, 15 Aug 2015 14:07:55 -0500 From: Tim Daneliuk User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Thunderbird/31.8.0 MIME-Version: 1.0 CC: FreeBSD Stable Maling List Subject: Re: Swap Questions References: <55CDE9EE.5090603@tundraware.com> In-Reply-To: Content-Type: text/plain; charset=windows-1252 Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.4.3 (oceanview.tundraware.com [104.236.38.227]); Sat, 15 Aug 2015 14:08:03 -0500 (CDT) X-TundraWare-MailScanner-Information: Please contact the ISP for more information X-TundraWare-MailScanner-ID: t7FJ83lY006593 X-TundraWare-MailScanner: Not scanned: please contact your Internet E-Mail Service Provider for details X-TundraWare-MailScanner-From: tundra@tundraware.com X-Spam-Status: No X-BeenThere: freebsd-stable@freebsd.org X-Mailman-Version: 2.1.20 Precedence: list List-Id: Production branch of FreeBSD source code List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Sat, 15 Aug 2015 19:08:13 -0000 On 08/14/2015 12:39 PM, Warren Block wrote: > On Fri, 14 Aug 2015, Tim Daneliuk wrote: > >> I just built a 10.2 machine on a cloud-based VPS (Digital Ocean) that has >> 512M of memory and 1G of swap partition. I am seeing a ton of errors like >> this: >> >> Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(10): failed >> Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(14): failed >> Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(11): failed >> Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(6): failed >> Aug 14 00:01:22 myhost kernel: swap_pager_getswapspace(7): failed >> Aug 14 00:01:22 myhost last message repeated 2 times >> >> >> So, I added this to fstab (after creating /usr/swap0): >> >> md99 none swap sw,file=/usr/swap0 0 0 >> >> And then did this: >> >> swapon -aq >> >> >> But, when I do a swapinfo, all I can see is the "disk" swap partition >> that comes standard with the VPS: >> >> >> Device 1K-blocks Used Avail Capacity >> /dev/gpt/swapfs 1048576 456572 592004 44% > > Add the -L (late) option to swapon. How this works might differ between 10-Release, 10-Stable, and 11. > > Incidentally, md99 does not have to be literal, it's just meant to get the md device number up out of the way of common interactive usage of mdconfig. So -L does fix the problem - sort of. The machine picks up the file as additional swap on boot just fine. HWOEVER, when I try to reboot or shut down the host, I get a panic telling me some noise about not being able to shutdown swap for some reason. So ... I decided to just add a second disk partition for swap and - for some reason - it works fine interactively, but upon reboot, the newly created swap partition no longer exists and gpart shows the space as free again. I tried a gpart commit, but get "operation not permitted". So now I am trying to figure out how to make gpart changes stick. This may be an artifact of the way Digital Ocean droplets are set up .... Grrrrrrrr -- ---------------------------------------------------------------------------- Tim Daneliuk tundra@tundraware.com PGP Key: http://www.tundraware.com/PGP/