From owner-freebsd-stable@freebsd.org Fri Aug 14 16:41:46 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 100679BACB4 for ; Fri, 14 Aug 2015 16:41:46 +0000 (UTC) (envelope-from carlj@peak.org) Received: from filter04.peak.org (filter04.peak.org [69.59.194.80]) (using TLSv1 with cipher ECDHE-RSA-AES256-SHA (256/256 bits)) (Client did not present a certificate) by mx1.freebsd.org (Postfix) with ESMTPS id D169E11E9 for ; Fri, 14 Aug 2015 16:41:45 +0000 (UTC) (envelope-from carlj@peak.org) Received: from zmail-mta02.peak.org ([207.55.16.112]) by filter04.peak.org ({b5578ef9-c87c-4111-97f7-092309db775d}) via TCP (outbound) with ESMTPS id 20150814163814683_0000 for ; Fri, 14 Aug 2015 09:38:14 -0700 X-RC-FROM: X-RC-RCPT: Received: from zmail-mta02.peak.org (localhost [127.0.0.1]) by zmail-mta02.peak.org (Postfix) with ESMTPS id C100A4D8D4 for ; Fri, 14 Aug 2015 09:38:08 -0700 (PDT) Received: from localhost (localhost [127.0.0.1]) by zmail-mta02.peak.org (Postfix) with ESMTP id B4AD64D8D2 for ; Fri, 14 Aug 2015 09:38:08 -0700 (PDT) Received: from zmail-mta02.peak.org ([127.0.0.1]) by localhost (zmail-mta02.peak.org [127.0.0.1]) (amavisd-new, port 10026) with ESMTP id vh2xscmwG7B8 for ; Fri, 14 Aug 2015 09:38:08 -0700 (PDT) Received: from mailproxy-lb-06.peak.org (mailproxy-lb-06.peak.org [207.55.17.96]) by zmail-mta02.peak.org (Postfix) with ESMTP id 7EEB14C051 for ; Fri, 14 Aug 2015 09:38:08 -0700 (PDT) Received: from carlj by elk.localnet with local (Exim 4.80) (envelope-from ) id 1ZQHzb-0004PS-HS for freebsd-stable@freebsd.org; Fri, 14 Aug 2015 09:38:07 -0700 From: Carl Johnson To: freebsd-stable@freebsd.org Subject: Re: Swap Questions References: <55CDE9EE.5090603@tundraware.com> <280266DF-AD94-4DC2-A5E1-AD0603B33BFE@punkt.de> <55CDFF32.3020809@tundraware.com> <874mk1g9b6.fsf@elk.localnet> <55CE1654.8030304@tundraware.com> Mail-Followup-To: freebsd-stable@freebsd.org X-Clacks-Overhead: GNU Terry Pratchett Date: Fri, 14 Aug 2015 09:38:07 -0700 In-Reply-To: <55CE1654.8030304@tundraware.com> (Tim Daneliuk's message of "Fri, 14 Aug 2015 11:24:52 -0500") Message-ID: <87wpwxesgg.fsf@elk.localnet> User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (gnu/linux) MIME-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-MAG-OUTBOUND: peakinternet.redcondor.net@207.55.16/22 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: Fri, 14 Aug 2015 16:41:46 -0000 Tim Daneliuk writes: > On 08/14/2015 10:48 AM, Carl Johnson wrote: >> Tim Daneliuk writes: >> >>> On 08/14/2015 08:53 AM, Patrick M. Hausen wrote: >>>> HI! >>>> >>>>> Am 14.08.2015 um 15:15 schrieb Tim Daneliuk : >>>>> >>>>> 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: >>>>> >>>>> [...] >>>>> So, I added this to fstab (after creating /usr/swap0): >>>> >>>> Did you create it with dd or just with touch? You need to create a >>>> file that actually occupies the disk blocks with dd. >>>> >>>> HTH >>>> Patrick >>>> >>> >>> The file was actually created, and space reserved. >> >> Try removing the md99 device with mdconfig and then run the swapon again. >> > > Now we're getting somewhere. The problem I discovered is that if I do this: > > 1) Remove fstab entry for swap file and reboot > 2) Reinstall fstab entry for swap and swapon > > Voila' - it works. BUT ... if I then swapoff that disk *the md device does > not go away and cannot be removed with mdcoswapon -a > swapon: md99 on /usr/swap0: Device already in use > nfig: > > mdconfig -d md99 > mdconfig: file can only be used with -a > > > I also cannot reenable it as swap again (which is why this appeared to not > be working: > > swapon -a > swapon: md99 on /usr/swap0: Device already in use > > > IOW, the system thinks the /dev/md99 is still in use even though I have swapped it > off and will neither automatically remove the device nor allow me to do so manually. I should have mentioned that I had similar problems until I added the "late" option to the swapfile line in fstab. I suspect that it is a general problem with swapfiles and should be in the swapfile example in the fstab(5) manpage. -- Carl Johnson carlj@peak.org