Date: Sun, 21 Aug 2011 19:00:19 -0500 From: Nathan Whitehorn <nwhitehorn@freebsd.org> To: Marcel Moolenaar <marcel@xcllnt.net> Cc: Garrett Cooper <yanegomi@gmail.com>, freebsd-current@freebsd.org Subject: Re: Well, there goes Windows! Message-ID: <4E519C13.4060700@freebsd.org> In-Reply-To: <64622705-80AB-4FEF-91E9-8F3041818B4E@xcllnt.net> References: <CAGH67wRFP9nFQLr0Gh-h4rKWrndZSy=6Q%2BKLC_U5Fg4RD%2BJMCw@mail.gmail.com> <4E4DB9A7.4040404@freebsd.org> <CAGH67wQoXOju3=OTh%2B6JoKLxkp7Vzqu8vg%2BO9X=DPXB5EkBJtQ@mail.gmail.com> <4E517978.2020705@freebsd.org> <64622705-80AB-4FEF-91E9-8F3041818B4E@xcllnt.net>
next in thread | previous in thread | raw e-mail | index | archive | help
On 08/21/11 18:11, Marcel Moolenaar wrote: > On Aug 21, 2011, at 2:32 PM, Nathan Whitehorn wrote: >> gpart does not support (well, anyway) changing the underlying partition table format without committing changes. Replacing the partition scheme, which this does, is such an operation. > Weird. I could always destroy tables, create new ones using a > different scheme and populate it with partitions without there > being a single write to disk. The commit/undo logic worked > just as well for those operations as the simpler ones. Did that > get broken or are you just mistaken? > No, it's stupider than that. When you destroy a gpart without committing, the GEOM itself lingers as a (none)-type partitioning. This of course makes sense, since that ghost geom is what is maintaining all the state, but sometimes causes problems. For instance, it breaks some of my lazy code that identifies non-partitioned disks by seeing if there is a GEOM there. But, while slightly more complicated to detect, this would not be too difficult to fix. The larger problem is that this behavior means that destroying gparts sometimes doesn't work at all. For instance, if you have nested partitioning like MBR+BSD (or EBR) it is not possible to destroy the underlying MBR geom without committing the destruction of the BSD geom. This is because the MBR geom cannot be destroyed, even without committing, while it continues to have children, which it does due to the ghost geom for the BSD slice. The regular partitioning editor only commits early in this particular case, and asks about each subpartition tree separately with a big scary dialog box. In the spirit of the autopartitioner, it makes one large scary dialog, and always runs in early commit mode instead of potentially showing many scary dialogs about partitions the user doesn't necessarily even know about. This behavior could be changed, but I think is the most friendly for the case in question: namely, "I want to blow away everything and let the installer handle all partitioning details by itself". -Nathan
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?4E519C13.4060700>