文章详情

  • 游戏榜单
  • 软件榜单
关闭导航
热搜榜
热门下载
热门标签
php爱好者> php文档>Installing root on LVM + RAID with debianinstaller

Installing root on LVM + RAID with debianinstaller

时间:2006-07-02  来源:mrzcs

 

This document explains how to set up Debian GNU/Linux on a computer with your root partition on a RAID volume managed with LVM. The procedure assumes that you have 2 indentical hard disks on your computer.

Run the Debian installer for linux26 and when reaching the main screen "Partitioning disks" read carefully all the options offered and notice the "Table of disks" section which should show the two hard disks which you intend to use in RAID mode :

  • IDE1 (hda)
  • IDE2 (hdc)

If you do not see theses disks then check your BIOS and cables settings and restart the Debian-installer.

Create the physical volumes for RAID

From the screen "Partitioning disks" in the "Table of disks"

  • Select the disk: IDE1 (hda)
  • Create new empty partition table on this device = {yes}
  • Select the line "FREE SPACE" just under the IDE1 disk
  • Create a new partition (which will be used for booting) size = 512M
  • Type for the new partition = Primary
  • Location for the new partition = Begining
  • Partition setting: Use as = physical volume for RAID
  • Done setting up the partition

Now Select the line "FREE SPACE" just under the newly created partition:

  • Create a new partition size = leave all the free space value
  • Type for the new partition = Primary
  • Partition setting: Use as = physical volume for RAID
  • Done setting up the partition

Repeat the above procedure for the second disk IDE2 (HDC).

Check that both disk have identical partitions. If not you can re-select and correct the disk with the wrong partition.

Configure software RAID

From the screen "Partitioning disks" select: Configure software RAID

"Write the changes to the storage devices and configure RAID select: {yes}

"This is the multidisk (MD) and software RAID configuration menu" select:

  • Create MD device
  • Multidisk device type = RAID 1
  • Number of active devices for the RAID1 array = 2
  • Number of spare devices for the RAID1 array = 0

"Active devices for the RAID1 multidisk device" select from the Table of disks list the two devices ending with /part1 like below

  • [*] /dev/.../.../part1
  • [*] /dev/.../.../part1
  • Select {Continue}

"Multidisk configuration actions" select:

  • Create MD device
  • Multidisk device type = RAID1
  • Number of active devices for the RAID1 array = 2
  • Number of spare devices for the RAID1 array = 0

"Active devices for the RAID1 multidisk device" select this time from the list the two devices ending with /part2 like below:

  • [*] /dev/.../.../part2
  • [*] /dev/.../.../part2
  • Select {Continue}
  • "Multidisk configuration action" = {Finish}

This sets up the RAID1 and the partition disk screen will now show in the "Table of disks" two RAID1 devices #0 and #1.

Create the physical volumes for LVM

From the screen "Partitioning disks" in the "Table of disks" select:

  • #1 below the line RAID1 device #1 (it is normally the largest device)
  • Use as = Physical volume for LVM
  • Done setting up the partition

Configure LVM

From the screen "Partitioning disks": 

  • Select "Configure the logical Volume Manager"
  • Write the changes to disks and configure LVM = {yes}

LVM configuration action

  • Modify volume groups (VG)
    • Create volume groups
      • Select [*] /dev/md/1 () then {Continue}
      • Volume group name = vg00
  • Modify logical volumes (LV)
    • Create logical volumes
      • Logical volume name = swap
      • Volume group = vg00
      • Logical volume size = 3G (or at least twice the size of the RAM)
    • Create logical volumes
      • Logical volume name = root
      • Volume group = vg00
      • Logical volume size = 20G (or whatever you need)
    • Create logical volumes
      • Logical volume name = home
      • Volume group = vg00 (note how much space is left)
      • Logical volume size = leave the default value or use any value smaller than what is left free on the disk
  • Leave
Leave again to launch the partitioning and return to the main screen "Partitioning the disks".

Create the partitions

In this phase you may encounter warning messages, ignore them and just hit {Continue}.

From the "Partitioning disks" screen, in the "Table of Disks" LVMVG vg00 root select: #1

  • Use as = Ext3 journaling file system
  • Mount point = / -the root file system
  • Done setting up the partition

In the "Table of Disks" RAID1 device #0 select: #1

  • Use as = Ext3 journaling file system
  • Mount point = /boot -static file of the boot loader
  • Done setting up the partition

In the "Table of Disks" LVMVG vg00, LV home select: #1

  • Use as = Ext3 journaling file system
  • Mount point = /home
  • Done setting up the partition

In the "Table of Disks" LVMVG vg00, LV swap select: #1

  • Use as = swap area
  • Done setting up the partition

To finish

Select "Finish partitioning and write changes to disk"

The screen will now give you a summary of what has been done and to the promt "Write changes to disks?" answer {yes}

You may now continue by first installing GRUB on the boot sector and proceed with the complete installation of Debian which will be written symetrically on the two disks in RAID.

Enjoy Debian with the RAID set up for both boot and data such that even if one disk crashes you will be able to restore your configuration (do not forget to give to your new disk partitions identical to the old disk).

(pls refer to http://dev.jerryweb.org/raid/)

相关阅读 更多 +
排行榜 更多 +
PvZ戴夫的时空冒险重置

PvZ戴夫的时空冒险重置

策略塔防 下载
PVZTV雪版阳光加50

PVZTV雪版阳光加50

策略塔防 下载
双刃战士雪姐

双刃战士雪姐

冒险解谜 下载