[PATCH V5][blivet] Add support for FBA EDEV/EAV installation (#885957)

Nageswara R Sastry rnsastry at linux.vnet.ibm.com
Wed Nov 27 06:36:53 UTC 2013


Hello,

After spending good amount of time in resolving this,
What ever the approach is, it's falling in to two basic things

1. Deletion of the existing partition
2. Creation of a new partition

With FBA kind of disks both of the things can not happen. So it is failing
always with basic stuff.

I am seeing only way to resolve this is, falling back to patch version 5.
Please let me know if you have a better approach.

Thanks in advance.
Regards
R.Nageswara Sastry


> 
> On 11/5/2013 5:10 PM, Nageswara R Sastry wrote:
>> On 11/1/2013 3:43 AM, David Lehman wrote:
>>>
>>> That's because the code I am asking you to rely on is broken. Please try
>>> it with the following patch applied:
>>>
>>> diff --git a/blivet/__init__.py b/blivet/__init__.py
>>> index 4feaa6f..c54229e 100644
>>> --- a/blivet/__init__.py
>>> +++ b/blivet/__init__.py
>>> @@ -815,12 +815,11 @@ class Blivet(object):
>>>          """
>>>          # first, remove magic mac/sun partitions from the parted Disk
>>>          if disk.partitioned:
>>> -            magic_partitions = {"mac": 1, "sun": 3}
>>> -            if disk.format.labelType in magic_partitions:
>>> -                number = magic_partitions[disk.format.labelType]
>>> +            magic = disk.format.magicPartitionNumber
>>> +            if magic:
>>>                  # remove the magic partition
>>> -                for part in disk.format.partitions:
>>> -                    if part.disk == disk and
>>> part.partedPartition.number == number:
>>> +                for part in self.devicetree.getChildren(disk):
>>> +                    if part.partedPartition.number == magic:
>>>                          log.debug("removing %s" % part.name)
>>>                          # We can't schedule the magic partition for
>>> removal
>>>                          # because parted will not allow us to remove it
>>> from the
>>>
>>
>> Applied the above patch and this opened up so many problems
>> to be resolved for FBA disk, mainly in the code of partition.py
>> Currently looking in to it.
>>
>> Because it's already having an implicit partition, So a new temporary/real
>> partition can not be added. This behavior is causing problem to run
>> blivet code.
> 
> After the above I have gone through the following two approaches to solve this.
> 
> Approach 1:
> Because of the nature of the disk, the free space will not be shown to the user.
> Through a series of hacks, the installation stuck at the place where it creates
> partition, removing partition. On this kind of disks neither the partition
> creation nor the deletion is supported so dropped this approach.
> 
> Approach 2:
> The following code from blivet/__init__.py
>  955         elif isinstance(device, PartitionDevice) and device.isProtected:
>  956             # LDL formatted DASDs always have one partition, you'd have to
>  957             # reformat the DASD in CDL mode to get rid of it
>  958             return _("You cannot delete a partition of a LDL formatted "
>  959                      "DASD.")
> 
> Given idea that this kind of device is having a property of 'protected'. So created
> the following attached patch (along with some debug statements). With this patch
> it crossed partition.py code and got struck with error "failed to set bootloader
> stage1 device: need stage1 disk to set stage1 device".
> This is happening because 'ksdata' is not getting updated with --boot-disk.
> 
> Can you please validate this approach and can you give any suggestions to set the
> --bot-disk correctly - for this kind of disks?
> 
> To resolve the above, I am currently looking to anaconda/pyanaconda/kickstart.py,
> ui/gui/spokes/storage.py and ui/tui/spokes/storage.py
> 
> Along with the patch, attaching the storage.log with the debug statements
> placed and in the storage.log kickstart data is masked (masking IP addresses and other
> sensitive information).
> 
> FYI: the code is still containing a hunk, which is not acceptable. Still I have not
> got the other way round to remove this.
> +            if disk.format.isLDL:
> +                pass
> +            else:
> +                raise ValueError("cannot initialize a disk that has partitions")
> 
> 
> Thanks in advance.
> 
> Regards
> R.Nageswara Sastry
> 



More information about the anaconda-patches mailing list