From owner-freebsd-stable@freebsd.org Sun Aug 16 12:52:05 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 D49E69B98BC for ; Sun, 16 Aug 2015 12:52:05 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smarthost1.greenhost.nl (smarthost1.greenhost.nl [195.190.28.81]) (using TLSv1 with cipher AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id 9A550115F for ; Sun, 16 Aug 2015 12:52:05 +0000 (UTC) (envelope-from ronald-lists@klop.ws) Received: from smtp.greenhost.nl ([213.108.104.138]) by smarthost1.greenhost.nl with esmtps (TLS1.0:DHE_RSA_AES_128_CBC_SHA1:16) (Exim 4.72) (envelope-from ) id 1ZQxPi-0006Y4-QH for freebsd-stable@freebsd.org; Sun, 16 Aug 2015 14:51:56 +0200 Content-Type: text/plain; charset=utf-8; format=flowed; delsp=yes To: freebsd-stable@freebsd.org Subject: Re: Swap Questions References: <55CDE9EE.5090603@tundraware.com> <55CF8E0B.7050608@tundraware.com> Date: Sun, 16 Aug 2015 14:51:49 +0200 MIME-Version: 1.0 Content-Transfer-Encoding: 7bit From: "Ronald Klop" Message-ID: In-Reply-To: <55CF8E0B.7050608@tundraware.com> User-Agent: Opera Mail/12.16 (FreeBSD) X-Authenticated-As-Hash: 398f5522cb258ce43cb679602f8cfe8b62a256d1 X-Virus-Scanned: by clamav at smarthost1.samage.net X-Spam-Level: / X-Spam-Score: -0.2 X-Spam-Status: No, score=-0.2 required=5.0 tests=ALL_TRUSTED, BAYES_50, URIBL_BLOCKED autolearn=disabled version=3.3.1 X-Scan-Signature: 3ced5df4177ef3a93a84b902ce7c160e 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: Sun, 16 Aug 2015 12:52:05 -0000 On Sat, 15 Aug 2015 21:07:55 +0200, Tim Daneliuk wrote: > 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. It helps if you provide the exact text of the panic. People regularly don't get to see these inside there crystal ball. ;-) You call it noise. Others might get an helpful hint from it to help you. Regards, Ronald. > 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