[Fai-commit] r5264 - people/michael/experimental/patches
mt at alioth.debian.org
mt at alioth.debian.org
Mon Feb 16 13:03:28 UTC 2009
Author: mt
Date: 2009-02-16 13:03:27 +0000 (Mon, 16 Feb 2009)
New Revision: 5264
Removed:
people/michael/experimental/patches/aoe-support
people/michael/experimental/patches/setup-storage_bugfix-virtual
people/michael/experimental/patches/setup-storage_command-dep-debugging
people/michael/experimental/patches/setup-storage_crypto-for-all-mountspecs
people/michael/experimental/patches/setup-storage_crypto-with-random-init-configurable
people/michael/experimental/patches/setup-storage_force-disklabel
people/michael/experimental/patches/setup-storage_non-existing-device-fail-early
people/michael/experimental/patches/setup-storage_partition-too-large-for-disk-error
people/michael/experimental/patches/setup-storage_proper-partition-index
people/michael/experimental/patches/setup-storage_proper-vg-existance-handling
people/michael/experimental/patches/setup-storage_raid0-has-no-spares
Modified:
people/michael/experimental/patches/series
Log:
all setup-storage related patches merged into trunk
Deleted: people/michael/experimental/patches/aoe-support
===================================================================
--- people/michael/experimental/patches/aoe-support 2009-02-16 13:01:27 UTC (rev 5263)
+++ people/michael/experimental/patches/aoe-support 2009-02-16 13:03:27 UTC (rev 5264)
@@ -1,39 +0,0 @@
-2009-02-06 Michael Tautschnig <mt at debian.org>
-
- * lib/setup-storage/Init.pm, lib/disk-info: Added AOE etherd/ device names to
- regular expressions (thanks Jean Spirat)
-Index: trunk/lib/disk-info
-===================================================================
---- trunk.orig/lib/disk-info
-+++ trunk/lib/disk-info
-@@ -21,6 +21,6 @@
- }
- # - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - -
- # echo a space separated list of devices and their block size
--egrep ' i2o/hd.\b| cciss/c.d.\b| ida/c.d.\b| rd/c.d.\b| hd.\b| sd[a-z]{1,2}\b|/disc\b| vd.\b' /proc/partitions | diskandsize
-+egrep ' etherd/e[[:digit:]]+\.[[:digit:]]+\b| i2o/hd.\b| cciss/c.d.\b| ida/c.d.\b| rd/c.d.\b| hd.\b| sd[a-z]{1,2}\b|/disc\b| vd.\b' /proc/partitions | diskandsize
-
-
-Index: trunk/lib/setup-storage/Init.pm
-===================================================================
---- trunk.orig/lib/setup-storage/Init.pm
-+++ trunk/lib/setup-storage/Init.pm
-@@ -168,7 +168,8 @@
- defined($2) or return (1, "/dev/$1", -1);
- return (1, "/dev/$1", $2);
- }
-- elsif ($dev =~ m{^/dev/(cciss/c\dd\d|ida/c\dd\d|rd/c\dd\d|ataraid/d\d)p(\d+)?$})
-+ elsif ($dev =~
-+ m{^/dev/(cciss/c\dd\d|ida/c\dd\d|rd/c\dd\d|ataraid/d\d|etherd/e\d+\.\d+)p(\d+)?$})
- {
- defined($2) or return (1, "/dev/$1", -1);
- return (1, "/dev/$1", $2);
-@@ -190,7 +191,7 @@
- sub make_device_name {
- my ($dev, $p) = @_;
- $dev .= "p" if ($dev =~
-- m{^/dev/(cciss/c\dd\d|ida/c\dd\d|rd/c\dd\d|ataraid/d\d)$});
-+ m{^/dev/(cciss/c\dd\d|ida/c\dd\d|rd/c\dd\d|ataraid/d\d|etherd/e\d+\.\d+)$});
- $dev .= $p;
- internal_error("Invalid device $dev") unless (&FAI::phys_dev($dev))[0];
- return $dev;
Modified: people/michael/experimental/patches/series
===================================================================
--- people/michael/experimental/patches/series 2009-02-16 13:01:27 UTC (rev 5263)
+++ people/michael/experimental/patches/series 2009-02-16 13:03:27 UTC (rev 5264)
@@ -1,16 +1,6 @@
logtail
bugfix-464541
grub-pc
-setup-storage_non-existing-device-fail-early
-setup-storage_proper-vg-existance-handling
-setup-storage_force-disklabel
-setup-storage_raid0-has-no-spares
-setup-storage_proper-partition-index
-aoe-support
-setup-storage_bugfix-virtual
-setup-storage_crypto-for-all-mountspecs
-setup-storage_partition-too-large-for-disk-error
-setup-storage_command-dep-debugging
bugfix-439250
bugfix-504801
bugfix-441436
@@ -24,4 +14,3 @@
bugfix-313397
bugfix-481871
bugfix-495535
-setup-storage_crypto-with-random-init-configurable
Deleted: people/michael/experimental/patches/setup-storage_bugfix-virtual
===================================================================
--- people/michael/experimental/patches/setup-storage_bugfix-virtual 2009-02-16 13:01:27 UTC (rev 5263)
+++ people/michael/experimental/patches/setup-storage_bugfix-virtual 2009-02-16 13:03:27 UTC (rev 5264)
@@ -1,29 +0,0 @@
-2009-02-06 Michael Tautschnig <mt at debian.org>
-
- * lib/setup-storage/Commands.pm: If the disk config is marked virtual, create
- dummy commands to tell later commands that the devices exist (closes: #508247)
-Index: trunk/lib/setup-storage/Commands.pm
-===================================================================
---- trunk.orig/lib/setup-storage/Commands.pm
-+++ trunk/lib/setup-storage/Commands.pm
-@@ -843,8 +843,18 @@
- ($config =~ /^PHY_(.+)$/) or &FAI::internal_error("Invalid config $config");
- my $disk = $1; # the device to be configured
-
-- # create partitions on non-virtual configs
-- &FAI::setup_partitions($config) unless ($FAI::configs{$config}{virtual});
-+ if ($FAI::configs{$config}{virtual}) {
-+ foreach my $part_id (&numsort(keys %{ $FAI::configs{$config}{partitions} })) {
-+ # reference to the current partition
-+ my $part = (\%FAI::configs)->{$config}->{partitions}->{$part_id};
-+ # virtual disks always exist
-+ &FAI::push_command( "true", "",
-+ "exist_" . &FAI::make_device_name($disk, $part_id) );
-+ }
-+ } else {
-+ # create partitions on non-virtual configs
-+ &FAI::setup_partitions($config);
-+ }
-
- # generate the commands for creating all filesystems
- foreach my $part_id (&numsort(keys %{ $FAI::configs{$config}{partitions} })) {
Deleted: people/michael/experimental/patches/setup-storage_command-dep-debugging
===================================================================
--- people/michael/experimental/patches/setup-storage_command-dep-debugging 2009-02-16 13:01:27 UTC (rev 5263)
+++ people/michael/experimental/patches/setup-storage_command-dep-debugging 2009-02-16 13:03:27 UTC (rev 5264)
@@ -1,20 +0,0 @@
-2009-02-09 Michael Tautschnig <mt at debian.org>
-
- * lib/setup-storage/Commands.pm: Added debug output in command dependency
- sorter
-Index: trunk/lib/setup-storage/Commands.pm
-===================================================================
---- trunk.orig/lib/setup-storage/Commands.pm
-+++ trunk/lib/setup-storage/Commands.pm
-@@ -929,6 +929,11 @@
- my $pushed = -1;
-
- while ($i < $FAI::n_c_i) {
-+ if ($FAI::debug) {
-+ print "Trying to add CMD: " . $FAI::commands{$i}{cmd} . "\n";
-+ defined($FAI::commands{$i}{pre}) and print "PRE: " . $FAI::commands{$i}{pre} . "\n";
-+ defined($FAI::commands{$i}{post}) and print "POST: " . $FAI::commands{$i}{post} . "\n";
-+ }
- my $all_matched = 1;
- if (defined($FAI::commands{$i}{pre})) {
- foreach (split(/,/, $FAI::commands{$i}{pre})) {
Deleted: people/michael/experimental/patches/setup-storage_crypto-for-all-mountspecs
===================================================================
--- people/michael/experimental/patches/setup-storage_crypto-for-all-mountspecs 2009-02-16 13:01:27 UTC (rev 5263)
+++ people/michael/experimental/patches/setup-storage_crypto-for-all-mountspecs 2009-02-16 13:03:27 UTC (rev 5264)
@@ -1,40 +0,0 @@
-2009-02-08 Michael Tautschnig <mt at debian.org>
-
- * lib/setup-storage/Parser.pm: Support :encrypt with all mountpoint
- specifications
-Index: trunk/lib/setup-storage/Parser.pm
-===================================================================
---- trunk.orig/lib/setup-storage/Parser.pm
-+++ trunk/lib/setup-storage/Parser.pm
-@@ -510,27 +510,15 @@
- $FAI::partition_pointer = (\%FAI::configs)->{$FAI::device}->{volumes}->{$2};
- }
-
-- mountpoint: '-'
-- {
-- # this partition should not be mounted
-- $FAI::partition_pointer->{mountpoint} = "-";
-- $FAI::partition_pointer->{encrypt} = 0;
-- }
-- | 'swap'
-- {
-- # this partition is swap space, not mounted
-- $FAI::partition_pointer->{mountpoint} = "none";
-- $FAI::partition_pointer->{encrypt} = 0;
-- }
-- | m{^/\S*}
-+ mountpoint: m{^(-|swap|/[^\s\:]*)(:encrypt)?}
- {
- # set the mount point, may include encryption-request
-- if ($item[ 1 ] =~ m{^(/[^:]*):encrypt$}) {
-+ $FAI::partition_pointer->{mountpoint} = $1;
-+ $FAI::partition_pointer->{mountpoint} = "none" if ($1 eq "swap");
-+ if (defined($2)) {
- &FAI::in_path("cryptsetup") or die "cryptsetup not found in PATH\n";
-- $FAI::partition_pointer->{mountpoint} = $1;
- $FAI::partition_pointer->{encrypt} = 1;
- } else {
-- $FAI::partition_pointer->{mountpoint} = $item[ 1 ];
- $FAI::partition_pointer->{encrypt} = 0;
- }
- }
Deleted: people/michael/experimental/patches/setup-storage_crypto-with-random-init-configurable
===================================================================
--- people/michael/experimental/patches/setup-storage_crypto-with-random-init-configurable 2009-02-16 13:01:27 UTC (rev 5263)
+++ people/michael/experimental/patches/setup-storage_crypto-with-random-init-configurable 2009-02-16 13:03:27 UTC (rev 5264)
@@ -1,80 +0,0 @@
-2009-02-13 Michael Tautschnig <mt at debian.org>
-
- * lib/setup-storage/Parser.pm, lib/setup-storage/Commands.pm: Make random
- initialization of encrypted partitions configurable
- * man/setup-storage.8: Document new encryption possibilities
-Index: trunk/lib/setup-storage/Commands.pm
-===================================================================
---- trunk.orig/lib/setup-storage/Commands.pm
-+++ trunk/lib/setup-storage/Commands.pm
-@@ -125,12 +125,16 @@
- "head -c 2048 /dev/urandom | head -n 47 | tail -n 46 | od | tee $keyfile",
- "", "keyfile_$device" );
- # prepare encryption
-- &FAI::push_command(
-- "dd if=/dev/urandom of=$device",
-- "exist_$device", "random_init_$device" );
-+ my $prepare_deps = "keyfile_$device";
-+ if ($partition->{encrypt} > 1) {
-+ &FAI::push_command(
-+ "dd if=/dev/urandom of=$device",
-+ "exist_$device", "random_init_$device" );
-+ $prepare_deps = "random_init_$device,$prepare_deps";
-+ }
- &FAI::push_command(
- "yes YES | cryptsetup luksFormat $device $keyfile -c aes-cbc-essiv:sha256 -s 256",
-- "random_init_$device,keyfile_$device", "crypt_format_$device" );
-+ $prepare_deps, "crypt_format_$device" );
- &FAI::push_command(
- "cryptsetup luksOpen $device $enc_dev_short_name --key-file $keyfile",
- "crypt_format_$device", "encrypted_$enc_dev_name" );
-Index: trunk/lib/setup-storage/Parser.pm
-===================================================================
---- trunk.orig/lib/setup-storage/Parser.pm
-+++ trunk/lib/setup-storage/Parser.pm
-@@ -510,7 +510,7 @@
- $FAI::partition_pointer = (\%FAI::configs)->{$FAI::device}->{volumes}->{$2};
- }
-
-- mountpoint: m{^(-|swap|/[^\s\:]*)(:encrypt)?}
-+ mountpoint: m{^(-|swap|/[^\s\:]*)(:encrypt(:randinit)?)?}
- {
- # set the mount point, may include encryption-request
- $FAI::partition_pointer->{mountpoint} = $1;
-@@ -518,6 +518,7 @@
- if (defined($2)) {
- &FAI::in_path("cryptsetup") or die "cryptsetup not found in PATH\n";
- $FAI::partition_pointer->{encrypt} = 1;
-+ ++$FAI::partition_pointer->{encrypt} if (defined($3));
- } else {
- $FAI::partition_pointer->{encrypt} = 0;
- }
-Index: trunk/man/setup-storage.8
-===================================================================
---- trunk.orig/man/setup-storage.8
-+++ trunk/man/setup-storage.8
-@@ -264,19 +264,15 @@
- .br
-
-
--mountpoint ::= -
-+mountpoint ::= (-|swap|/[^\:[:space:]]*)(:encrypt(:randinit)?)?
- .br
-- /* do not mount */
-+ /* do not mount, mount as swap, or mount at fully qualified path;
- .br
-- | swap
--.br
-- /* swap space */
--.br
-- | /[^[:space:]]*(:encrypt)?
-+ * if :encrypt is given the partition will be encrypted, the key
- .br
-- /* fully qualified path; if :encrypt is given the partition
-+ * is generated automatically; :randinit adds random
- .br
-- * will be encrypted, the key is generated automatically */
-+ * initialization of the partition */
- .br
-
-
Deleted: people/michael/experimental/patches/setup-storage_force-disklabel
===================================================================
--- people/michael/experimental/patches/setup-storage_force-disklabel 2009-02-16 13:01:27 UTC (rev 5263)
+++ people/michael/experimental/patches/setup-storage_force-disklabel 2009-02-16 13:03:27 UTC (rev 5264)
@@ -1,154 +0,0 @@
-2009-02-06 Michael Tautschnig <mt at debian.org>
-
- * lib/setup-storage/Volumes.pm, lib/setup-storage/Parser.pm: Always write a
- new disklabel, if no partition on the disk must be preserved
-Index: trunk/lib/setup-storage/Parser.pm
-===================================================================
---- trunk.orig/lib/setup-storage/Parser.pm
-+++ trunk/lib/setup-storage/Parser.pm
-@@ -117,6 +117,7 @@
- disklabel => "msdos",
- bootable => -1,
- fstabkey => "device",
-+ preserveparts => 0,
- partitions => {}
- };
- }
-@@ -414,18 +415,21 @@
- {
- # set the preserve flag for all ids in all cases
- $FAI::configs{$FAI::device}{partitions}{$_}{size}{preserve} = 1 foreach (split (",", $1));
-+ $FAI::configs{$FAI::device}{preserveparts} = 1;
- }
- | /^preserve_reinstall:(\d+(,\d+)*)/
- {
- # set the preserve flag for all ids if $FAI::reinstall is set
- if ($FAI::reinstall) {
- $FAI::configs{$FAI::device}{partitions}{$_}{size}{preserve} = 1 foreach (split(",", $1));
-+ $FAI::configs{$FAI::device}{preserveparts} = 1;
- }
- }
- | /^resize:(\d+(,\d+)*)/
- {
- # set the resize flag for all ids
- $FAI::configs{$FAI::device}{partitions}{$_}{size}{resize} = 1 foreach (split(",", $1));
-+ $FAI::configs{$FAI::device}{preserveparts} = 1;
- }
- | /^disklabel:(msdos|gpt)/
- {
-@@ -573,7 +577,10 @@
- # enter the range into the hash
- $FAI::partition_pointer->{size}->{range} = $range;
- # set the resize flag, if required
-- defined ($4) and $FAI::partition_pointer->{size}->{resize} = 1;
-+ if (defined ($4)) {
-+ $FAI::partition_pointer->{size}->{resize} = 1;
-+ $FAI::configs{$FAI::device}{preserveparts} = 1;
-+ }
- }
- | /^(-\d+[kMGTP%]?)(:resize)?\s+/
- {
-@@ -587,7 +594,10 @@
- # enter the range into the hash
- $FAI::partition_pointer->{size}->{range} = $range;
- # set the resize flag, if required
-- defined( $2 ) and $FAI::partition_pointer->{size}->{resize} = 1;
-+ if (defined ($2)) {
-+ $FAI::partition_pointer->{size}->{resize} = 1;
-+ $FAI::configs{$FAI::device}{preserveparts} = 1;
-+ }
- }
- | <error: invalid partition size near "$text">
-
-Index: trunk/lib/setup-storage/Volumes.pm
-===================================================================
---- trunk.orig/lib/setup-storage/Volumes.pm
-+++ trunk/lib/setup-storage/Volumes.pm
-@@ -51,10 +51,6 @@
-
- # make sure, $disk is a proper block device
- (-b $disk) or die "$disk is not a block special device!\n";
-- &FAI::push_command( "true", "", "exist_$disk" );
--
-- # initialise the hash
-- $FAI::current_config{$disk}{partitions} = {};
-
- # the list to hold the output of parted commands as parsed below
- my @parted_print = ();
-@@ -62,25 +58,29 @@
- # try to obtain the partition table for $disk
- # it might fail with parted_2 in case the disk has no partition table
- my $error =
-- &FAI::execute_ro_command("parted -s $disk unit TiB print", \@parted_print, 0);
-+ &FAI::execute_ro_command("parted -s $disk unit TiB print", \@parted_print, 0);
-+
-+ # possible problems
-+ if (!defined($FAI::configs{"PHY_$disk"}) && $error ne "") {
-+ warn "Could not determine size and contents of $disk, skipping\n";
-+ next;
-+ } elsif (defined($FAI::configs{"PHY_$disk"}) &&
-+ $FAI::configs{"PHY_$disk"}{preserveparts} == 1 && $error ne "") {
-+ die "Failed to determine size and contents of $disk, but partitions should have been preserved\n";
-+ }
-+
-+ # parted_2 happens when the disk has no disk label, parted_4 means unaligned
-+ # partitions
-+ if ($error eq "parted_2" || $error eq "parted_2_new" ||
-+ $error eq "parted_4" || $error eq "parted_4_new") {
-
-- # parted_2 happens when the disk has no disk label, because parted then
-- # provides no information about the disk
-- if ($error eq "parted_2" || $error eq "parted_2_new") {
- $FAI::no_dry_run or die
- "Can't run on test-only mode on this system because there is no disklabel on $disk\n";
-
-- # if there is no disk configuration, write an msdos disklabel
-- if (!defined ($FAI::configs{"PHY_$disk"}{disklabel})) {
--
-- # write the disk label as configured
-- $error = &FAI::execute_command("parted -s $disk mklabel msdos");
-- } else {
--
-- # write the disk label as configured
-- $error = &FAI::execute_command("parted -s $disk mklabel "
-- . $FAI::configs{"PHY_$disk"}{disklabel});
-- }
-+ # write the disk label as configured
-+ $error = &FAI::execute_command("parted -s $disk mklabel "
-+ . $FAI::configs{"PHY_$disk"}{disklabel});
-+ ($error eq "") or die "Failed to write disk label\n";
- # retry partition-table print
- $error =
- &FAI::execute_ro_command("parted -s $disk unit TiB print", \@parted_print, 0);
-@@ -88,6 +88,13 @@
-
- ($error eq "") or die "Failed to read the partition table from $disk\n";
-
-+ # disk is usable
-+ &FAI::push_command( "true", "", "exist_$disk" );
-+
-+ # initialise the hash
-+ $FAI::current_config{$disk}{partitions} = {};
-+
-+
- # the following code parses the output of parted print, using various units
- # (TiB, B, chs)
- # the parser is capable of reading the output of parted version 1.7.1, which
-@@ -375,6 +382,7 @@
-
- if (1 == $i_p_d && defined($FAI::configs{"PHY_$disk"}{partitions}{$part_no})) {
- $FAI::configs{"PHY_$disk"}{partitions}{$part_no}{size}{preserve} = 1;
-+ $FAI::configs{"PHY_$disk"}{preserveparts} = 1;
- } elsif ($device_name =~ m{^/dev/md(\d+)$}) {
- my $vol = $1;
- if (defined($FAI::configs{RAID}{volumes}{$vol}) &&
-@@ -415,7 +423,8 @@
- # check for logical volumes that need to be preserved and preserve the
- # underlying devices recursively
- foreach my $l (keys %{ $FAI::configs{$config}{volumes} }) {
-- next unless ($FAI::configs{$config}{volumes}{$l}{size}{preserve} == 1);
-+ next unless ($FAI::configs{$config}{volumes}{$l}{size}{preserve} == 1 ||
-+ $FAI::configs{$config}{volumes}{$l}{size}{resize} == 1);
- &FAI::mark_preserve($_) foreach (keys %{ $FAI::configs{$config}{devices} });
- last;
- }
Deleted: people/michael/experimental/patches/setup-storage_non-existing-device-fail-early
===================================================================
--- people/michael/experimental/patches/setup-storage_non-existing-device-fail-early 2009-02-16 13:01:27 UTC (rev 5263)
+++ people/michael/experimental/patches/setup-storage_non-existing-device-fail-early 2009-02-16 13:03:27 UTC (rev 5264)
@@ -1,29 +0,0 @@
-2008-10-17 Michael Tautschnig <mt at debian.org>
-
- * lib/setup-storage/Sizes.pm: Fail early, if a non-existing device is used in
- a volume group.
-Index: trunk/lib/setup-storage/Sizes.pm
-===================================================================
---- trunk.orig/lib/setup-storage/Sizes.pm
-+++ trunk/lib/setup-storage/Sizes.pm
-@@ -115,7 +115,7 @@
- # the size is known from the current configuration on disk, return it
- defined ($FAI::current_config{$disk}{partitions}{$part_no}{count_byte})
- and return $FAI::current_config{$disk}{partitions}{$part_no}{count_byte} /
-- (1024 * 1024);
-+ (1024 * 1024) unless defined ($FAI::configs{"PHY_$disk"}{partitions});
-
- # the size is not known (yet?)
- warn "Cannot determine size of $dev\n";
-@@ -197,7 +197,10 @@
-
- # $dev may be a partition, an entire disk or a RAID device; otherwise we
- # cannot deal with it
-- $vg_size += &FAI::estimate_size($dev);
-+ my $cur_size = &FAI::estimate_size($dev);
-+ ($cur_size > 0)
-+ or die "Size of device $dev in volume group $vg cannot be determined\n";
-+ $vg_size += $cur_size;
- }
-
- # now subtract 1% of overhead
Deleted: people/michael/experimental/patches/setup-storage_partition-too-large-for-disk-error
===================================================================
--- people/michael/experimental/patches/setup-storage_partition-too-large-for-disk-error 2009-02-16 13:01:27 UTC (rev 5263)
+++ people/michael/experimental/patches/setup-storage_partition-too-large-for-disk-error 2009-02-16 13:03:27 UTC (rev 5264)
@@ -1,17 +0,0 @@
-2009-02-08 Michael Tautschnig <mt at debian.org>
-
- * lib/setup-storage/Sizes.pm: Properly tell the user that the lower bound of a
- parition size is already too high
-Index: trunk/lib/setup-storage/Sizes.pm
-===================================================================
---- trunk.orig/lib/setup-storage/Sizes.pm
-+++ trunk/lib/setup-storage/Sizes.pm
-@@ -73,6 +73,8 @@
- $end = $end * 1024.0 * 1024.0;
- }
-
-+ # the user may have specified a partition that is larger than the entire disk
-+ ($start <= $size_b) or die "Lower bound of partition size is greater than disk size\n";
- # make sure that $end >= $start
- ($end >= $start) or &FAI::internal_error("end < start");
-
Deleted: people/michael/experimental/patches/setup-storage_proper-partition-index
===================================================================
--- people/michael/experimental/patches/setup-storage_proper-partition-index 2009-02-16 13:01:27 UTC (rev 5263)
+++ people/michael/experimental/patches/setup-storage_proper-partition-index 2009-02-16 13:03:27 UTC (rev 5264)
@@ -1,20 +0,0 @@
-2009-02-06 Michael Tautschnig <mt at debian.org>
-
- * lib/setup-storage/Commands.pm: Use the proper id for telling the user about
- preserved/resized partitions.
-Index: trunk/lib/setup-storage/Commands.pm
-===================================================================
---- trunk.orig/lib/setup-storage/Commands.pm
-+++ trunk/lib/setup-storage/Commands.pm
-@@ -688,9 +688,9 @@
- $pre_all_resize .= ",exist_" . &FAI::make_device_name($disk, $p) unless
- $part->{size}->{resize};
- if ($part->{size}->{resize}) {
-- warn &FAI::make_device_name($disk, $p) . " will be resized\n";
-+ warn &FAI::make_device_name($disk, $mapped_id) . " will be resized\n";
- } else {
-- warn &FAI::make_device_name($disk, $p) . " will be preserved\n";
-+ warn &FAI::make_device_name($disk, $mapped_id) . " will be preserved\n";
- next;
- }
-
Deleted: people/michael/experimental/patches/setup-storage_proper-vg-existance-handling
===================================================================
--- people/michael/experimental/patches/setup-storage_proper-vg-existance-handling 2009-02-16 13:01:27 UTC (rev 5263)
+++ people/michael/experimental/patches/setup-storage_proper-vg-existance-handling 2009-02-16 13:03:27 UTC (rev 5264)
@@ -1,37 +0,0 @@
-2008-10-26 Michael Tautschnig <mt at debian.org>
-
- * lib/setup-storage/Commands.pm: Properly handle existing volume groups and
- only extend them if the underlying devices are preserved, otherwise create
- them anew.
-Index: trunk/lib/setup-storage/Commands.pm
-===================================================================
---- trunk.orig/lib/setup-storage/Commands.pm
-+++ trunk/lib/setup-storage/Commands.pm
-@@ -274,8 +274,26 @@
- ($config =~ /^VG_(.+)$/) and ($1 ne "--ANY--") or &FAI::internal_error("Invalid config $config");
- my $vg = $1; # the actual volume group
-
-+ my $vg_exists = 0;
-+ if (defined ($FAI::current_lvm_config{$vg})) {
-+ $vg_exists = 1;
-+ foreach my $dev (@{ $FAI::current_lvm_config{$vg}{"physical_volumes"} }) {
-+ my ($i_p_d, $disk, $part_no) = &FAI::phys_dev($dev);
-+ # if this is not a physical disk, just assume that the volume group will
-+ # not exist anymore
-+ if ($i_p_d) {
-+ defined ($FAI::configs{"PHY_$disk"}) or next;
-+ defined ($FAI::configs{"PHY_$disk"}{partitions}{$part_no}) and
-+ ($FAI::configs{"PHY_$disk"}{partitions}{$part_no}{size}{preserve}) and
-+ next;
-+ }
-+ $vg_exists = 0;
-+ last;
-+ }
-+ }
-+
- # create the volume group, if it doesn't exist already
-- if (!defined ($FAI::current_lvm_config{$vg})) {
-+ if (!$vg_exists) {
- # create all the devices
- my @devices = keys %{ $FAI::configs{$config}{devices} };
- &FAI::erase_lvm_signature(\@devices);
Deleted: people/michael/experimental/patches/setup-storage_raid0-has-no-spares
===================================================================
--- people/michael/experimental/patches/setup-storage_raid0-has-no-spares 2009-02-16 13:01:27 UTC (rev 5263)
+++ people/michael/experimental/patches/setup-storage_raid0-has-no-spares 2009-02-16 13:03:27 UTC (rev 5264)
@@ -1,32 +0,0 @@
-2009-02-06 Michael Tautschnig <mt at debian.org>
-
- * lib/setup-storage/Parser.pm, lib/setup-storage/Commands.pm: Make sure that
- the user hasn't configured spares/missing devices with RAID-0 and only add
- --spare-devices if at least 1 is configured. Thanks Camille Barette.
- (closes: #508192)
-Index: trunk/lib/setup-storage/Commands.pm
-===================================================================
---- trunk.orig/lib/setup-storage/Commands.pm
-+++ trunk/lib/setup-storage/Commands.pm
-@@ -226,7 +226,7 @@
- $pre_req =~ s/^,//;
- &FAI::push_command(
- "yes | mdadm --create /dev/md$id --level=$level --force --run --raid-devices="
-- . scalar(@eff_devs) . " --spare-devices=" . scalar(@spares) . " "
-+ . scalar(@eff_devs) . (scalar(@spares) !=0 ? " --spare-devices=" . scalar(@spares) : "") . " "
- . join(" ", @eff_devs) . " " . join(" ", @spares),
- "$pre_req", "exist_/dev/md$id" );
-
-Index: trunk/lib/setup-storage/Parser.pm
-===================================================================
---- trunk.orig/lib/setup-storage/Parser.pm
-+++ trunk/lib/setup-storage/Parser.pm
-@@ -632,6 +632,8 @@
- ($2 =~ /spare/) and $spare = 1;
- ($2 =~ /missing/) and $missing = 1;
- }
-+ (($spare == 1 || $missing == 1) && $FAI::partition_pointer->{mode} == 0)
-+ and die "RAID-0 does not support spares or missing devices\n";
- if ($missing) {
- die "Failed to resolve $dev to a unique device name\n" if (scalar(@candidates) > 1);
- $dev = $candidates[0] if (scalar(@candidates) == 1);
More information about the Fai-commit
mailing list