Re: [PATCH 1/2] Put back the deepcopy of the device stack in ActionDestroyFormat.

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

 



On Tue, 2010-02-16 at 11:49 +0100, Hans de Goede wrote:
> On Mon, 15 Feb 2010 19:01:59 -0600, Dave Lehman wrote:
>  > On Sat, 2010-02-13 at 08:12 +0100, Hans de Goede wrote:
>  >  > Hi,
>  >  >
>  >  > On 02/12/2010 09:28 PM, David Lehman wrote:
>  >  > > This is needed to make preexisting LUKS LVM PVs work correctly.
>  >  > >
>  >  >
>  >  > Hmm, iirc there were several issues with this approach, doesn't
>  >  > the need for this indicate a deviceaction sorting problem and
>  >  > wouldn't it be better to fix that instead?
>  >
>  > I don't recall the previous approach causing problems. Mostly I just
>  > wished it wasn't necessary. It isn't related to action sorting, but I
>  > will admit that I don't totally understand why it happens in certain
>  > situations and not in others.
>  >
>  > Since we're waiting on beta1 to clear anyway I'll take another look at
>  > this and see if there's a better solution.
>  >
> 
> IIRC the problem is that when we do the deepcopy, the (not deep copied)
> partedDisk references in various places point to the partedDisk instance
> that gets modified as we do partitioning. And when we reset these
> partedDisk references to point to the origPartedDisk's before executing
> actions, this only affects all the current formats / devices, not the
> deepcopies.
> 
> So the destroy action gets executed on a device which (in some cases)
> points to the state the partition table will be in at the end of partitioning,
> instead of in the state it was in when we started, which may lead to us
> operating on the wrong device node ie /dev/sda5 instead of /dev/sda6.

The one I remember was related to us resetting partition flags (and then
committing) from inside ActionDestroyFormat.execute, which we don't do
anymore. That's the only place the copy of the device stack gets used at
all.

As for partitions getting renumbered out from under us, well... it's
ridiculous that we have to deal with that at all. Parted should either
not rename partitions unless asked, or else it should provide some
unique identifier so we have a persistent handle to any given partition.
I am currently considering using a partition's disk and starting sector
for this purpose.

Dave

_______________________________________________
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