Please find attached a patch to the installer to allow the root
filesystem to be on an LVM logical volume.  Even 9.0 went out the door
with everything needed for this to work only minus the small change in
the installer to actually do it.

This patch also adds the ability for the user to name LVs as he
creates them.

Thanx,
b.

-- 
Brian J. Murrell
diff -ur cooker-tree/Mandrake/mdkinst/usr/bin/perl-install/diskdrake/interactive.pm 
cooker-lvmroot/Mandrake/mdkinst/usr/bin/perl-install/diskdrake/interactive.pm
--- cooker-tree/Mandrake/mdkinst/usr/bin/perl-install/diskdrake/interactive.pm  
2003-01-07 19:07:21.000000000 -0500
+++ cooker-lvmroot/Mandrake/mdkinst/usr/bin/perl-install/diskdrake/interactive.pm      
+ 2003-01-10 09:36:47.000000000 -0500
@@ -459,6 +459,9 @@
            if_($::expert && $hd->hasExtended,
          { label => N("Preference: "), val => \$primaryOrExtended, list => [ '', 
"Extended", "Primary", if_($::expert, "Extended_0x85") ] },
            ),
+          if_(isLVM($hd),
+        { label => _("Logical volume name "), val => \$part->{lvname}, list => [ 
+"root", "swap", "usr", "home", "var", '' ], sort => 0, not_edit => 0 },
+           ),
         ], changed => sub {
            if ($part->{start} + ($mb_size << 11) > $max) {
                if ($_[0] == 0) {
diff -ur cooker-tree/Mandrake/mdkinst/usr/bin/perl-install/fsedit.pm 
cooker-lvmroot/Mandrake/mdkinst/usr/bin/perl-install/fsedit.pm
--- cooker-tree/Mandrake/mdkinst/usr/bin/perl-install/fsedit.pm 2003-01-07 
19:07:17.000000000 -0500
+++ cooker-lvmroot/Mandrake/mdkinst/usr/bin/perl-install/fsedit.pm      2003-01-10 
+09:38:31.000000000 -0500
@@ -524,7 +524,7 @@
     die "raid / with no /boot" 
       if $mntpoint eq "/" && isRAID($part) && !has_mntpoint("/boot", $all_hds);
     die N("You can't use a LVM Logical Volume for mount point %s", $mntpoint)
-      if ($mntpoint eq '/' || $mntpoint eq '/boot') && isLVM($hd);
+      if ($mntpoint eq '/boot') && isLVM($hd);
     die N("This directory should remain within the root filesystem")
       if member($mntpoint, qw(/bin /dev /etc /lib /sbin /root /mnt));
     die N("You need a true filesystem (ext2/ext3, reiserfs, xfs, or jfs) for this 
mount point\n")
diff -ur cooker-tree/Mandrake/mdkinst/usr/bin/perl-install/lvm.pm 
cooker-lvmroot/Mandrake/mdkinst/usr/bin/perl-install/lvm.pm
--- cooker-tree/Mandrake/mdkinst/usr/bin/perl-install/lvm.pm    2003-01-07 
19:07:19.000000000 -0500
+++ cooker-lvmroot/Mandrake/mdkinst/usr/bin/perl-install/lvm.pm 2003-01-10 
+09:36:47.000000000 -0500
@@ -128,9 +128,9 @@
 sub lv_create {
     my ($lvm, $lv) = @_;
     my $list = $lvm->{primary}{normal} ||= [];
-    my $nb = 1 + max(map { basename($_->{device}) } @$list);
-    $lv->{device} = "$lvm->{VG_name}/$nb";
-    run_or_die('lvcreate', '--size', int($lv->{size} / 2) . 'k', '-n', $nb, 
$lvm->{VG_name});
+    $lv->{lvname} = 1 + max(map { basename($_->{device}) } @$list) if ($lv->{lvname} 
+eq "");
+    $lv->{device} = "$lvm->{VG_name}/" . $lv->{lvname};
+    run_program::run_or_die('lvcreate', '--size', int($lv->{size} / 2) . 'k', '-n', 
+$lv->{lvname}, $lvm->{VG_name});
     $lv->{size} = get_lv_size($lv->{device}); 
     $lv->{notFormatted} = 1;
     $lv->{isFormatted} = 0;

Attachment: msg85444/pgp00000.pgp
Description: PGP signature

Reply via email to