[opensuse-autoinstall] autoyast with multiple LVM Volume Groups
Hello, I'm trying to have autoyast setup some LVM volume groups. I can get things setup with a single volume group, but if try to add 2 volume groups I seem to be running into some issue. I'm using the following xml inside the partitioning section to setup the PVs and add to the volume groups. . . . <drive> <device>/dev/sdb</device> <partitions config:type="list"> <partition> <lvm_group>firstvg</lvm_group> <partition_type>primary</partition_type> <size>max</size> </partition> </partitions> <use>all</use> </drive> <drive> <device>/dev/sdc</device> <partitions config:type="list"> <partition> <lvm_group>secondvg</lvm_group> <partition_type>primary</partition_type> <size>max</size> </partition> </partitions> <use>all</use> </drive> . . . The problem is that both disks are configured as PVs in the same VG. Both sdb and sdc will be added to firstvg and secondvg will not exist. Am I trying this wrong or am I hitting some sort of bug? thanks -- bigbeer -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
big beer schrieb:
Hello,
I'm trying to have autoyast setup some LVM volume groups. I can get things setup with a single volume group, but if try to add 2 volume groups I seem to be running into some issue. I'm using the following xml inside the partitioning section to setup the PVs and add to the volume groups.
[...]
The problem is that both disks are configured as PVs in the same VG. Both sdb and sdc will be added to firstvg and secondvg will not exist.
[...]
Hello bigbeer, using SLES10 SP3 the creation of 2 VGs on 2 PVs works for me. There has been a related issue in the past - I don't remember when it was and what exactly the behaviour has been - since then I have been using "partition_id" and "partiton_nr" instead of "partition_type": <drive> <device>/dev/cciss/c0d1</device> <initialize config:type="boolean">true</initialize> <partitions config:type="list"> <partition> <lvm_group>database</lvm_group> <mount></mount> --> *) <partition_id config:type="integer">142</partition_id> --> <partition_nr config:type="integer">1</partition_nr> <size>max</size> </partition> </partitions> <use>all</use> </drive> *) partition_id: ,,Linux LVM'' = 0x8e = 142 (as reported by fdisk) partion_nr: 1..4 =>primary partitions, 5.. => extended partitions (IIRC) Regards, Oliver -- Oliver Schweikert Software Development HORIBA Europe Automation Division GmbH Zabergäustr. 3 73765 Neuhausen (Germany) Tel: +49 7158-933-413 Fax: +49 7158-933-613 Email: oliver.schweikert@horiba.com Geschäftsführer: Thomas E. Ehmann, Yuichi Muroga, Takashi Nagano Amtsgericht Stuttgart, HRB 213200 -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
big beer schrieb:
Hello,
I'm trying to have autoyast setup some LVM volume groups. I can get things setup with a single volume group, but if try to add 2 volume groups I seem to be running into some issue. I'm using the following xml inside the partitioning section to setup the PVs and add to the volume groups.
[...]
The problem is that both disks are configured as PVs in the same VG. Both sdb and sdc will be added to firstvg and secondvg will not exist.
[...]
Hello bigbeer,
using SLES10 SP3 the creation of 2 VGs on 2 PVs works for me. There has been a related issue in the past - I don't remember when it was and what exactly the behaviour has been - since then I have been using "partition_id" and "partiton_nr" instead of "partition_type":
<drive> <device>/dev/cciss/c0d1</device> <initialize config:type="boolean">true</initialize> <partitions config:type="list"> <partition> <lvm_group>database</lvm_group> <mount></mount>
--> *) <partition_id config:type="integer">142</partition_id>
--> <partition_nr config:type="integer">1</partition_nr>
<size>max</size> </partition> </partitions> <use>all</use> </drive>
*) partition_id: ,,Linux LVM'' = 0x8e = 142 (as reported by fdisk) partion_nr: 1..4 =>primary partitions, 5.. => extended partitions (IIRC)
Regards, Oliver
-- Oliver Schweikert Software Development
HORIBA Europe Automation Division GmbH Zabergäustr. 3 73765 Neuhausen (Germany) Tel: +49 7158-933-413 Fax: +49 7158-933-613 Email: oliver.schweikert@horiba.com
Geschäftsführer: Thomas E. Ehmann, Yuichi Muroga, Takashi Nagano Amtsgericht Stuttgart, HRB 213200
--
Using the xml you provided worked like a charm! I should note that this is on opensuse 11.3. Thanks! -- bigbeer -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org For additional commands, e-mail: opensuse-autoinstall+help@opensuse.org
Given : SLES 11 SP1 Task: Create a LVM partition on /dev/sdb. In case the partition already exist just mount/import the LV. Problem: I am able to create the LVM partition but i do not know how "import" a already existing partition nor how to prevent autoyast to overwrite the existing one. Ny current thoughts are using a pre-script or rule to check if there is a already configured /dev/sdb with lvm . In case none exist the following config will be applied , in case a LVM partiton already exist a post script will import these partition from /dev/sdb Still i would like to let autoyast do this but i do not know how ? Any tips or already working config ? Tia Hajo The current config looks like: <partitioning config:type="list"> .... <drive> <device>/dev/sdb</device> <initialize config:type="boolean">false</initialize> <partitions config:type="list"> <partition> <create config:type="boolean">true</create> <format config:type="boolean">false</format> <lvm_group>datavg</lvm_group> <mountby config:type="symbol">device</mountby> <size>max</size> </partition> </partitions> <use>all</use> </drive> <drive> <device>/dev/datavg</device> <initialize config:type="boolean">false</initialize> <partitions config:type="list"> <partition> <filesystem config:type="symbol">ext3</filesystem> <lv_name>datalv</lv_name> <mount>/data</mount> <partition_id config:type="integer">142</partition_id> <partition_nr config:type="integer">1</partition_nr> <size>max</size> </partition> </partitions> <pesize>32M</pesize> <use>all</use> <type config:type="symbol">CT_LVM</type> </drive> </partitioning> -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
On Tue, Sep 04, Hans-Joachim Ehlers wrote:
Given : SLES 11 SP1
Task: Create a LVM partition on /dev/sdb. In case the partition already exist just mount/import the LV.
Problem: I am able to create the LVM partition but i do not know how "import" a already existing partition nor how to prevent autoyast to overwrite the existing one.
Ny current thoughts are using a pre-script or rule to check if there is a already configured /dev/sdb with lvm . In case none exist the following config will be applied , in case a LVM partiton already exist a post script will import these partition from /dev/sdb
Still i would like to let autoyast do this but i do not know how ?
Any tips or already working config ?
It works with a pre-script and some sed trickery. I have a non-destructive default in partitioning section and change it when no lvm vg is detected in pre-script. I expect volume group rootvg on disk /dev/sdb I have the following partitioning section: <partitioning config:type="list"> <drive> <device>/dev/rootvg</device> <lvm2 config:type="boolean">true</lvm2> <partitions config:type="list"> <partition> <create config:type="boolean">false</create> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <lv_name>home</lv_name> <mount>/home</mount> <mountby config:type="symbol">device</mountby> <size>1G</size> </partition> <partition> <create config:type="boolean">false</create> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <lv_name>opt</lv_name> <mount>/opt</mount> <mountby config:type="symbol">device</mountby> <size>1G</size> </partition> <partition> <create config:type="boolean">false</create> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <lv_name>root</lv_name> <mount>/</mount> <mountby config:type="symbol">device</mountby> <size>2G</size> </partition> <partition> <create config:type="boolean">false</create> <filesystem config:type="symbol">swap</filesystem> <format config:type="boolean">true</format> <lv_name>swap</lv_name> <mount>swap</mount> <mountby config:type="symbol">device</mountby> <size>500M</size> </partition> <partition> <create config:type="boolean">false</create> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <lv_name>tmp</lv_name> <mount>/tmp</mount> <mountby config:type="symbol">device</mountby> <size>200M</size> </partition> <partition> <create config:type="boolean">false</create> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <lv_name>usr</lv_name> <mount>/usr</mount> <mountby config:type="symbol">device</mountby> <size>2G</size> </partition> <partition> <create config:type="boolean">false</create> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <lv_name>var</lv_name> <mount>/var</mount> <mountby config:type="symbol">device</mountby> <size>1G</size> </partition> </partitions> <pesize>32M</pesize> <type config:type="symbol">CT_LVM</type> <use>all</use> </drive> <drive> <device>/dev/sdb</device> <initialize config:type="boolean">false</initialize>" <partitions config:type="list"> <partition> <create config:type="boolean">false</create> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <mount>/boot</mount> <mountby config:type="symbol">device</mountby> <partition_id config:type="integer">131</partition_id> <partition_nr config:type="integer">1</partition_nr> <partition_type>primary</partition_type> <size>500M</size> </partition> <partition> <create config:type="boolean">false</create> <format config:type="boolean">false</format> <lvm_group>rootvg</lvm_group> <partition_id config:type="integer">142</partition_id> <partition_nr config:type="integer">2</partition_nr> <partition_type>primary</partition_type> <size>max</size> </partition> </partitions> <use>all</use> </drive> </partitioning> and the following script section: <scripts> <pre-scripts config:type="list"> <script> <debug config:type="boolean">true</debug> <filename>pre_script</filename> <interpreter>shell</interpreter> <source><![CDATA[ if [ `pvs | grep sdb.*rootvg | wc -l` -eq 0 ] then cp -av /tmp/profile/autoinst.xml /tmp/profile/modified.xml sed -i "/device.*rootvg/,/<\/drive>/{/create/s/false/true/}" /tmp/profile/modified.xml sed -i "/device.*sdb/,/<\/drive>/{/initialize/s/false/true/}" /tmp/profile/modified.xml sed -i "/device.*sdb/,/<\/drive>/{/create/s/false/true/}" /tmp/profile/modified.xml fi ]]></source> </script> </pre-scripts> </scripts> Tschuess, Thomas Fehr -- Thomas Fehr, SuSE Linux Products GmbH, Maxfeldstr. 5, 90409 Nuernberg, Germany GF: Jeff Hawn, Jennifer Guild, Felix Imendörffer, HRB 16746 (AG Nürnberg) Tel: +49-911-74053-0, Fax: +49-911-74053-482, Email: fehr@suse.de GPG public key available. -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
Given : SLES 11 SP1
Task: Create a LVM partition on /dev/sdb. In case the partition already exist just mount/import the LV.
Problem: I am able to create the LVM partition but i do not know how "import" a already existing partition nor how to prevent autoyast to overwrite the existing one.
Ny current thoughts are using a pre-script or rule to check if there is a already configured /dev/sdb with lvm . In case none exist the following config will be applied , in case a LVM partiton already exist a post script will import these partition from /dev/sdb
Still i would like to let autoyast do this but i do not know how ?
Any tips or already working config ?
It works with a pre-script and some sed trickery. I have a non-destructive default in partitioning section and change it when no lvm vg is detected in pre-script. I expect volume group rootvg on disk /dev/sdb
I will take your approach and i will add a importvg (logic) to a post script in case a datavg (lvm) exist already on /dev/sdb Thx Hajo -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
Hi, Given : SLES 11 SP1 LDAP Server - auth via SSL is not working SSL & and start_TSL command is not working. The funny thing. If created via yast / network services / LDAP server - everything works fine. In case somebody could share a working XML file for a ldap server ..... Tia Hajo P.S My LDAP Server XML file looks like. ( Created via yast autoinstallation , schema entries have been changed ) $ cat ldap_server.xml <?xml version="1.0"?> <!DOCTYPE profile> <profile xmlns="http://www.suse.com/1.0/yast2ns" xmlns:config="http://www.suse.com/1.0/configns"> <deploy_image> <image_installation config:type="boolean">false</image_installation> </deploy_image> <ldap-server> <daemon> <listeners config:type="list"> <listentry>ldap</listentry> <listentry>ldapi</listentry> <listentry>ldaps</listentry> </listeners> <serviceEnabled config:type="boolean">true</serviceEnabled> <slp config:type="boolean">false</slp> </daemon> <databases config:type="list"> <listentry> <access config:type="list"> <listentry> <access config:type="list"> <listentry> <control></control> <level>write</level> <type>self</type> <value></value> </listentry> <listentry> <control></control> <level>auth</level> <type>*</type> <value></value> </listentry> </access> <target> <attrs>userPassword</attrs> </target> </listentry> <listentry> <access config:type="list"> <listentry> <control></control> <level>write</level> <type>self</type> <value></value> </listentry> <listentry> <control></control> <level>read</level> <type>*</type> <value></value> </listentry> </access> <target> <attrs>shadowLastChange</attrs> </target> </listentry> <listentry> <access config:type="list"> <listentry> <control></control> <level>read</level> <type>self</type> <value></value> </listentry> <listentry> <control></control> <level>none</level> <type>*</type> <value></value> </listentry> </access> <target> <attrs>userPKCS12</attrs> </target> </listentry> <listentry> <access config:type="list"> <listentry> <control></control> <level>read</level> <type>*</type> <value></value> </listentry> </access> <target/> </listentry> </access> <checkpoint config:type="list"> <listentry>1024</listentry> <listentry>5</listentry> </checkpoint> <directory>/var/lib/ldap</directory> <entrycache>10000</entrycache> <idlcache>30000</idlcache> <indexes> <cn> <eq>1</eq> <sub>1</sub> </cn> <displayName> <eq>1</eq> <sub>1</sub> </displayName> <gidNumber> <eq>1</eq> </gidNumber> <givenName> <eq>1</eq> <sub>1</sub> </givenName> <mail> <eq>1</eq> </mail> <member> <eq>1</eq> </member> <memberUid> <eq>1</eq> </memberUid> <objectclass> <eq>1</eq> </objectclass> <sn> <eq>1</eq> <sub>1</sub> </sn> <uid> <eq>1</eq> <sub>1</sub> </uid> <uidNumber> <eq>1</eq> </uidNumber> </indexes> <rootdn>cn=Administrator,dc=int</rootdn> <rootpw></rootpw> <suffix>dc=tce,dc=eumetsat,dc=int</suffix> <type>bdb</type> </listentry> </databases> <globals> <allow config:type="list"/> <disallow config:type="list"/> <loglevel config:type="list"> <listentry>none</listentry> </loglevel> <tlsconfig> <caCertFile>/etc/openldap/CAcert.pem</caCertFile> <certFile>/etc/openldap/ldap.cer</certFile> <certKeyFile>/etc/openldap/ldap.key</certKeyFile> <caCertDir></caCertDir> <certKeyFile></certKeyFile> <crlCheck>0</crlCheck> <verifyClient>0</verifyClient> </tlsconfig> </globals> <schema config:type="list"> <listentry> <includeldif>/etc/openldap/schema/core.ldif</includeldif> </listentry> <listentry> <includeldif>/etc/openldap/schema/cosine.ldif</includeldif> </listentry> <listentry> <includeldif>/etc/openldap/schema/inetorgperson.ldif</includeldif> </listentry> <listentry> <!-- <includeschema>/etc/openldap/schema/rfc2307bis.schema</includeschema> --> <includeschema>/etc/openldap/schema/nis.schema</includeschema> </listentry> <listentry> <!-- <includeschema>/etc/openldap/schema/yast.schema</includeschema> --> </listentry> </schema> </ldap-server> </profile> -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
Am 06.09.2012 11:02, schrieb Hans-Joachim Ehlers:
Hi,
Given : SLES 11 SP1
LDAP Server - auth via SSL is not working SSL & and start_TSL command is not working.
The funny thing. If created via yast / network services / LDAP server - everything works fine.
In case somebody could share a working XML file for a ldap server .....
Tia Hajo
P.S My LDAP Server XML file looks like. ( Created via yast autoinstallation , schema entries have been changed )
Hello Hajo, does your ssl-certificate contain the correct hostname? I experienced a lot of problems with ldap, when the hostname in the certificate and the hostname itself are not identical. Regards from Darmstadt :-) Ivan -- To unsubscribe, e-mail: opensuse-autoinstall+unsubscribe@opensuse.org To contact the owner, e-mail: opensuse-autoinstall+owner@opensuse.org
participants (5)
-
big beer
-
Hans-Joachim Ehlers
-
Ivan De Masi
-
Oliver Schweikert
-
Thomas Fehr