Date: Sat, 2 Dec 2023 00:34:45 -0500 From: Zaphod Beeblebrox <zbeeble@gmail.com> To: Warner Losh <imp@bsdimp.com> Cc: Pete French <pete@twisted.org.uk>, FreeBSD Stable ML <stable@freebsd.org> Subject: Re: EFI and zfs raid mirror partial fail (14.0 and RELENG_13) Message-ID: <CACpH0MfOUcdCMSf3XBdvmXAAte-pw9nNo4TNdeMjq9f%2BH_V9yQ@mail.gmail.com> In-Reply-To: <CANCZdfqRsOHmyPRtH3fsMG=86RD=4Ci=hpU9VHFf20nc=0Js=Q@mail.gmail.com> References: <c9969fde-3653-43ce-a1f0-322e2dc4a77b@sentex.net> <e9f9acd5-6490-4b6d-8cce-a8d7826fe86c@sentex.net> <86d04457-5018-45f9-849f-eb20ed5cf380@twisted.org.uk> <CANCZdfqRsOHmyPRtH3fsMG=86RD=4Ci=hpU9VHFf20nc=0Js=Q@mail.gmail.com>
next in thread | previous in thread | raw e-mail | index | archive | help
--000000000000cc5789060b803e27 Content-Type: text/plain; charset="UTF-8" Content-Transfer-Encoding: quoted-printable It can be more straightforward to update the gmirror, however. I've done this with UFS --- old boot, pair of UFS/GMIRROR usb sticks that then boot to a ZFS array that the BIOS couldn't see (so UFS only contained /boot and /rescue). It's easier to know that the boot is updated identically if gmirrored. Gmirror also has tools to verify, etc. On Fri, Dec 1, 2023 at 7:46=E2=80=AFPM Warner Losh <imp@bsdimp.com> wrote: > > > On Fri, Dec 1, 2023, 4:57 PM Pete French <pete@twisted.org.uk> wrote: > >> >> On 01/12/2023 21:53, mike tancsa wrote: >> > Should have looked at open PRs. There is one from a while ago >> > >> > https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258987 >> > >> > >> >> Was thinking about this, and I was wondering if it would be possible to >> make the EFI partition a gmirror. So its across all discs, mounted only >> once, but would still boot from any of them. My understanding is geom >> has the label at the end, yes ? So the firmware would see the filesystem >> on a single partition quite happily ? >> > > I've done this. It works ok. But I don't run like this in production. If = I > write a new file, that has so many writes to the different disks. If they > all go through then life is good (this is what gets us to OK). > > BUT, if there is a power failure or crash and only some of them make it t= o > disk, then you have a corrupt ESP and the BIOS may pick that ESP to boot > off of, booting corrupt data. > > Since this is infrequently updated, you can use a safe sequence to update > things one partition a time, then you might lose the file entirely, but i= t > will either be there and good. Or it will be gone. You can't get into a b= ad > situation. Either you boot old or new loader and can just quit from the > boot loader if it's the old one and it can't boot. Efi will try the next > one on the list. > > Here manual mirroring, if scripted, can be more reliable than gmirror. > > Warner > > -pete. >> >> >> --000000000000cc5789060b803e27 Content-Type: text/html; charset="UTF-8" Content-Transfer-Encoding: quoted-printable <div dir=3D"ltr">It can be more straightforward to update the gmirror, howe= ver.=C2=A0 I've done this with UFS --- old boot, pair of UFS/GMIRROR us= b sticks that then boot to a ZFS array that the BIOS couldn't see (so U= FS only contained /boot and /rescue).=C2=A0 It's easier to know that th= e boot is updated identically if gmirrored.=C2=A0 Gmirror also has tools to= verify, etc.<br></div><br><div class=3D"gmail_quote"><div dir=3D"ltr" clas= s=3D"gmail_attr">On Fri, Dec 1, 2023 at 7:46=E2=80=AFPM Warner Losh <<a = href=3D"mailto:imp@bsdimp.com">imp@bsdimp.com</a>> wrote:<br></div><bloc= kquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:= 1px solid rgb(204,204,204);padding-left:1ex"><div dir=3D"auto"><div><br><br= ><div class=3D"gmail_quote"><div dir=3D"ltr" class=3D"gmail_attr">On Fri, D= ec 1, 2023, 4:57 PM Pete French <<a href=3D"mailto:pete@twisted.org.uk" = target=3D"_blank">pete@twisted.org.uk</a>> wrote:<br></div><blockquote c= lass=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left:1px soli= d rgb(204,204,204);padding-left:1ex"><br> On 01/12/2023 21:53, mike tancsa wrote:<br> > Should have looked at open PRs. There is one from a while ago<br> ><br> > <a href=3D"https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=3D258987"= rel=3D"noreferrer noreferrer" target=3D"_blank">https://bugs.freebsd.org/b= ugzilla/show_bug.cgi?id=3D258987</a><br> ><br> ><br> <br> Was thinking about this, and I was wondering if it would be possible to <br= > make the EFI partition a gmirror. So its across all discs, mounted only <br= > once, but would still boot from any of them. My understanding is geom <br> has the label at the end, yes ? So the firmware would see the filesystem <b= r> on a single partition quite happily ?<br></blockquote></div></div><div dir= =3D"auto"><br></div><div dir=3D"auto">I've done this. It works ok. But = I don't run like this in production. If I write a new file, that has so= many writes to the different disks. If they all go through then life is go= od (this is what gets us to OK).</div><div dir=3D"auto"><br></div><div dir= =3D"auto">BUT, if there is a power failure or crash and only some of them m= ake it to disk, then you have a corrupt ESP and the BIOS may pick that ESP = to boot off of, booting corrupt data.</div><div dir=3D"auto"><br></div><div= dir=3D"auto">Since this is infrequently updated, you can use a safe sequen= ce to update things one partition a time, then you might lose the file enti= rely, but it will either be there and good. Or it will be gone. You can'= ;t get into a bad situation. Either you boot old or new loader and can just= quit from the boot loader if it's the old one and it can't boot. E= fi will try the next one on the list.</div><div dir=3D"auto"><br></div><div= dir=3D"auto">Here manual mirroring, if scripted, can be more reliable than= gmirror.</div><div dir=3D"auto"><br></div><div dir=3D"auto">Warner</div><d= iv dir=3D"auto"><br></div><div dir=3D"auto"><div class=3D"gmail_quote"><blo= ckquote class=3D"gmail_quote" style=3D"margin:0px 0px 0px 0.8ex;border-left= :1px solid rgb(204,204,204);padding-left:1ex"> -pete.<br> <br> <br> </blockquote></div></div></div> </blockquote></div> --000000000000cc5789060b803e27--
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?CACpH0MfOUcdCMSf3XBdvmXAAte-pw9nNo4TNdeMjq9f%2BH_V9yQ>