Re: [Fedora-sparc] SPARC Status

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On 24/09/12 17:21, David Lehman wrote:

Are talking about Fedora 18, Fedora 12, or what? We've fixed a few bugs
since F12.

  
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.

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.
  
because the geometry does change? (solaris label after formatting from a zero'd drive (no partitions made))
root@solaris ~]# dd if=/dev/sdc bs=512 count=1 | cat -v
ATA-Corsair Force 3-3 cyl 65533 alt 2 hd 16 sec 223
[root@blackknight ~]# fdisk -l /dev/sdl

Disk /dev/sdl (Sun disk label): 16 heads, 223 sectors, 65533 cylinders
Units = sectors of 1 * 512 bytes


After anaconda requests a sun label for it
import parted
sd = parted.Device(path="/dev/sda")

disk = parted.Disk(device=sd)
print sd.biosGeometry
(72961, 255, 63)
The 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 not
aggressive enough with replacement of disklabels. The other 50% complain
that we're too aggressive. Go figure.
  
damned 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 data
    
This 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]
(Pdb) print self._actions[0]                                                   
Destroy Format ext3 on disk sda (id 1)                                         
(Pdb) print self._actions[1]                                                   
Create Format disklabel on disk sda (id 1)  <----  ?                                 
(Pdb) print self._actions[2]                                                   
Create Device partition sda2 (id 3)                                            
(Pdb) print self._actions[3]                                                   
Create Format lvmpv on partition sda2 (id 3)
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

[Index of Archives]     [Kickstart]     [Fedora Users]     [Fedora Legacy List]     [Fedora Maintainers]     [Fedora Desktop]     [Fedora SELinux]     [Big List of Linux Books]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]
  Powered by Linux