[Bug 226714] zfsboot(8) erroneously suggests creating a BSD label

bugzilla-noreply at freebsd.org bugzilla-noreply at freebsd.org
Wed Mar 28 15:58:44 UTC 2018


https://bugs.freebsd.org/bugzilla/show_bug.cgi?id=226714

--- Comment #25 from Warner Losh <imp at FreeBSD.org> ---
Leaving vestiges of a bsdlabel around is asking for trouble. What I'm worried
about is that we don't actually handle the nesting case in general. Also, if
the bsdlabel looks valid, the boot blocks have to honor it. Otherwise it's a
laying violation. zfs isn't immune from properly labeling disks, so we won't be
adding a weird exception for that. We could add additional checks to make sure
that the bsdlabel is sane and ignore it if it isn't. The current checks are
pretty minimal.

I'm surprised that gpart destory of the MBR doesn't recursively destroy the
nested things. The man page is silent, though it has a -F to force destroying a
non-empty one. This sounds more like a pilot error, however. If the BSD label
is indeed stale, there's little that we can do. We have similar issues with
things converted from MBR to GPT sometimes if the old labels aren't properly
cleared out.

I spent an hour on the plane staring at the code, and we should handle it
properly with. I know it's the design point to disallow opens for nested
containers, but I couldn't find where in the code that actually happened. It's
spring break this week, so I'll take a look at it when things are over.

I also agree, btw, that gpart installboot should just work rather than the
crazy dd stuff...

-- 
You are receiving this mail because:
You are the assignee for the bug.


More information about the freebsd-doc mailing list