Mailinglist Archive: opensuse-autoinstall (49 mails)
| < Previous | Next > |
Re: [opensuse-autoinstall] Configuring multiple volume groups
- From: Oliver Schweikert <osw@xxxxxxx>
- Date: Tue, 12 Jun 2007 18:53:22 +0200
- Message-id: <466ECF82.4010700@xxxxxxx>
Hi Uwe,
after spending the last 2 days on the problem, here is my conslusion:
the driverupdate file gets not integrated into the installation
system, when it is a cpio archive. After creating a cramfs with the
same contents, it works (updates are copied to /update/y2update).
Creating multiple VG did also not work. I patched the file
AutoinstLVM.ycp and now it seems to work.
The patch file is attached to this email and i have not testet other
partitioning profiles with it, yet, but maybe this patch will lead to a
tidy solution. I must confess, not to understand much of the yast2 code,
so i'm not sure, whether the changes are correct.
Here is the partitioning snippet of my autoyast profile:
<partitioning config:type="list">
<drive>
<device>/dev/sda</device>
<initialize config:type="boolean">true</initialize>
<partitions config:type="list">
<partition>
<filesystem config:type="symbol">ext2</filesystem>
<format config:type="boolean">true</format>
<mount>/boot</mount>
<partition_id config:type="integer">131</partition_id>
<partition_type>primary</partition_type>
<size>auto</size>
</partition>
<partition>
<filesystem config:type="symbol">swap</filesystem>
<format config:type="boolean">true</format>
<mount>swap</mount>
<partition_id config:type="integer">130</partition_id>
<partition_type>primary</partition_type>
<size>auto</size>
</partition>
<partition>
<filesystem config:type="symbol">ext3</filesystem>
<format config:type="boolean">true</format>
<mount>/</mount>
<partition_id config:type="integer">131</partition_id>
<partition_type>primary</partition_type>
<size>1GB</size>
</partition>
<partition>
<lvm_group>system</lvm_group>
<mount></mount>
<partition_id config:type="integer">142</partition_id>
<partition_type>primary</partition_type>
<size>max</size>
</partition>
</partitions>
<use>all</use>
</drive>
<drive>
<device>/dev/system</device>
<is_lvm_vg config:type="boolean">true</is_lvm_vg>
<partitions config:type="list">
<partition>
<filesystem config:type="symbol">ext3</filesystem>
<format config:type="boolean">true</format>
<lv_name>usr</lv_name>
<mount>/usr</mount>
<size>2GB</size>
</partition>
<partition>
<filesystem config:type="symbol">ext3</filesystem>
<format config:type="boolean">true</format>
<lv_name>var</lv_name>
<mount>/var</mount>
<size>2GB</size>
</partition>
<partition>
<filesystem config:type="symbol">ext3</filesystem>
<format config:type="boolean">true</format>
<lv_name>opt</lv_name>
<mount>/opt</mount>
<size>2GB</size>
</partition>
<partition>
<filesystem config:type="symbol">ext3</filesystem>
<format config:type="boolean">true</format>
<lv_name>home</lv_name>
<mount>/home</mount>
<size>1GB</size>
</partition>
<partition>
<filesystem config:type="symbol">ext2</filesystem>
<format config:type="boolean">true</format>
<lv_name>tmp</lv_name>
<mount>/tmp</mount>
<size>1GB</size>
</partition>
<partition>
<filesystem config:type="symbol">ext3</filesystem>
<format config:type="boolean">true</format>
<lv_name>srv</lv_name>
<mount>/srv</mount>
<size>1GB</size>
</partition>
</partitions>
<pesize>4M</pesize>
<use>all</use>
</drive>
<drive>
<device>/dev/sdb</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_type>primary</partition_type>
<size>9GB</size>
</partition>
</partitions>
<use>all</use>
</drive>
<drive>
<device>/dev/database</device>
<is_lvm_vg config:type="boolean">true</is_lvm_vg>
<partitions config:type="list">
<partition>
<filesystem config:type="symbol">ext3</filesystem>
<format config:type="boolean">true</format>
<lv_name>oracle</lv_name>
<mount>/var/opt/oracle</mount>
<size>8GB</size>
</partition>
</partitions>
<pesize>4M</pesize>
<use>all</use>
</drive>
</partitioning>
Regards
Oliver Schweikert
Software Development
Horiba Europe Automation Division GmbH
Zabergäustr. 3
73765 Neuhausen
Tel: +49 - (0)7158-933-413
Fax: +49 - (0)7158-933-613
Email: osw@xxxxxxx
--- linux/suse/i386-sled10/y2update/modules/AutoinstLVM.ycp 2007-06-05 13:48:42.000000000 +0200
+++ linux/suse/i386-sles10/y2update/modules/AutoinstLVM.ycp 2007-06-12 18:21:56.000000000 +0200
@@ -399,16 +399,15 @@
map atm = AutoinstStorage::AutoTargetMap;
foreach(map pv, new_pvs, ``{
if (pv["create"]:false) {
- boolean to_add = true;
+ boolean to_add = false;
if( vmType == `CT_LVM ) {
// exclude partitions that are NOT in the LVM
foreach( map atm_vol, atm[pv["maindev"]:"","partitions"]:[], ``{
- if( pv["nr"]:0 == atm_vol["partition_nr"]:-1 ) {
if( atm_vol["lvm_group"]:"" != current_vg ) {
y2milestone("do not add %1",atm_vol);
- to_add = false;
+ } else {
+ to_add = true;
}
- }
});
if( to_add ) {
y2milestone("addPhysicalVolume %1 , %2",pv["device"]:"", current_vg );
@@ -417,12 +416,11 @@
} else if( vmType == `CT_EVMS ) {
// exclude partitions that are NOT in the EVMS
foreach( map atm_vol, atm[pv["maindev"]:"","partitions"]:[], ``{
- if( pv["nr"]:0 == atm_vol["partition_nr"]:-1 ) {
if( atm_vol["evms_group"]:"" != current_vg ) {
y2milestone("do not add %1",atm_vol);
- to_add = false;
+ } else {
+ to_add = true;
}
- }
});
if( to_add ) {
y2milestone("Storage::ExtendEvmsCo %1/%2",lvm_string,pv["device"]:"");
after spending the last 2 days on the problem, here is my conslusion:
the driverupdate file gets not integrated into the installation
system, when it is a cpio archive. After creating a cramfs with the
same contents, it works (updates are copied to /update/y2update).
Creating multiple VG did also not work. I patched the file
AutoinstLVM.ycp and now it seems to work.
The patch file is attached to this email and i have not testet other
partitioning profiles with it, yet, but maybe this patch will lead to a
tidy solution. I must confess, not to understand much of the yast2 code,
so i'm not sure, whether the changes are correct.
Here is the partitioning snippet of my autoyast profile:
<partitioning config:type="list">
<drive>
<device>/dev/sda</device>
<initialize config:type="boolean">true</initialize>
<partitions config:type="list">
<partition>
<filesystem config:type="symbol">ext2</filesystem>
<format config:type="boolean">true</format>
<mount>/boot</mount>
<partition_id config:type="integer">131</partition_id>
<partition_type>primary</partition_type>
<size>auto</size>
</partition>
<partition>
<filesystem config:type="symbol">swap</filesystem>
<format config:type="boolean">true</format>
<mount>swap</mount>
<partition_id config:type="integer">130</partition_id>
<partition_type>primary</partition_type>
<size>auto</size>
</partition>
<partition>
<filesystem config:type="symbol">ext3</filesystem>
<format config:type="boolean">true</format>
<mount>/</mount>
<partition_id config:type="integer">131</partition_id>
<partition_type>primary</partition_type>
<size>1GB</size>
</partition>
<partition>
<lvm_group>system</lvm_group>
<mount></mount>
<partition_id config:type="integer">142</partition_id>
<partition_type>primary</partition_type>
<size>max</size>
</partition>
</partitions>
<use>all</use>
</drive>
<drive>
<device>/dev/system</device>
<is_lvm_vg config:type="boolean">true</is_lvm_vg>
<partitions config:type="list">
<partition>
<filesystem config:type="symbol">ext3</filesystem>
<format config:type="boolean">true</format>
<lv_name>usr</lv_name>
<mount>/usr</mount>
<size>2GB</size>
</partition>
<partition>
<filesystem config:type="symbol">ext3</filesystem>
<format config:type="boolean">true</format>
<lv_name>var</lv_name>
<mount>/var</mount>
<size>2GB</size>
</partition>
<partition>
<filesystem config:type="symbol">ext3</filesystem>
<format config:type="boolean">true</format>
<lv_name>opt</lv_name>
<mount>/opt</mount>
<size>2GB</size>
</partition>
<partition>
<filesystem config:type="symbol">ext3</filesystem>
<format config:type="boolean">true</format>
<lv_name>home</lv_name>
<mount>/home</mount>
<size>1GB</size>
</partition>
<partition>
<filesystem config:type="symbol">ext2</filesystem>
<format config:type="boolean">true</format>
<lv_name>tmp</lv_name>
<mount>/tmp</mount>
<size>1GB</size>
</partition>
<partition>
<filesystem config:type="symbol">ext3</filesystem>
<format config:type="boolean">true</format>
<lv_name>srv</lv_name>
<mount>/srv</mount>
<size>1GB</size>
</partition>
</partitions>
<pesize>4M</pesize>
<use>all</use>
</drive>
<drive>
<device>/dev/sdb</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_type>primary</partition_type>
<size>9GB</size>
</partition>
</partitions>
<use>all</use>
</drive>
<drive>
<device>/dev/database</device>
<is_lvm_vg config:type="boolean">true</is_lvm_vg>
<partitions config:type="list">
<partition>
<filesystem config:type="symbol">ext3</filesystem>
<format config:type="boolean">true</format>
<lv_name>oracle</lv_name>
<mount>/var/opt/oracle</mount>
<size>8GB</size>
</partition>
</partitions>
<pesize>4M</pesize>
<use>all</use>
</drive>
</partitioning>
Regards
Oliver Schweikert
Software Development
Horiba Europe Automation Division GmbH
Zabergäustr. 3
73765 Neuhausen
Tel: +49 - (0)7158-933-413
Fax: +49 - (0)7158-933-613
Email: osw@xxxxxxx
--- linux/suse/i386-sled10/y2update/modules/AutoinstLVM.ycp 2007-06-05 13:48:42.000000000 +0200
+++ linux/suse/i386-sles10/y2update/modules/AutoinstLVM.ycp 2007-06-12 18:21:56.000000000 +0200
@@ -399,16 +399,15 @@
map atm = AutoinstStorage::AutoTargetMap;
foreach(map pv, new_pvs, ``{
if (pv["create"]:false) {
- boolean to_add = true;
+ boolean to_add = false;
if( vmType == `CT_LVM ) {
// exclude partitions that are NOT in the LVM
foreach( map atm_vol, atm[pv["maindev"]:"","partitions"]:[], ``{
- if( pv["nr"]:0 == atm_vol["partition_nr"]:-1 ) {
if( atm_vol["lvm_group"]:"" != current_vg ) {
y2milestone("do not add %1",atm_vol);
- to_add = false;
+ } else {
+ to_add = true;
}
- }
});
if( to_add ) {
y2milestone("addPhysicalVolume %1 , %2",pv["device"]:"", current_vg );
@@ -417,12 +416,11 @@
} else if( vmType == `CT_EVMS ) {
// exclude partitions that are NOT in the EVMS
foreach( map atm_vol, atm[pv["maindev"]:"","partitions"]:[], ``{
- if( pv["nr"]:0 == atm_vol["partition_nr"]:-1 ) {
if( atm_vol["evms_group"]:"" != current_vg ) {
y2milestone("do not add %1",atm_vol);
- to_add = false;
+ } else {
+ to_add = true;
}
- }
});
if( to_add ) {
y2milestone("Storage::ExtendEvmsCo %1/%2",lvm_string,pv["device"]:"");
| < Previous | Next > |