On 24/09/12 17:21, David Lehman wrote:
Sorry this is actually anaconda 12 I'm dealing with, since the sparc port is being restarted, but when I looked at fc18 for comparison of what changes may have happened the code seemed identical. which is why I dropped a note here. because the geometry does change? (solaris label after formatting from a zero'd drive (no partitions made))storage/formats/disklabel.py When you ask for a replacement of the existing linux system anaconda does what I consider to be really bad practices. It seems to believe that knowing where the partitions are is enough for it to DELETE the 1st MB of the disk to destroy the partition table. It then initializes the disklabel and then writes out the partitions in the exact same place,...Choosing "Use all space" will always create a new disklabel. Choosing "Replace existing linux systems" will only create a new disklabel if removing all linux partitions yields a disk with no partitions. As far as the extra measure we take to ensure we do not leave (or find) stale metadata -- if you want to complain about it, go ahead. This clearing of metadata is what allows us to safely reuse the same geometry if we so choose. It's beyond me why being careful would bother anyone. Also, we do this any time we create a new disklabel, regardless of which button was clicked to trigger the creation. root@solaris ~]# dd if=/dev/sdc bs=512 count=1 | cat -vAfter anaconda requests a sun label for it import partedThe result being that alignment then goes crazy and we end up with alignments of 15.86GB size rather than a more expected 2048K (which I do get before the label get rewritten) Anyway I do not expect anyone to worry or care about this. This is a parted issue I'm looking at as well. It's just annoying that the label does change and croak horribly. I just wasn't paying attention to the 'if no partitions left, then re-label' aspect you just explained. Here's how this works: 50% of complainers complain that we're notdamned if you do damned if you don't normally I'd be blamed for something like that. ... def __init__(self, *args, **kwargs): if not self.exists: self._labelType = kwargs.get("labelType", "msdos") else: self._labelType = None So when the disk is nuked, the label can't be found and it assumes msdos rather than being sensible and looking up the platform dataThis is correct IFF the original disklabel type was not passed into the constructor. It looks like you've made a pretty big incorrect assumption about what resetPartedDisk does. It does not wipe or reinitialize a disklabel. What it does is really just an internal detail of how anaconda commits partitioning changes to disk (one at a time). A call to resetPartedDisk resets the disklabel to whatever state it was in when the DiskLabel format was instantiated. My assumption came from reading the action queue, literally, whilst I was following resetPartedDisk() [debugging note] If I were you I'd be trying to figure out why no label type is being passed to the constructor for your new disklabel. It'll be somewhere in a getFormat("disklabel", ...) call. Thank you for the pointer. Phil =--= |
_______________________________________________ Anaconda-devel-list mailing list Anaconda-devel-list@xxxxxxxxxx https://www.redhat.com/mailman/listinfo/anaconda-devel-list