[suse-autoinstall] LVM with autoyast
Hi Manuel Create a pre-script the removes existing volume group before it trys to create a new one <![CDATA[ #!/bin/sh vgs=$(vgscan | grep found | awk '{print $7}' | sed -e s/\"//g) insmod lvm-mod for vg in $vgs do vgchange -a y $vg lvs=$(lvscan | grep $vg | grep /dev | awk '{print $4}' | sed -e s/\"//g) for lv in $lvs do lvchange -a n $lv lvremove -f $lv done vgchange -a n $vg vgremove $vg done exit 0 ]]> This has to reside between the <configure></configure> entry' s in your autoyast file Good luck -----Original Message----- From: Manuel.Laesser@telekurs.com [mailto:Manuel.Laesser@telekurs.com] Sent: Tuesday, March 16, 2004 9:12 AM To: suse-autoinstall@suse.com Subject: [suse-autoinstall] LVM with autoyast Hello, I would like to create the following partitions on a hp dl 380: - /boot (not part of LVM) - systemvg with - / - /var - /home - swap With the help from Damien I got the following xml file. The first time I used it on the Server it completed successfully but now, if I want to reinstall the server I always got the message: ---------------------------------------------------------------------------- -- vgcreate -A n -s 4096k systemvg /dev/cciss/c0d0p5 vgcreate - - volume group "systemvg" already exists ---------------------------------------------------------------------------- -- How can I get rid of this message so that autoyast will use the whole diskspace and recreate all partitions? I already tried with tag "<use>all</use>" but I'm not shure if I put it in the right place. Does anyone have some experiences with lvm? Thank you very much for your help. Manuel <partitioning config:type="list"> <drive> <device>/dev/cciss/c0d0</device> <partitions config:type="list"> <partition> <crypt_fs config:type="boolean">false</crypt_fs> <filesystem config:type="symbol">ext3</filesystem> <format config:type="boolean">true</format> <mount>/boot</mount> <partition_id config:type="integer">131</partition_id> <partition_nr config:type="integer">1</partition_nr> <region config:type="list"> <region_entry config:type="integer">0</region_entry> <region_entry config:type="integer">13</region_entry> </region> <size>98697217</size> </partition> <partition> <size>max</size> <lvm_group>systemvg</lvm_group> <partition_type>primary</partition_type> </partition> </partitions> <use>all</use> </drive> </partitioning> <lvm config:type="list"> <lvm_group> <lvm_name>systemvg</lvm_name> <pesize>4M</pesize> <logical_volumes config:type="list"> <lv> <lv_name>lvol1</lv_name> <lv_size>5G</lv_size> <lv_fs>ext3</lv_fs> <lv_mount>/</lv_mount> </lv> <lv> <lv_name>lvol2</lv_name> <lv_size>4G</lv_size> <lv_fs>ext3</lv_fs> <lv_mount>/var</lv_mount> </lv> <lv> <lv_name>lvol3</lv_name> <lv_size>1G</lv_size> <lv_fs>ext3</lv_fs> <lv_mount>/home</lv_mount> </lv> <lv> <lv_name>swap</lv_name> <lv_size>2G</lv_size> <lv_fs>swap</lv_fs> <lv_mount/> </lv> </logical_volumes> </lvm_group> </lvm> <!-- <use>all</use> --> Mit freundlichen Grüssen, Manuel Laesser ----------------------------------------------------------- Telekurs Services Hardturmstrasse 201, 8005 Zürich Phone : +41 1 279 44 24 Fax : +41 1 279 34 44 mailto : manuel.laesser@telekurs.com -----------------------------------------------------------
participants (1)
-
Heirman, Steven