Re: [PATCH] Fix ks --useexisting and --noformat options of logvol and volgroup

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

 



On Thu, 2009-04-09 at 15:52 +0200, Radek Vykydal wrote:
> Combinations of --useexisting and --noformat options
> of ks commands logvol and volgroup should work (I did
> basic tests). Note that volgroup --useexisting overrides
> --noformat of logvol (volume group and therefore logical
> volume is formatted as described in documentation).

See below.

> ---
>  kickstart.py |   13 +++++++++----
>  1 files changed, 9 insertions(+), 4 deletions(-)
> 
> diff --git a/kickstart.py b/kickstart.py
> index 02cbc6b..6cc7f5f 100644
> --- a/kickstart.py
> +++ b/kickstart.py
> @@ -386,9 +386,10 @@ class LogVol(commands.logvol.F9_LogVol):
>              return lvd
>  
>          # Make sure this LV name is not already used in the requested VG.
> -        tmp = devicetree.getDeviceByName("%s-%s" % (vg.name, lvd.name))
> -        if tmp:
> -            raise KickstartValueError, formatErrorMsg(self.lineno, msg="Logical volume name already used in volume group %s" % vg.name)
> +        if not lvd.preexist:
> +            tmp = devicetree.getDeviceByName("%s-%s" % (vg.name, lvd.name))
> +            if tmp:
> +                raise KickstartValueError, formatErrorMsg(self.lineno, msg="Logical volume name already used in volume group %s" % vg.name)
>  
>          # Size specification checks
>          if not lvd.preexist:
> @@ -881,7 +882,11 @@ class VolGroup(commands.volgroup.FC3_VolGroup):
>              if not device:
>                  raise KicsktartValueError, formatErrorMsg(self.lineno, msg="Specified nonexistent VG %s in volgroup command" % vgd.vgname)
>  
> -            devicetree.registerAction(ActionCreateFormat(device))
> +            for lv in device.lvs:
> +                format = getFormat(lv.format.type,
> +                                   mountpoint=lv.format.mountpoint,
> +                                   mountopts=lv.format.mountopts)
> +                devicetree.registerAction(ActionCreateFormat(lv, format))

This doesn't make any sense to me. I do agree with removing the format
create action for the VG, since the VG has no formatting. However, those
LVs will be formatted according to the logvol commands -- why do this
magic in the volgroup handler?

Dave


>          else:
>              request = storage.newVG(pvs=pvs,
>                                      name=vgd.vgname,

_______________________________________________
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