[Fai-commit] r5683 - people/michael/experimental/patches

Michael Tautschnig mt at alioth.debian.org
Mon Nov 30 13:15:37 UTC 2009


Author: mt
Date: 2009-11-30 13:15:24 +0000 (Mon, 30 Nov 2009)
New Revision: 5683

Added:
   people/michael/experimental/patches/setup-storage_lvm-preserve2
Modified:
   people/michael/experimental/patches/series
   people/michael/experimental/patches/setup-storage_cryptsetup
Log:
LVM preserve needs more work; Julien did a test of the new cryptsetup patches
and fixed a few bugs I had introduced


Modified: people/michael/experimental/patches/series
===================================================================
--- people/michael/experimental/patches/series	2009-11-23 11:02:17 UTC (rev 5682)
+++ people/michael/experimental/patches/series	2009-11-30 13:15:24 UTC (rev 5683)
@@ -10,3 +10,4 @@
 bugfix-556168
 setup-storage_sameas-option
 setup-storage_cryptsetup
+setup-storage_lvm-preserve2

Modified: people/michael/experimental/patches/setup-storage_cryptsetup
===================================================================
--- people/michael/experimental/patches/setup-storage_cryptsetup	2009-11-23 11:02:17 UTC (rev 5682)
+++ people/michael/experimental/patches/setup-storage_cryptsetup	2009-11-30 13:15:24 UTC (rev 5683)
@@ -1,4 +1,4 @@
-2009-11-23  Michael Tautschnig  <mt at debian.org>
+2009-11-30  Michael Tautschnig  <mt at debian.org>
 
 	* setup-storage: Encryption is now configured via a separate cryptsetup
 		stanza, deprecated the previous :encrypt option (thanks Julien BLACHE for
@@ -37,7 +37,7 @@
    return if ($fs eq "-");
  
    my ($create_options) = $partition->{createopts};
-@@ -88,50 +88,43 @@
+@@ -88,50 +88,44 @@
  
  ################################################################################
  #
@@ -54,7 +54,7 @@
 -#
  ################################################################################
 -sub encrypt_device {
-+sub is_oldstyle_encrypt_device {
++sub handle_oldstyle_encrypt_device {
  
    my ($device, $partition) = @_;
  
@@ -99,8 +99,9 @@
 +    device => $device,
 +    mode => "luks",
 +    preserve => (defined($partition->{size}) ?
-+        $partition->{size}->preserve : $partition->{preserve}),
++        $partition->{size}->{preserve} : $partition->{preserve}),
 +    mountpoint => $partition->{mountpoint},
++    mount_options => $partition->{mount_options},
 +    filesystem => $partition->{filesystem},
 +    createopts => $partition->{createopts},
 +    tuneopts => $partition->{tuneopts}
@@ -115,7 +116,7 @@
  }
  
  ################################################################################
-@@ -160,6 +153,79 @@
+@@ -160,6 +154,79 @@
  ################################################################################
  #
  # @brief Using the configurations from %FAI::configs, a list of commands is
@@ -195,7 +196,7 @@
  # built to create any RAID devices
  #
  ################################################################################
-@@ -167,7 +233,7 @@
+@@ -167,7 +234,7 @@
  
    foreach my $config (keys %FAI::configs) { # loop through all configs
      # no LVM or physical devices here
@@ -204,7 +205,7 @@
      ($config eq "RAID") or &FAI::internal_error("Invalid config $config");
  
      # create all raid devices
-@@ -453,8 +519,8 @@
+@@ -453,8 +520,8 @@
    # loop through all configs
    foreach my $config (keys %FAI::configs) {
  
@@ -215,7 +216,7 @@
      ($config =~ /^VG_(.+)$/) or &FAI::internal_error("Invalid config $config");
      next if ($1 eq "--ANY--");
      my $vg = $1; # the volume group
-@@ -861,8 +927,8 @@
+@@ -861,8 +928,8 @@
  
    # loop through all configs
    foreach my $config ( keys %FAI::configs ) {

Added: people/michael/experimental/patches/setup-storage_lvm-preserve2
===================================================================
--- people/michael/experimental/patches/setup-storage_lvm-preserve2	                        (rev 0)
+++ people/michael/experimental/patches/setup-storage_lvm-preserve2	2009-11-30 13:15:24 UTC (rev 5683)
@@ -0,0 +1,21 @@
+Index: trunk/lib/setup-storage/Commands.pm
+===================================================================
+--- trunk.orig/lib/setup-storage/Commands.pm
++++ trunk/lib/setup-storage/Commands.pm	
+@@ -352,6 +352,7 @@
+           ($FAI::configs{"PHY_$disk"}{partitions}{$part_no}{size}{preserve}) and
+           next;
+       }
++      # TODO: handle RAID and LVM
+       $vg_exists = 0;
+       last;
+     }
+@@ -393,7 +394,7 @@
+   my @new_devices = ();
+   push @new_devices, &FAI::enc_name($_) foreach (keys %new_devs);
+ 
+-  # &FAI::erase_lvm_signature( \@new_devices );
++  # TODO: check for those that really don't exist anymore
+ 
+   # create all the devices
+   &FAI::push_command( "pvcreate $pv_create_options $_", "exist_$_", "pv_done_$_"




More information about the Fai-commit mailing list