Re: nvd compatibility links and geli

From: Stefan Ehmann <shoesoft_at_gmx.net>
Date: Sat, 23 Sep 2023 15:43:04 UTC
On Saturday, September 23, 2023 4:45:36 PM CEST Warner Losh wrote:
> On Sat, Sep 23, 2023, 7:19 AM Stefan Ehmann <shoesoft@gmx.net> wrote:
> > The 20230612 entry in UPDATING says:
> >         Encrypted swap partitions need to be changed from nvd to nda if
> >         you
> >         migrate, or you need to use the above to switch back to nvd.
> >
> > Are encrypted (non-swap) partitions supposed to work? If not, it would be
> > less
> > confusing to directly abort with an error message instead of prompting
> > "Enter
> > passphrase: " first.
> >
> > # ls -l /dev/nvd0p4
> > lrwxr-xr-x  1 root wheel 6 Sep 23 14:59 /dev/nvd0p4 -> nda0p4
> > # geli attach nvd0p4
> > Enter passphrase:
> > geli: Provider not found: "nvd0p4"
> > geli: There was an error with at least one provider.
> >
> > Using nda works as expected:
> > # geli attach nda0p4
> > # Enter passphrase:
> > <no error>
> >
> > Tested on 14.0-BETA3.
>
> They do not work due to obscure issues with geom and how I implemented the
> compat code. You will either need to set the sysctl in the updating entry
> to switch back to nvd. Or you'll need to change the config to use the new
> name.
>
> Geom doesn't provide a nice centralized place to deal with all the name
> stuff, so my compat code was just at the most popular places. I missed a
> few...
>
> How hard is it for you to adapt?

Thanks for the explanation.

It's no issue for me. I'll just set kern.cam.nda.nvd_compat=0 to avoid
accessing nvd devices out of habit.

Maybe we should drop the "swap" from "Encrypted swap partitions" in UPDATING?