Re: Need help with live system expansion (zfs+geli)

From: milky india <milkyindia_at_gmail.com>
Date: Sat, 17 Sep 2022 18:31:14 UTC
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:

> On Sat, Sep 17, 2022 at 12:07 PM milky india <milkyindia@gmail.com> wrote:
> >
> > Apologies about that - output of "geli list" below :
> > Seems like the provider is showing the old value (290G) while the
> consumer is showing the resized value (458G) - so now I'm confused about
> what is to be done and how to resolve this (not very familiar and still
> learning)
> >
> > ----------------------------------------------------------------------
> > 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
> > State: ACTIVE
> > EncryptionAlgorithm: AES-XTS
> > KeyLength: 128
> > Crypto: accelerated software
> > Version: 7
> > Flags: ONETIME, W-DETACH, W-OPEN, AUTORESIZE
> > KeysAllocated: 2
> > KeysTotal: 2
> > Providers:
> > 1. Name: ada0p2.eli
> >    Mediasize: 8589934592 (8.0G)
> >    Sectorsize: 4096
> >    Mode: r1w1e0
> > Consumers:
> > 1. Name: ada0p2
> >    Mediasize: 8589934592 (8.0G)
> >    Sectorsize: 512
> >    Stripesize: 0
> >    Stripeoffset: 1048576
> >    Mode: r1w1e1
> >
> ----------------------------------------------------------------------------------------
>
> So yes, you need to resize the geli device.  Read the geli man page
> for details.  Also, when you reply please bottom-post rather than
> top-post.  It makes the mail archives more readable.
> -Alan
>