Differences between revisions 16 and 27 (spanning 11 versions)
Revision 16 as of 2008-11-08 15:09:30
Size: 3406
Editor: FranklinPiat
Comment: Lenny support SoftwareRaidRoot... screenshots
Revision 27 as of 2020-04-07 10:46:24
Size: 4386
Editor: ?ThomasLange
Comment: remove outdated link
Deletions are marked like this. Additions are marked like this.
Line 4: Line 4:
Lenny supports having the root and {{{/boot}}} partition on RAID volume. Actually, you can have root on RAID1+LVM partition. Lenny (5.0) and later support having the root and {{{/boot}}} partition on RAID volume. Actually, you can have root on RAID1+LVM partition.
Line 6: Line 6:
This page contains some screenshots to demonstrate it. This page contains some screenshots to demonstrate it, and applies to Debian 5.0 through, at least, 8.0.
Line 8: Line 8:
== Root on software RAD+LVM ==
In this example, we use virtual machine ([:QEMU:qemu] or [:KVM:kvm])... we can play, and break them ;-)
== Root on software RAID+LVM ==
In this example, we use virtual machine ([[QEMU|qemu]] or [[KVM|kvm]])... we can play, and break them ;-)
Line 32: Line 32:
 * {{{Use as "Physical volume for Raid"}}} : [[BR]] inline:00.gif  * {{{Use as "Physical volume for Raid"}}} : <<BR>> {{attachment:00.gif}}
Line 35: Line 35:
 * We have a raid partition on each disk: [[BR]] inline:01.gif
 * Choose the type of multidisk device to be created: [[BR]] inline:02.gif
 * We have two partition: [[BR]] inline:03.gif
 * We have a raid partition on each disk: <<BR>> {{attachment:01.gif}}
 * Choose the type of multidisk device to be created: <<BR>> {{attachment:02.gif}}
 * We have two partition: <<BR>> {{attachment:03.gif}}
Line 39: Line 39:
 * Let's select the partitions to use: [[BR]] inline:04.gif
 * That's it ! [[BR]] inline:05.gif
 * Let's select the partitions to use: <<BR>> {{attachment:04.gif}}
 * That's it ! <<BR>> {{attachment:05.gif}}
Line 43: Line 43:
 * Let's configure the Logical volume manager: [[BR]] inline:06.gif
 * First create a volume group: [[BR]] inline:07.gif
 * Here, I chose the name ''vg1'' for the group: [[BR]] inline:08.gif
 * We have only one raid device: [[BR]] inline:09.gif
 * Let's create the ''logical volume'' (kind pf partitions): [[BR]] inline:10.gif
 * Our Logical volume (LV) will use some disk space from ''vg1'' (which belongs to ''md0''): [[BR]] inline:11.gif
 * I named my partition ''foobar_root'': [[BR]] inline:12.gif
 * In this example, we wont split the filesystem (we won't even bother to create a swap, which is a bad idea), so I use all the disk space. (which again isn't a good idea, since it's so easy ro resize a partition with LVM) [[BR]] inline:13.gif
 * Finish: [[BR]] inline:14.gif
 * Let's configure the Logical volume manager: <<BR>> {{attachment:06.gif}}
 * First create a volume group: <<BR>> {{attachment:07.gif}}
 * Here, I chose the name ''vg1'' for the group: <<BR>> {{attachment:08.gif}}
 * We have only one raid device: <<BR>> {{attachment:09.gif}}
 * Let's create the ''logical volume'' (kind pf partitions): <<BR>> {{attachment:10.gif}}
 * Our Logical volume (LV) will use some disk space from ''vg1'' (which belongs to ''md0''): <<BR>> {{attachment:11.gif}}
 * I named my partition ''foobar_root'': <<BR>> {{attachment:12.gif}}
 * In this example, we wont split the filesystem (we won't even bother to create a swap, which is a bad idea), so I use all the disk space. (which again isn't a good idea, since it's so easy ro resize a partition with LVM) <<BR>> {{attachment:13.gif}}
 * Finish: <<BR>> {{attachment:14.gif}}
Line 54: Line 54:
 * Let's assign and format the volumes (''partitions''): [[BR]] inline:15.gif
 * As usually... [[BR]] inline:16.gif
 * Done! [[BR]] inline:17.gif
 * Let's assign and format the volumes (''partitions''): <<BR>> {{attachment:15.gif}}
 * As usually... <<BR>> {{attachment:16.gif}}
 * Done! <<BR>> {{attachment:17.gif}}

===== Install the bootloader (GRUB) =====
In Jessie (8.0), and I believe Wheezy (7.0), the installer will install [[Grub|GRUB]] even on RAID installs. However, GRUB can not install to a RAID device (e.g., `/dev/md0`), but will nonetheless work fine.
 * When asked to install bootloader, install to first device: <<BR>>{{attachment:grub-install_sda.png}}
 * After first boot, consider executing `dpkg-reconfigure grub-pc` (or `dpkg-reconfigure grub-efi-amd64` on EFI systems), and install to all devices. This way, your system will still boot correctly even if you reorder your drives. <<BR>>{{attachment:grub-install_sda+sdb.png}}
Line 60: Line 65:
 * because we have root on RAID, DebianInstaller automatically switch to [:LILO:lilo]: [[BR]]inline:20.gif  * In Lenny (5.0), DebianInstaller automatically switch to [[LILO|lilo]] when you have root on RAID: <<BR>>{{attachment:20.gif}}
Line 63: Line 68:
 * Debian is booting: [[BR]] inline:oo.gif  * Debian is booting: <<BR>> {{attachment:oo.gif}}
Line 69: Line 74:
 * Simply boot on the CD, and choose ''rescue'' mode, then after the usual DI prompt, you get : [[BR]] inline:rescue00.gif
 * Then: [[BR]] inline:rescue01.gif
 * Simply boot on the CD, and choose ''rescue'' mode, then after the usual DI prompt, you get : <<BR>> {{attachment:rescue00.gif}}
 * Then: <<BR>> {{attachment:rescue01.gif}}
Line 72: Line 77:
 * Reinstall/ rescue/restore lilo : [[BR]] inline:rescue03lilo.gif  * Reinstall/ rescue/restore lilo : <<BR>> {{attachment:rescue03lilo.gif}}
Line 75: Line 80:
 * Recover a !DegradedArray RAID array ~-[[BR]] [http://lists.debian.org/debian-user/2008/10/msg01989.html]-~  * Recover a !DegradedArray RAID array ~-<<BR>> [[http://lists.debian.org/debian-user/2008/10/msg01989.html]]-~
Line 77: Line 82:
 * http://www.tldp.org/HOWTO/RAID-HOWTO/
 * http://www.tldp.org/HOWTO/LVM-HOWTO/

----

CategoryDebianInstaller | CategoryRoot | CategoryHardware | CategorySystemAdministration | CatgeoryRedundant: merge with other CategoryRaid pages

Lenny (5.0) and later support having the root and /boot partition on RAID volume. Actually, you can have root on RAID1+LVM partition.

This page contains some screenshots to demonstrate it, and applies to Debian 5.0 through, at least, 8.0.

Root on software RAID+LVM

In this example, we use virtual machine (qemu or kvm)... we can play, and break them ;-)

  • $ sudo apt-get install kvm
    
    $ qemu-img create -f qcow2 hda.qcow2 4G
    Formatting 'hda.qcow2', fmt=qcow2, size=4194304 kB
    
    $ qemu-img create -f qcow2 hdb.qcow2 4G
    Formatting 'hdb.qcow2', fmt=qcow2, size=4194304 kB
    
    $ kvm -hda hda.qcow2  -hdb hdb.qcow2  -cdrom debian-lenny-i386-netinst.iso -boot d

Of course, you need to download a cdrom image.

Root on RAID+LVM example

Those few screenshots show how to install root on lvm on raid :

Once you have reach DebianInstaller partitioning screen...

Choose manual partitioning, then on each disk, manually create a partition (same size on both disks).

Create partitions for RAID
  • Use as "Physical volume for Raid" :
    00.gif

Configure RAID
  • We have a raid partition on each disk:
    01.gif

  • Choose the type of multidisk device to be created:
    02.gif

  • We have two partition:
    03.gif

  • (In this example, we have no spare partition).
  • Let's select the partitions to use:
    04.gif

  • That's it !
    05.gif

Configure LVM
  • Let's configure the Logical volume manager:
    06.gif

  • First create a volume group:
    07.gif

  • Here, I chose the name vg1 for the group:
    08.gif

  • We have only one raid device:
    09.gif

  • Let's create the logical volume (kind pf partitions):
    10.gif

  • Our Logical volume (LV) will use some disk space from vg1 (which belongs to md0):
    11.gif

  • I named my partition foobar_root:
    12.gif

  • In this example, we wont split the filesystem (we won't even bother to create a swap, which is a bad idea), so I use all the disk space. (which again isn't a good idea, since it's so easy ro resize a partition with LVM)
    13.gif

  • Finish:
    14.gif

Use the LVM volumes
  • Let's assign and format the volumes (partitions):
    15.gif

  • As usually...
    16.gif

  • Done!
    17.gif

Install the bootloader (GRUB)

In Jessie (8.0), and I believe Wheezy (7.0), the installer will install GRUB even on RAID installs. However, GRUB can not install to a RAID device (e.g., /dev/md0), but will nonetheless work fine.

  • When asked to install bootloader, install to first device:
    grub-install_sda.png

  • After first boot, consider executing dpkg-reconfigure grub-pc (or dpkg-reconfigure grub-efi-amd64 on EFI systems), and install to all devices. This way, your system will still boot correctly even if you reorder your drives.
    grub-install_sda+sdb.png

Install the bootloader (lilo)

At the end of the installation...

Reboot Debian
  • Debian is booting:
    oo.gif

Using D-I rescue, to reinstall lilo

Thanks to DebianInstaller's rescue mode, it's very easy to recover a problem :

  • Simply boot on the CD, and choose rescue mode, then after the usual DI prompt, you get :
    rescue00.gif

  • Then:
    rescue01.gif

  • Reinstall/ rescue/restore lilo :
    rescue03lilo.gif

See also


CategoryDebianInstaller | CategoryRoot | CategoryHardware | CategorySystemAdministration | ?CatgeoryRedundant: merge with other ?CategoryRaid pages