Author: ug Date: Fri May 13 14:23:31 2011 New Revision: 63995 URL: http://svn.opensuse.org/viewcvs/yast?rev=63995&view=rev Log: keep_unknown_lv added (fate#308893) Modified: trunk/autoinstallation/doc/PartitioningSection.xml trunk/autoinstallation/doc/autoyast.xml trunk/autoinstallation/package/autoyast2.changes trunk/autoinstallation/src/modules/AutoinstLVM.ycp Modified: trunk/autoinstallation/doc/PartitioningSection.xml URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/doc/PartitioningSection.xml?rev=63995&r1=63994&r2=63995&view=diff ============================================================================== --- trunk/autoinstallation/doc/PartitioningSection.xml (original) +++ trunk/autoinstallation/doc/PartitioningSection.xml Fri May 13 14:23:31 2011 @@ -146,6 +146,13 @@ </entry> <entry>optional and available since openSUSE 12.1 and SLES11 SP2. Default is to let yast decide what makes sense (msdos in most cases)</entry> </row> + <row> + <entry>keep_unknown_lv</entry> + <entry>This value only makes sense for type=CT_LVM drives. If you are reusing a LVG and you set this to true, all existing LVs in that VG won't be touched unless they are specified in the <partitioning> section. So you can keep existing LVs without need to specify them. +<para><screen><keep_unknown_lv config:type="boolean">false</keep_unknown_lv></screen></para> +</entry> + <entry>optional and available since openSUSE 12.1 and SLES11 SP2. The default is false</entry> + </row> </tbody> </tgroup> </table> @@ -450,7 +457,7 @@ <entry>parity_algorithm</entry> <entry> <para> - possible values are: left_asymmetric, left_symmetric, right_asymmetric, right_symmetric + possible values are: left_asymmetric, left_symmetric, right_asymmetric, right_symmetric and since SLES11 SP2 and openSUSE 12.1 you can use parity_first, parity_last, left_asymmetric_6, left_symmetric_6, right_asymmetric_6, right_symmetric_6, parity_first_6, n2, o2, f2, n3, o3, f3 for RAID6 and RAID10 </para> <para><screen><parity_algorithm>left_asymmetric</parity_algorithm></screen></para> </entry> Modified: trunk/autoinstallation/doc/autoyast.xml URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/doc/autoyast.xml?rev=63995&r1=63994&r2=63995&view=diff ============================================================================== --- trunk/autoinstallation/doc/autoyast.xml (original) +++ trunk/autoinstallation/doc/autoyast.xml Fri May 13 14:23:31 2011 @@ -59,7 +59,7 @@ <firstname>Uwe</firstname> <surname>Gansert</surname> <affiliation> - <jobtitle>Server Technologies</jobtitle> + <jobtitle>Concepts, Development and Documentation</jobtitle> <orgname></orgname> </affiliation> </author> Modified: trunk/autoinstallation/package/autoyast2.changes URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/package/autoyast2.changes?rev=63995&r1=63994&r2=63995&view=diff ============================================================================== --- trunk/autoinstallation/package/autoyast2.changes (original) +++ trunk/autoinstallation/package/autoyast2.changes Fri May 13 14:23:31 2011 @@ -1,4 +1,9 @@ ------------------------------------------------------------------- +Fri May 13 14:22:32 CEST 2011 - ug@suse.de + +- keep_unknown_lv added (fate#308893) + +------------------------------------------------------------------- Tue Apr 26 17:30:58 CEST 2011 - ug@suse.de - added documention for disklabel (bnc#631176) Modified: trunk/autoinstallation/src/modules/AutoinstLVM.ycp URL: http://svn.opensuse.org/viewcvs/yast/trunk/autoinstallation/src/modules/AutoinstLVM.ycp?rev=63995&r1=63994&r2=63995&view=diff ============================================================================== --- trunk/autoinstallation/src/modules/AutoinstLVM.ycp (original) +++ trunk/autoinstallation/src/modules/AutoinstLVM.ycp Fri May 13 14:23:31 2011 @@ -74,17 +74,29 @@ return (substring(d, 5) ); }); + /* we say keep all LVs where the keep_unknown_lv is set */ + foreach ( string k, map v, ExistingLVM, ``{ + string vgname = v["name"]:""; + foreach( map p, v["partitions"]:[], ``{ + if( lvm["/dev/"+vgname,"keep_unknown_lv"]:false == true ) + keepLVM[vgname] = add( keepLVM[vgname]:[], p["lv_name"]:"" ); + }); + }); + /* look for VGs to reuse */ foreach ( string k, map v, AutoinstStorage::AutoTargetMap, ``{ foreach ( map p, v["partitions"]:[], ``{ if( haskey( p, "lvm_group" ) && p["create"]:true == false && p["format"]:true == false ) { - keepLVM[p["lvm_group"]:"x"] = []; if( !contains( ExistingVGs, p["lvm_group"]:"x" ) ) Report::Error( sformat( _("Cannot reuse volume group %1. The volume group does not exist."), p["lvm_group"]:"x" ) ); map atm = AutoinstStorage::AutoTargetMap; foreach ( map vg_p, atm["/dev/"+p["lvm_group"]:"x","partitions"]:[], ``{ - if( vg_p["create"]:true == false ) - keepLVM[p["lvm_group"]:"x"] = add( keepLVM[p["lvm_group"]:"x"]:[], vg_p["lv_name"]:"" ); + string lvm_group = p["lvm_group"]:"x"; + // we know the LV now. So remove it from the keep-list for now + keepLVM[lvm_group] = filter (string v, keepLVM[lvm_group]:[], { return ( v != vg_p["lv_name"]:"" ); }); + if( vg_p["create"]:true == false && !contains(keepLVM[lvm_group]:[], vg_p["lv_name"]:"") ) { + keepLVM[lvm_group] = add( keepLVM[lvm_group]:[], vg_p["lv_name"]:"" ); + } }); } }); -- To unsubscribe, e-mail: yast-commit+unsubscribe@opensuse.org For additional commands, e-mail: yast-commit+help@opensuse.org