Skip site navigation (1)Skip section navigation (2)
Date:      Sun, 18 Sep 2022 01:20:40 +0400
From:      milky india <milkyindia@gmail.com>
To:        Alan Somers <asomers@freebsd.org>
Cc:        freebsd-fs <freebsd-fs@freebsd.org>
Subject:   Re: Need help with live system expansion (zfs+geli)
Message-ID:  <CACQUA7mnaF7uu7SLkhv7Q2BXo2fDDnubtTUwYJKKNfFVWn%2BCpg@mail.gmail.com>
In-Reply-To: <CAOtMX2jy_KZUahoXRH7EMiy%2BCF52B93z1Q43HY%2BoOWMe=JxytA@mail.gmail.com>
References:  <CACQUA7kC1E%2BHTEAFY=o%2BFpRcfmhJ-qPWuXseNvT5eJzK4Bcdpw@mail.gmail.com> <CAOtMX2g%2BGZ6SjQQPu-YWJhttYS3D7YhU-kAqMY4xHxXoe6rdVg@mail.gmail.com> <CACQUA7nD2Hrkvo5P7_9gyWkJwX8-ZhMAc3HdgrzTCK=XVqRMog@mail.gmail.com> <CAOtMX2iDg3H75Jp5-N5MgLAvBHKFs8UXvCVPBi_YQKMqYWsz6g@mail.gmail.com> <CACQUA7mzfvwRVhc00kGk3rZHKhFtMChZ983EJ0OBn90DJfaMUQ@mail.gmail.com> <CAOtMX2ijrHuhh8E=M%2BD=FKXq9c0tbOq-ZDNRQZ4n32U5=dEaVg@mail.gmail.com> <CACQUA7nTyT9hpguEbQ1LskHJxq1OUckswbpD__Fov-G9t8Myxg@mail.gmail.com> <CAOtMX2gLaur3c8TATuVeZdDNPoLcG%2B4BrTgOp=Ow3jAuStkKtA@mail.gmail.com> <CACQUA7=6YTN027oUa9xDPNc8Y1MS4rtVYwCxsc0HLpJ8G%2BC8yQ@mail.gmail.com> <CAOtMX2h-adnaupXrwH90HpepnnBpUZFY5OaF_e6a91vFCe8Vjw@mail.gmail.com> <CACQUA7kL7GJTBvxvSh6dnMZ9qzyOS--6S4xt7q5nSc2s=hKwdw@mail.gmail.com> <CAOtMX2hat0FbJWpJA-fQZGxuV_NPASMazTifrJe2WPK8a_%2BMLw@mail.gmail.com> <CACQUA7mYYwe_9vgEAkbaeAHsikTbhK5v9EswpTS41nnvDiVh9w@mail.gmail.com> <CAOtMX2g2YT%2Bd-p-MJdzAohCU3HqU9m%2B0U7ogBmCNUa4tgV3dLw@mail.gmail.com> <CACQUA7nM%2Bo90QsX_k%2B%2B4skBVJOo59mo0-P4yTyh-R7Dw=_Amdg@mail.gmail.com> <CAOtMX2iKtdF2GjqZyPM8ehVX=tHMYeNsTYvKdZUNK-DDB_HHxg@mail.gmail.com> <CACQUA7nxnJFHCj6_cyfR5oxHOLq%2BX4%2Bc1HttBh0AMGU=%2BbMNuA@mail.gmail.com> <CAOtMX2jy_KZUahoXRH7EMiy%2BCF52B93z1Q43HY%2BoOWMe=JxytA@mail.gmail.com>

next in thread | previous in thread | raw e-mail | index | archive | help
--0000000000007fd3ae05e8e60d4f
Content-Type: text/plain; charset="UTF-8"

On Sun, Sep 18, 2022 at 12:58 AM Alan Somers <asomers@freebsd.org> wrote:

> On Sat, Sep 17, 2022 at 2:49 PM milky india <milkyindia@gmail.com> wrote:
> >
> >
> >
> > On Sun, Sep 18, 2022 at 12:44 AM Alan Somers <asomers@freebsd.org>
> wrote:
> >>
> >> On Sat, Sep 17, 2022 at 2:42 PM milky india <milkyindia@gmail.com>
> wrote:
> >> >
> >> >
> >> >
> >> > On Sun, Sep 18, 2022 at 12:30 AM Alan Somers <asomers@freebsd.org>
> wrote:
> >> >>
> >> >> On Sat, Sep 17, 2022 at 2:25 PM milky india <milkyindia@gmail.com>
> wrote:
> >> >> >
> >> >> >
> >> >> >
> >> >> > On Sun, Sep 18, 2022 at 12:20 AM Alan Somers <asomers@freebsd.org>
> wrote:
> >> >> >>
> >> >> >> On Sat, Sep 17, 2022 at 2:03 PM milky india <milkyindia@gmail.com>
> wrote:
> >> >> >> >
> >> >> >> >
> >> >> >> >
> >> >> >> > On Sat, Sep 17, 2022 at 10:58 PM Alan Somers <
> asomers@freebsd.org> wrote:
> >> >> >> >>
> >> >> >> >> On Sat, Sep 17, 2022 at 12:52 PM milky india <
> milkyindia@gmail.com> wrote:
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> >
> >> >> >> >> > On Sat, Sep 17, 2022 at 10:43 PM Alan Somers <
> asomers@freebsd.org> wrote:
> >> >> >> >> >>
> >> >> >> >> >> On Sat, Sep 17, 2022 at 12:31 PM milky india <
> milkyindia@gmail.com> wrote:
> >> >> >> >> >> >
> >> >> >> >> >> > Sorry about that, again - I'm not sure what you mean by
> bottom-post vs top-post.
> >> >> >> >> >> >
> >> >> >> >> >> > Be that as it may - I read the geli man page. I was
> specifically warned against using "geli resize" since it may not work as
> expected
> https://forums.FreeBSD.org/threads/how-to-extend-zfs-geli-encrypted-disk-space-not-showing.86447/post-581642
> >> >> >> >> >> > Is this advise wrong?
> >> >> >> >> >> > > "The geli has autoresize flag which will handle the new
> provider size after gpart resize command."
> >> >> >> >> >> > followed by
> >> >> >> >> >> > > You are right, no geli resize needed.
> >> >> >> >> >> >
> >> >> >> >> >> > What would be the correct sequence of commands to fix
> this - Simply "geli resize" ? (the -s option seems to be additional, will
> it figure it out without providing s?)
> >> >> >> >> >> >
> >> >> >> >> >> > On Sat, Sep 17, 2022 at 10:20 PM Alan Somers <
> asomers@freebsd.org> wrote:
> >> >> >> >> >>
> >> >> >> >> >> top-posting is where you insert your reply above the
> previous email.
> >> >> >> >> >> Bottom posting is where you insert your reply below it,
> like I'm
> >> >> >> >> >> doing.  The forum user said that you shouldn't need to run
> "geli
> >> >> >> >> >> resize" because the AUTORESIZE flag is on.  But as you can
> see from
> >> >> >> >> >> your "geli list" output, it's actually off.  So you need to
> run "geli
> >> >> >> >> >> resize".  The "-s" flag should be unnecessary since your
> provider is
> >> >> >> >> >> already online.  At any rate, you can try it both ways.
> You might
> >> >> >> >> >> want to make a copy of /var/backups/ada0p3.eli, just in
> case you make
> >> >> >> >> >> a mistake.
> >> >> >> >> >
> >> >> >> >> > Thanks - I hope I am bottom posting this as was expected of
> me.
> >> >> >> >> >
> >> >> >> >> > So if I understand correctly the AUTORESIZE flag is present
> for adaop2 and NOT for adap3 (which is the partition we are concerned
> about) - hence the advice given to not use "geli resize" isn't applicable
> here. Am I understanding this correctly?
> >> >> >> >>
> >> >> >> >> Yes
> >> >> >> >>
> >> >> >> >> >
> >> >> >> >> > > So you need to run "geli resize"
> >> >> >> >> > Is this the only command that I need to run to resize my
> geli partition?
> >> >> >> >>
> >> >> >> >> Yes
> >> >> >> >>
> >> >> >> >> >
> >> >> >> >> > > The "-s" flag should be unnecessary since your provider is
> >> >> >> >> > already online.
> >> >> >> >> > Ok thanks.
> >> >> >> >> >
> >> >> >> >> > >You might want to make a copy of /var/backups/ada0p3.eli,
> just in case you make a mistake.
> >> >> >> >> > Don't have the luxury of backup currently.
> >> >> >> >>
> >> >> >> >> Um, ok.  I can't guess why you aren't able to do that, but it
> isn't
> >> >> >> >> strictly necessary.
> >> >> >> >>
> >> >> >> >> >
> >> >> >> >> > I suppose at the end of it - if this works - "geli list"
> would reflect the size to be 458G? (vs 290G currently)
> >> >> >> >> > And that's the output I can trust to have solved the issue -
> or is there more to it?
> >> >> >> >>
> >> >> >> >> Yes.
> >> >> >> >
> >> >> >> > > The "-s" flag should be unnecessary since your provider is
> already online.
> >> >> >> > When I try to run "geli resize /dev/ada0p3.eli" it complains.
> So I guess options s is must ? If yes - do I need to put in the exact size
> down to bytes from the output of geli list ? Under "Mediasize" ?
> >> >> >> > ---------------------------------------
> >> >> >> > geli: Option 's' not specified.
> >> >> >> > ----------------------------------------
> >> >> >>
> >> >> >> Dude, it's easier just to try it, than to ask us.  Go for it.  The
> >> >> >> worst case scenario if you get the argument wrong is that nothing
> >> >> >> happens.
> >> >> >
> >> >> >
> >> >> > > The worst case scenario if you get the argument wrong is that
> nothing happens.
> >> >> > I'm not very sure if I put in the wrong value of s (old size) then
> "nothing happens" - I would imagine if I put in a size less than the
> current size then possibly the data after that get's lost? Or if I put in a
> size greater than the current size then there is a gap in the geli
> partition?
> >> >> > I sense some frustration in your reply - but I'm on a live system
> and wouldn't want to possibly risk it going kaput at this last step. That's
> the reason I'm trying to understand what is the best value of s for geli
> resize and how to obtain it.
> >> >>
> >> >> The purpose of the "-s" argument is to tell geli where to find the
> old
> >> >> label, if the provider isn't already attached.  If you supply the
> >> >> wrong argument, then geli won't be able to find the label, and thus
> >> >> won't be able to do anything.  It won't destroy any data, and it will
> >> >> always automatically determine the size of the current provider.  Of
> >> >> course, if you're worried about losing data, you should always save a
> >> >> copy of /var/backups/ada0p3.eli, as I suggested.
> >> >> -Alan
> >> >
> >> >
> >> >  >The purpose of the "-s" argument is to tell geli where to find the
> old
> >> > > label, if the provider isn't already attached.  If you supply the
> >> > > wrong argument, then geli won't be able to find the label, and thus
> >> > > won't be able to do anything.
> >> >
> >> > I think you're confusing the -s argument with something else - the
> man page says it's for the old size - that's why I was trying to figure it
> out and still haven't been able to quite yet. Although I suspect the
> "Mediasize" output for p3 from "geli list" is what the s value should be -
> but not very sure :
> >> >
> ------------------------------------------------------------------------------------------
> >> > Additional options include:
> >> >
> >> >                     -s oldsize        The size of the provider before
> it was resized.
> >> >
> ------------------------------------------------------------------------------------------------
> >>
> >> Yes, that's right.  geli needs to know the old size of the provider in
> >> order to find the provider's old label.
> >
> >
> > Thanks for acknowledging. I tried to do this using the s value from geli
> list - it won't let me even do it as sudo :
> > Getting a bit scared now. Should I not be writing `.eli` part?
> > -----------------------------------------------------------------
> > sudo geli resize -s 311481593856 /dev/ada0p3.eli
> > Password:
> > geli: Cannot open /dev/ada0p3.eli: Operation not permitted.
> > sudo geli resize -s 311481593856 ada0p3.eli
> > geli: Cannot open ada0p3.eli: Operation not permitted.
> >
> ---------------------------------------------------------------------------
>
> Yes, you normally would not write the ".eli", because "geli resize" is
> normally used when geli is not attached.  But it seems like you're
> currently booted from this device, right?  In that case, detaching it
> isn't an easy option for you.  If you like, you could try automatic
> expansion instead.  First enable it.  If it doesn't automatically
> expand when you enable that option, then you may have to "gpart
> resize" again.  You can enable it with "geli configure -r
> /dev/ada0p3".
>
 >Yes, you normally would not write the ".eli", because "geli resize" is
> normally used when geli is not attached.But it seems like you're
> currently booted from this device, right?
Yes - on a live system.

> You can enable it with "geli configure -r /dev/ada0p3".
Seems to have run without any output :
----------------------------------
geli configure -r /dev/ada0p3
--------------------------------------------
But geli list output hasn't changed apparently
----------------------------------------------------
geli list
Geom name: ada0p3.eli
State: ACTIVE
EncryptionAlgorithm: AES-XTS
KeyLength: 256
Crypto: accelerated software
Version: 7
UsedKey: 0
Flags: BOOT, GELIBOOT
KeysAllocated: 73
KeysTotal: 73
Providers:
1. Name: ada0p3.eli
   Mediasize: 311481593856 (290G)
   Sectorsize: 4096
   Mode: r1w1e1
Consumers:
1. Name: ada0p3
   Mediasize: 491516858368 (458G)
   Sectorsize: 512
   Stripesize: 0
   Stripeoffset: 8590983168
   Mode: r1w1e1

Geom name: ada0p2.eli
--------------------------------------------------------------------
Is it supposed to show up after a restart?
Or did it just not work?
I'm just so lost now - hoping I can even restart the machine and data isn't
lost/corrupted :(

--0000000000007fd3ae05e8e60d4f
Content-Type: text/html; charset="UTF-8"
Content-Transfer-Encoding: quoted-printable

<div dir=3D"ltr"><div dir=3D"ltr"><br></div><br><div class=3D"gmail_quote">=
<div dir=3D"ltr" class=3D"gmail_attr">On Sun, Sep 18, 2022 at 12:58 AM Alan=
 Somers &lt;<a href=3D"mailto:asomers@freebsd.org">asomers@freebsd.org</a>&=
gt; wrote:<br></div><blockquote class=3D"gmail_quote" style=3D"margin:0px 0=
px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">On Sa=
t, Sep 17, 2022 at 2:49 PM milky india &lt;<a href=3D"mailto:milkyindia@gma=
il.com" target=3D"_blank">milkyindia@gmail.com</a>&gt; wrote:<br>
&gt;<br>
&gt;<br>
&gt;<br>
&gt; On Sun, Sep 18, 2022 at 12:44 AM Alan Somers &lt;<a href=3D"mailto:aso=
mers@freebsd.org" target=3D"_blank">asomers@freebsd.org</a>&gt; wrote:<br>
&gt;&gt;<br>
&gt;&gt; On Sat, Sep 17, 2022 at 2:42 PM milky india &lt;<a href=3D"mailto:=
milkyindia@gmail.com" target=3D"_blank">milkyindia@gmail.com</a>&gt; wrote:=
<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; On Sun, Sep 18, 2022 at 12:30 AM Alan Somers &lt;<a href=3D"m=
ailto:asomers@freebsd.org" target=3D"_blank">asomers@freebsd.org</a>&gt; wr=
ote:<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; On Sat, Sep 17, 2022 at 2:25 PM milky india &lt;<a href=
=3D"mailto:milkyindia@gmail.com" target=3D"_blank">milkyindia@gmail.com</a>=
&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; On Sun, Sep 18, 2022 at 12:20 AM Alan Somers &lt;<a =
href=3D"mailto:asomers@freebsd.org" target=3D"_blank">asomers@freebsd.org</=
a>&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; On Sat, Sep 17, 2022 at 2:03 PM milky india &lt;=
<a href=3D"mailto:milkyindia@gmail.com" target=3D"_blank">milkyindia@gmail.=
com</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; On Sat, Sep 17, 2022 at 10:58 PM Alan Somer=
s &lt;<a href=3D"mailto:asomers@freebsd.org" target=3D"_blank">asomers@free=
bsd.org</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; On Sat, Sep 17, 2022 at 12:52 PM milky =
india &lt;<a href=3D"mailto:milkyindia@gmail.com" target=3D"_blank">milkyin=
dia@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; On Sat, Sep 17, 2022 at 10:43 PM A=
lan Somers &lt;<a href=3D"mailto:asomers@freebsd.org" target=3D"_blank">aso=
mers@freebsd.org</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; On Sat, Sep 17, 2022 at 12:31 =
PM milky india &lt;<a href=3D"mailto:milkyindia@gmail.com" target=3D"_blank=
">milkyindia@gmail.com</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; Sorry about that, again -=
 I&#39;m not sure what you mean by bottom-post vs top-post.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; Be that as it may - I rea=
d the geli man page. I was specifically warned against using &quot;geli res=
ize&quot; since it may not work as expected <a href=3D"https://forums.FreeB=
SD.org/threads/how-to-extend-zfs-geli-encrypted-disk-space-not-showing.8644=
7/post-581642" rel=3D"noreferrer" target=3D"_blank">https://forums.FreeBSD.=
org/threads/how-to-extend-zfs-geli-encrypted-disk-space-not-showing.86447/p=
ost-581642</a><br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; Is this advise wrong?<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; &gt; &quot;The geli has a=
utoresize flag which will handle the new provider size after gpart resize c=
ommand.&quot;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; followed by<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; &gt; You are right, no ge=
li resize needed.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; What would be the correct=
 sequence of commands to fix this - Simply &quot;geli resize&quot; ? (the -=
s option seems to be additional, will it figure it out without providing s?=
)<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; On Sat, Sep 17, 2022 at 1=
0:20 PM Alan Somers &lt;<a href=3D"mailto:asomers@freebsd.org" target=3D"_b=
lank">asomers@freebsd.org</a>&gt; wrote:<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; top-posting is where you inser=
t your reply above the previous email.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; Bottom posting is where you in=
sert your reply below it, like I&#39;m<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; doing.=C2=A0 The forum user sa=
id that you shouldn&#39;t need to run &quot;geli<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; resize&quot; because the AUTOR=
ESIZE flag is on.=C2=A0 But as you can see from<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; your &quot;geli list&quot; out=
put, it&#39;s actually off.=C2=A0 So you need to run &quot;geli<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; resize&quot;.=C2=A0 The &quot;=
-s&quot; flag should be unnecessary since your provider is<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; already online.=C2=A0 At any r=
ate, you can try it both ways.=C2=A0 You might<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; want to make a copy of /var/ba=
ckups/ada0p3.eli, just in case you make<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; a mistake.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; Thanks - I hope I am bottom postin=
g this as was expected of me.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; So if I understand correctly the A=
UTORESIZE flag is present for adaop2 and NOT for adap3 (which is the partit=
ion we are concerned about) - hence the advice given to not use &quot;geli =
resize&quot; isn&#39;t applicable here. Am I understanding this correctly?<=
br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; Yes<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; &gt; So you need to run &quot;geli=
 resize&quot;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; Is this the only command that I ne=
ed to run to resize my geli partition?<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; Yes<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; &gt; The &quot;-s&quot; flag shoul=
d be unnecessary since your provider is<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; already online.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; Ok thanks.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; &gt;You might want to make a copy =
of /var/backups/ada0p3.eli, just in case you make a mistake.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; Don&#39;t have the luxury of backu=
p currently.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; Um, ok.=C2=A0 I can&#39;t guess why you=
 aren&#39;t able to do that, but it isn&#39;t<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; strictly necessary.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; I suppose at the end of it - if th=
is works - &quot;geli list&quot; would reflect the size to be 458G? (vs 290=
G currently)<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; &gt; And that&#39;s the output I can tr=
ust to have solved the issue - or is there more to it?<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;&gt; Yes.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; &gt; The &quot;-s&quot; flag should be unne=
cessary since your provider is already online.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; When I try to run &quot;geli resize /dev/ad=
a0p3.eli&quot; it complains. So I guess options s is must ? If yes - do I n=
eed to put in the exact size down to bytes from the output of geli list ? U=
nder &quot;Mediasize&quot; ?<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; ---------------------------------------<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; geli: Option &#39;s&#39; not specified.<br>
&gt;&gt; &gt;&gt; &gt;&gt; &gt; ----------------------------------------<br=
>
&gt;&gt; &gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; &gt;&gt; Dude, it&#39;s easier just to try it, than to as=
k us.=C2=A0 Go for it.=C2=A0 The<br>
&gt;&gt; &gt;&gt; &gt;&gt; worst case scenario if you get the argument wron=
g is that nothing<br>
&gt;&gt; &gt;&gt; &gt;&gt; happens.<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt;<br>
&gt;&gt; &gt;&gt; &gt; &gt; The worst case scenario if you get the argument=
 wrong is that nothing happens.<br>
&gt;&gt; &gt;&gt; &gt; I&#39;m not very sure if I put in the wrong value of=
 s (old size) then &quot;nothing happens&quot; - I would imagine if I put i=
n a size less than the current size then possibly the data after that get&#=
39;s lost? Or if I put in a size greater than the current size then there i=
s a gap in the geli partition?<br>
&gt;&gt; &gt;&gt; &gt; I sense some frustration in your reply - but I&#39;m=
 on a live system and wouldn&#39;t want to possibly risk it going kaput at =
this last step. That&#39;s the reason I&#39;m trying to understand what is =
the best value of s for geli resize and how to obtain it.<br>
&gt;&gt; &gt;&gt;<br>
&gt;&gt; &gt;&gt; The purpose of the &quot;-s&quot; argument is to tell gel=
i where to find the old<br>
&gt;&gt; &gt;&gt; label, if the provider isn&#39;t already attached.=C2=A0 =
If you supply the<br>
&gt;&gt; &gt;&gt; wrong argument, then geli won&#39;t be able to find the l=
abel, and thus<br>
&gt;&gt; &gt;&gt; won&#39;t be able to do anything.=C2=A0 It won&#39;t dest=
roy any data, and it will<br>
&gt;&gt; &gt;&gt; always automatically determine the size of the current pr=
ovider.=C2=A0 Of<br>
&gt;&gt; &gt;&gt; course, if you&#39;re worried about losing data, you shou=
ld always save a<br>
&gt;&gt; &gt;&gt; copy of /var/backups/ada0p3.eli, as I suggested.<br>
&gt;&gt; &gt;&gt; -Alan<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;=C2=A0 &gt;The purpose of the &quot;-s&quot; argument is to te=
ll geli where to find the old<br>
&gt;&gt; &gt; &gt; label, if the provider isn&#39;t already attached.=C2=A0=
 If you supply the<br>
&gt;&gt; &gt; &gt; wrong argument, then geli won&#39;t be able to find the =
label, and thus<br>
&gt;&gt; &gt; &gt; won&#39;t be able to do anything.<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt; I think you&#39;re confusing the -s argument with something e=
lse - the man page says it&#39;s for the old size - that&#39;s why I was tr=
ying to figure it out and still haven&#39;t been able to quite yet. Althoug=
h I suspect the &quot;Mediasize&quot; output for p3 from &quot;geli list&qu=
ot; is what the s value should be - but not very sure :<br>
&gt;&gt; &gt; -------------------------------------------------------------=
-----------------------------<br>
&gt;&gt; &gt; Additional options include:<br>
&gt;&gt; &gt;<br>
&gt;&gt; &gt;=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0=
 =C2=A0 =C2=A0-s oldsize=C2=A0 =C2=A0 =C2=A0 =C2=A0 The size of the provide=
r before it was resized.<br>
&gt;&gt; &gt; -------------------------------------------------------------=
-----------------------------------<br>
&gt;&gt;<br>
&gt;&gt; Yes, that&#39;s right.=C2=A0 geli needs to know the old size of th=
e provider in<br>
&gt;&gt; order to find the provider&#39;s old label.<br>
&gt;<br>
&gt;<br>
&gt; Thanks for acknowledging. I tried to do this using the s value from ge=
li list - it won&#39;t let me even do it as sudo :<br>
&gt; Getting a bit scared now. Should I not be writing `.eli` part?<br>
&gt; -----------------------------------------------------------------<br>
&gt; sudo geli resize -s 311481593856 /dev/ada0p3.eli<br>
&gt; Password:<br>
&gt; geli: Cannot open /dev/ada0p3.eli: Operation not permitted.<br>
&gt; sudo geli resize -s 311481593856 ada0p3.eli<br>
&gt; geli: Cannot open ada0p3.eli: Operation not permitted.<br>
&gt; ----------------------------------------------------------------------=
-----<br>
<br>
Yes, you normally would not write the &quot;.eli&quot;, because &quot;geli =
resize&quot; is<br>
normally used when geli is not attached.=C2=A0 But it seems like you&#39;re=
<br>
currently booted from this device, right?=C2=A0 In that case, detaching it<=
br>
isn&#39;t an easy option for you.=C2=A0 If you like, you could try automati=
c<br>
expansion instead.=C2=A0 First enable it.=C2=A0 If it doesn&#39;t automatic=
ally<br>
expand when you enable that option, then you may have to &quot;gpart<br>
resize&quot; again.=C2=A0 You can enable it with &quot;geli configure -r<br=
>
/dev/ada0p3&quot;.<br></blockquote><div>=C2=A0&gt;Yes, you normally would n=
ot write the &quot;.eli&quot;, because &quot;geli resize&quot; is</div>&gt;=
 normally used when geli is not attached.But it seems like you&#39;re</div>=
&gt; currently booted from this device, right?<div>Yes - on a live system.=
=C2=A0</div><div><br></div><div>&gt; You can enable it with &quot;geli conf=
igure -r /dev/ada0p3&quot;.</div><div>Seems to have run without any output =
:</div><div>----------------------------------</div><div>geli configure -r =
/dev/ada0p3<br></div><div>--------------------------------------------</div=
><div>But geli list output hasn&#39;t changed apparently</div><div>--------=
--------------------------------------------</div><div>geli list<br>Geom na=
me: ada0p3.eli<br>State: ACTIVE<br>EncryptionAlgorithm: AES-XTS<br>KeyLengt=
h: 256<br>Crypto: accelerated software<br>Version: 7<br>UsedKey: 0<br>Flags=
: BOOT, GELIBOOT<br>KeysAllocated: 73<br>KeysTotal: 73<br>Providers:<br>1. =
Name: ada0p3.eli<br>=C2=A0 =C2=A0Mediasize: 311481593856 (290G)<br>=C2=A0 =
=C2=A0Sectorsize: 4096<br>=C2=A0 =C2=A0Mode: r1w1e1<br>Consumers:<br>1. Nam=
e: ada0p3<br>=C2=A0 =C2=A0Mediasize: 491516858368 (458G)<br>=C2=A0 =C2=A0Se=
ctorsize: 512<br>=C2=A0 =C2=A0Stripesize: 0<br>=C2=A0 =C2=A0Stripeoffset: 8=
590983168<br>=C2=A0 =C2=A0Mode: r1w1e1<br><br>Geom name: ada0p2.eli<br></di=
v><div>--------------------------------------------------------------------=
</div><div>Is it supposed to show up after a restart?=C2=A0</div><div>Or di=
d it just not work?</div><div>I&#39;m just so lost now - hoping I can even =
restart the machine and data isn&#39;t lost/corrupted :(</div></div>

--0000000000007fd3ae05e8e60d4f--



Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACQUA7mnaF7uu7SLkhv7Q2BXo2fDDnubtTUwYJKKNfFVWn%2BCpg>