Skip site navigation (1)Skip section navigation (2)
Date:      Thu, 18 Jan 2018 17:45:38 -0600
From:      Tim Daneliuk <tundra@tundraware.com>
To:        "Steve O'Hara-Smith" <steve@sohara.org>, freebsd-questions@freebsd.org
Subject:   Re: gpart And VPS Disk: Disappearing swap Partition
Message-ID:  <31fe82ae-29b7-bb12-5be5-e56c067f3a62@tundraware.com>
In-Reply-To: <20180118213913.b39616554429136e897334fa@sohara.org>
References:  <511934e8-cbcb-75e2-b4ac-ea06e1a54196@tundraware.com> <20180118213913.b39616554429136e897334fa@sohara.org>

next in thread | previous in thread | raw e-mail | index | archive | help
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.

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/




Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?31fe82ae-29b7-bb12-5be5-e56c067f3a62>