Re: [PATCH] Do not check size when adding LV to growing VG (bug #492264)

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

 



On Thu, 2009-04-02 at 14:31 +0200, Radek Vykydal wrote:
> It doesn't fit in how we are creating devices in kickstart.
> We don't grow them before adding LV. Moreover we can't know
> size of grown VG until all ks requests are processed.
> Without substantial change of processing of ks partitioning,
> I am not able to come up with anything better - see comments
> in BZ for my rationale. Any ideas are very welcome.

This version's pretty good since it checks for the very specific
situation in which we don't want the test. Ack.

> ---
>  storage/devices.py |    5 ++++-
>  1 files changed, 4 insertions(+), 1 deletions(-)
> 
> diff --git a/storage/devices.py b/storage/devices.py
> index 845a46b..7ba86b6 100644
> --- a/storage/devices.py
> +++ b/storage/devices.py
> @@ -1702,7 +1702,10 @@ class LVMVolumeGroupDevice(DMDevice):
>              raise ValueError("lv is already part of this vg")
>  
>          # verify we have the space, then add it
> -        if not lv.exists and lv.size > self.freeSpace:
> +        # do not verify for growing vg (because of ks)
> +        if not lv.exists and \
> +           not [pv for pv in self.pvs if pv.req_grow] and \
> +           lv.size > self.freeSpace:
>              raise DeviceError("new lv is too large to fit in free space")
>  
>          self._lvs.append(lv)

_______________________________________________
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