From owner-freebsd-questions@freebsd.org Thu Jan 18 23:45:47 2018 Return-Path: Delivered-To: freebsd-questions@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 7FCAFEB3E02 for ; Thu, 18 Jan 2018 23:45:47 +0000 (UTC) (envelope-from tundra@tundraware.com) Received: from oceanview.tundraware.com (oceanview.tundraware.com [45.55.60.57]) (using TLSv1.2 with cipher ECDHE-RSA-AES256-GCM-SHA384 (256/256 bits)) (Client CN "mailman.tundraware.com", Issuer "mailman.tundraware.com" (not verified)) by mx1.freebsd.org (Postfix) with ESMTPS id 433F063DF9 for ; Thu, 18 Jan 2018 23:45:46 +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 w0INjh9k004308 (version=TLSv1.2 cipher=DHE-RSA-AES128-SHA bits=128 verify=NO); Thu, 18 Jan 2018 17:45:44 -0600 (CST) (envelope-from tundra@tundraware.com) From: Tim Daneliuk Subject: Re: gpart And VPS Disk: Disappearing swap Partition To: "Steve O'Hara-Smith" , freebsd-questions@freebsd.org References: <511934e8-cbcb-75e2-b4ac-ea06e1a54196@tundraware.com> <20180118213913.b39616554429136e897334fa@sohara.org> Message-ID: <31fe82ae-29b7-bb12-5be5-e56c067f3a62@tundraware.com> Date: Thu, 18 Jan 2018 17:45:38 -0600 User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:52.0) Gecko/20100101 Thunderbird/52.5.0 MIME-Version: 1.0 In-Reply-To: <20180118213913.b39616554429136e897334fa@sohara.org> Content-Type: text/plain; charset=utf-8 Content-Language: en-US Content-Transfer-Encoding: 7bit X-Greylist: Sender succeeded SMTP AUTH, not delayed by milter-greylist-4.6.2 (oceanview.tundraware.com [45.55.60.57]); Thu, 18 Jan 2018 17:45:44 -0600 (CST) X-TundraWare-MailScanner-Information: Please contact the ISP for more information X-TundraWare-MailScanner-ID: w0INjh9k004308 X-TundraWare-MailScanner: Found to be clean X-TundraWare-MailScanner-SpamCheck: not spam (whitelisted), SpamAssassin (not cached, score=-0.899, required 1, autolearn=not spam, ALL_TRUSTED -1.00, AWL 0.11, T_RP_MATCHES_RCVD -0.01) X-TundraWare-MailScanner-From: tundra@tundraware.com X-Spam-Status: No X-BeenThere: freebsd-questions@freebsd.org X-Mailman-Version: 2.1.25 Precedence: list List-Id: User questions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , X-List-Received-Date: Thu, 18 Jan 2018 23:45:47 -0000 On 01/18/2018 03:39 PM, Steve O'Hara-Smith wrote: > On Thu, 18 Jan 2018 15:01:56 -0600 > Tim Daneliuk wrote: > >> I have Digital Ocean instance that has about 1G free on the disk. >> I want to use this to create a second swap partition. I am able to >> run 'gpart add -t freebsd-swap ...' successfully. That is, gpart show >> shows that new swap partition as present and I can swap it on. HOWEVER, >> upon reboot, that partition disappears and the space shows as free again. >> >> What am I missing here? > > An entry in /etc/fstab something like this: > > /dev/gpt/ none swap sw 0 0 > No, that's not it. There is no /dev/gpt/label to even attempt to mount. Here is what I did: gpart add -t freebsd-swap -i4 vtbd0 gpart modify -i4 -lswapfs2 vtbd0 At this point, I can see the new swap partition. However, when I reboot, it's no longer there. So, I tried to follow the above commands with: gpart commit vtbd0 And I get "Operation not permitted" So, I did this: sysctl kern.geom.debugflags=16 And tried again ... no go. In short, I can interactively create the new partition, but it disappears on reboot. I suspect that the problem has to do with not being able to commit my changes, but I cannot seem to figure out why this is so. And yes, I've tried this in single user mode as well. -- ---------------------------------------------------------------------------- Tim Daneliuk tundra@tundraware.com PGP Key: http://www.tundraware.com/PGP/