setup-storage and grub issue

Christopher Huhn C.Huhn at gsi.de
Mon Apr 21 15:51:22 CEST 2008


Hi Michael,

Michael Tautschnig wrote:
> Hmm, according to GRUB docs it may or may not be able to use RAID devices
> directly, and alas set them up as appropriate; it will certainly depend on the
> GRUB version, newer versions should be able to do this.
>
> I thus committed version r4869, which does set the BOOT_* variables in all
> cases, but uses the RAID/LVM device names, and does (for now) not resolve them
> to the underlying disk partitions.
>   
I did not have the time to check this sooner. I check out Revision 4871
and had to fix these small errors first:

Index: lib/fstab.pm
===================================================================
--- lib/fstab.pm        (revision 3638)
+++ lib/fstab.pm        (working copy)
@@ -207,7 +207,7 @@
         # according to http://grub.enbug.org/LVMandRAID, this should
work...
         # if the mount point is / or /boot, the variables should be
set, unless
         # they are already
-        if ($p_ref->{mountpoint} eq "/boot" || ($p_ref->{mountpoint} eq
"/" &&
+        if ($l_ref->{mountpoint} eq "/boot" || ($l_ref->{mountpoint} eq
"/" &&
               !defined ($FAI::disk_var{BOOT_PARTITION}))) {
           # set the BOOT_DEVICE and BOOT_PARTITION variables, if necessary
           $FAI::disk_var{BOOT_PARTITION} = $device_name;
@@ -239,10 +239,10 @@
         # according to http://grub.enbug.org/LVMandRAID, this should
work...
         # if the mount point is / or /boot, the variables should be
set, unless
         # they are already
-        if ($p_ref->{mountpoint} eq "/boot" || ($p_ref->{mountpoint} eq
"/" &&
+        if ($r_ref->{mountpoint} eq "/boot" || ($r_ref->{mountpoint} eq
"/" &&
               !defined ($FAI::disk_var{BOOT_PARTITION}))) {
           # set the BOOT_DEVICE and BOOT_PARTITION variables, if necessary
-          $FAI::disk_var{BOOT_PARTITION} = "$device_name"
+           $FAI::disk_var{BOOT_PARTITION} = "$device_name";
           ($c =~ /^PHY_(.+)$/) or &FAI::internal_error("unexpected
mismatch");
           defined ($FAI::disk_var{BOOT_DEVICE}) or
             $FAI::disk_var{BOOT_DEVICE} = "$device_name";
Index: lib/commands.pm
===================================================================
--- lib/commands.pm     (revision 3638)
+++ lib/commands.pm     (working copy)
@@ -95,7 +95,7 @@

   my ($device, $partition) = @_;

-  return $device unless $part->{encrypt};
+  return $device unless $partition->{encrypt};

   # encryption requested, rewrite the device name
   my $enc_dev_name = $device;


Then setup-storage runs but I get:

INTERNAL ERROR in setup-storage:
unexpected mismatch

while doing "mkfs.xfs -f /dev/system/tmp". The mkfs itself succeeds
without errors but setup-storage stops afterwards and does not create
disk_var.sh.

FYI: The RAIDs are not recreated as I did not erase their superblocks
but as the disk layout did not change this should not matter (or does it?).

Regards,
    Christopher

-- 
Christopher Huhn
Linux therapist
Gesellschaft für Schwerionenforschung mbH
Planckstraße 1
D-64291 Darmstadt
http://www.gsi.de/

Handelsregister: Amtsgericht Darmstadt, HRB 1528

Geschäftsführer: Professor Dr. Horst Stöcker

Vorsitzende des Aufsichtsrates: Dr. Beatrix Vierkorn-Rudolph,
Stellvertreter: Ministerialdirigent Dr. Rolf Bernhardt



More information about the linux-fai mailing list