Date: Fri, 19 Jan 2018 07:59:43 +0000 From: Steve O'Hara-Smith <steve@sohara.org> To: Tim Daneliuk <tundra@tundraware.com> Cc: freebsd-questions@freebsd.org Subject: Re: gpart And VPS Disk: Disappearing swap Partition Message-ID: <20180119075943.aa44341ba798fb1b6c096670@sohara.org> In-Reply-To: <06ff73a3-1c73-3309-985f-297b7dbfa1df@tundraware.com> References: <511934e8-cbcb-75e2-b4ac-ea06e1a54196@tundraware.com> <20180118213913.b39616554429136e897334fa@sohara.org> <06ff73a3-1c73-3309-985f-297b7dbfa1df@tundraware.com>
next in thread | previous in thread | raw e-mail | index | archive | help
On Thu, 18 Jan 2018 17:02:14 -0600 Tim Daneliuk <tundra@tundraware.com> wrote: > On 01/18/2018 03:39 PM, Steve O'Hara-Smith wrote: > > On Thu, 18 Jan 2018 15:01:56 -0600 > > Tim Daneliuk <tundra@tundraware.com> 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/<gpt label> none swap sw 0 0 > > > > > No, that's not it. There is no /dev/gpt/label to even attempt to mount. My bad, I was assuming you gave it a gpt label, it's pretty much a reflex with me when using gpart :) > Here is what I did: > > gpart add -t freebsd-swap -i4 vtbd0 Try adding -l swap1 to that command viz: gpart add -t freebsd-swap -l swap1 -i4 vtbd0 That *should* cause a /dev/gpt/swap1 to appear and persist through reboots. > gpart modify -i4 -lswapfs2 vtbd0 > > At this point, I can see the new swap partition. However, when I reboot, > it's no longer there. Hmm - does vtbd0 exist at all after reboot ? > So, I tried to follow the above commands with: > > gpart commit vtbd0 > > And I get "Operation not permitted" Hmm interesting, by default commit is a no-op as generally there are no pending changes. > 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. I don't think it's lack of commit, but 'operation not permitted' seems odd. I think the problem stems from vtbd0 not having a /dev/ entry but I could easily be wrong. -- Steve O'Hara-Smith | Directable Mirror Arrays C:\>WIN | A better way to focus the sun The computer obeys and wins. | licences available see You lose and Bill collects. | http://www.sohara.org/
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?20180119075943.aa44341ba798fb1b6c096670>