[Fai-commit] r4973 - trunk/lib/setup-storage
lange at alioth.debian.org
lange at alioth.debian.org
Fri Jun 13 08:54:21 UTC 2008
Author: lange
Date: 2008-06-13 08:54:21 +0000 (Fri, 13 Jun 2008)
New Revision: 4973
Modified:
trunk/lib/setup-storage/Commands.pm
Log:
add missing udevsettle calls
Modified: trunk/lib/setup-storage/Commands.pm
===================================================================
--- trunk/lib/setup-storage/Commands.pm 2008-06-13 08:53:30 UTC (rev 4972)
+++ trunk/lib/setup-storage/Commands.pm 2008-06-13 08:54:21 UTC (rev 4973)
@@ -214,8 +214,11 @@
"yes | mdadm --create /dev/md$id --level=$level --force --run --raid-devices="
. scalar(@eff_devs) . " --spare-devices=" . scalar(@spares) . " "
. join(" ", @eff_devs) . " " . join(" ", @spares),
- "$pre_req", "exist_/dev/md$id" );
+ "$pre_req", "run_udev_/dev/md$id" );
+ &FAI::push_command( "udevsettle --timeout=10", "run_udev_/dev/md$id",
+ "exist_/dev/md$id" );
+
# create the filesystem on the volume
&FAI::build_mkfs_commands("/dev/md$id",
\%{ $FAI::configs{$config}{volumes}{$id} });
@@ -382,7 +385,9 @@
# create a new volume
&FAI::push_command( "lvcreate -n $lv -L " . $lv_size->{eff_size} . " $vg",
- "vg_enabled_$vg,$lv_rm_pre", "exist_/dev/$vg/$lv" );
+ "vg_enabled_$vg,$lv_rm_pre", "run_udev_/dev/$vg/$lv" );
+ &FAI::push_command( "udevsettle --timeout=10", "run_udev_/dev/$vg/$lv",
+ "exist_/dev/$vg/$lv" );
# create the filesystem on the volume
&FAI::build_mkfs_commands("/dev/$vg/$lv",
@@ -596,19 +601,22 @@
$part_nr++;
$FAI::current_config{$disk}{partitions}{$mapped_id}{new_id} = $part_nr;
- my $post = "exist_" . &FAI::make_device_name($disk, $part_nr);
+ my $post = "run_udev_" . &FAI::make_device_name($disk, $part_nr);
$post = "rebuilt_" . &FAI::make_device_name($disk, $part_nr) if
$FAI::configs{$config}{partitions}{$part_id}{size}{resize};
# build a parted command to create the partition
&FAI::push_command( "parted -s $disk mkpart $part_type $fs ${start}B ${end}B",
"cleared1_$disk", $post );
+ &FAI::push_command( "udevsettle --timeout=10", "run_udev_" .
+ &FAI::make_device_name($disk, $part_nr), "exist_" .
+ &FAI::make_device_name($disk, $part_nr) ) if
+ $FAI::configs{$config}{partitions}{$part_id}{size}{resize};
}
}
################################################################################
#
-# @brief Create the volume group $config, unless it exists already; if the
-# latter is the case, only add/remove the physical devices
+# @brief Set up physical partitions
#
# @param $config Config entry
#
@@ -774,7 +782,10 @@
$pre = ",exist_" . &FAI::make_device_name($disk, $prev_id) if ($prev_id > -1);
# build a parted command to create the partition
&FAI::push_command( "parted -s $disk mkpart $part_type $fs ${start}B ${end}B",
- "cleared2_$disk$pre", "exist_" . &FAI::make_device_name($disk, $part_id) );
+ "cleared2_$disk$pre", "run_udev_" . &FAI::make_device_name($disk, $part_id) );
+ &FAI::push_command( "udevsettle --timeout=10", "run_udev_" .
+ &FAI::make_device_name($disk, $part_id), "exist_" .
+ &FAI::make_device_name($disk, $part_id) );
$prev_id = $part_id;
}
More information about the Fai-commit
mailing list