Hello Urs,
attached you can find the patch. However there is another non-trvial bug
that I can't fix as of yet. I suggest asking about it in the #IRC
channel, namely the "preserve_always" flag causes some problems. It
results in the following error:
>Previous partitions overflow begin of preserved partition /dev/sda2
when trying to preserve.
Also you will not be able to use "preserve_always" when the disk is
empty, as setup-storage will complain about the fact that there is
nothing to preserve.
However, the initial installation should work fine now.
Best regards
Kerim
>From 9654cb6c7ee4865e490e28d5f41cc9542e5dc4e7 Mon Sep 17 00:00:00 2001
From: Kerim Gueney <kgue...@uni-koeln.de>
Date: Fri, 16 Jan 2015 19:21:34 +0100
Subject: [PATCH 2/2] Fixed a bug that caused a wrong $pre_req for btrfs
configurations
---
lib/setup-storage/Commands.pm | 8 ++++++--
1 file changed, 6 insertions(+), 2 deletions(-)
diff --git a/lib/setup-storage/Commands.pm b/lib/setup-storage/Commands.pm
index 2513902..4f49138 100644
--- a/lib/setup-storage/Commands.pm
+++ b/lib/setup-storage/Commands.pm
@@ -310,8 +310,12 @@ sub build_btrfs_commands {
defined($btrfscreateopts) or $btrfscreateopts = "";
my $createopts = $vol->{createopts};
defined($createopts) or $createopts = "";
- my $pre_req = "pt_complete_/dev/vdd";
-
+ # creates the proper prerequisites for later command ordering
+ foreach (@devs) {
+ my $tmp = $_;
+ $tmp =~ s/\d//;
+ $pre_req = $pre_req . "pt_complete_" . $tmp . "," unless ($pre_req =~ m/pt_complete_$tmp/);
+ }
# creates the BTRFS volume/RAID
if ($raidlevel eq 'single') {
&FAI::push_command("mkfs.btrfs -d single $createopts ". join(" ",@devs),
--
1.9.1