特殊:Badtitle/NS100:Installation/LVMOnRaid:修订间差异
小无编辑摘要 |
小无编辑摘要 |
||
(未显示同一用户的7个中间版本) | |||
第1行: | 第1行: | ||
{{From|https://help.ubuntu.com/community/Installation/LVMOnRaid}} | {{From|https://help.ubuntu.com/community/Installation/LVMOnRaid}} | ||
{{Languages|UbuntuHelp:Installation/LVMOnRaid}} | {{Languages|UbuntuHelp:Installation/LVMOnRaid}} | ||
In order to perform this install you will need the Alternate ISO image and have to use the text based installer. Updates are here to support an intial install to a new RAID and onto an | <<Include(Tag/ContentCleanup)>> | ||
<<Include(Tag/StyleCleanup)>> | |||
In order to perform this install you will need the Alternate ISO image and have to use the text based installer. Updates are here to support an intial install to a new RAID and onto an existing RAID. | |||
=== For a New Installation === | === For a New Installation === | ||
See below for an existing RAID install - Process is pretty similiar. (Was a 5.x process) | See below for an existing RAID install - Process is pretty similiar. (Was a 5.x process) | ||
This was done on 6.x | This was done on 6.x | ||
I'm doing this from | I'm doing this from memory but it should be pretty close. | ||
This was a really simple process on 6.x | This was a really simple process on 6.x | ||
=== Expectations === | === Expectations === | ||
* You know how to | * You know how to partition and setup your drives - This won't prescribe a drive setup, but covers some necessities. | ||
* You have burned a copy of the Alternate ISO and are using the text based installer. | * You have burned a copy of the Alternate ISO and are using the text based installer. | ||
=== Drive Setup === | === Drive Setup === | ||
* In my example I have 4 drives and a CDROM, no Floppy. | * In my example I have 4 drives and a CDROM, no Floppy. | ||
* I used one drive /boot and /Swap with 50Meg for /boot and 1gig-50Meg for /Swap (Better performance with Swap seperate) | * I used one drive /boot and /Swap with 50Meg for /boot and 1gig-50Meg for /Swap (Better performance with Swap seperate) | ||
* You can create Primary | * You can create Primary partitions on your drives of equal size to make them ready for the RAID setup. Leverage excess space as you think is acceptable or just leave as wasted. | ||
* I'm using Raid 5 on 3 Drives intended to mount as /root | * I'm using Raid 5 on 3 Drives intended to mount as /root | ||
* My drives were ~10Gig so some space was wasted. | * My drives were ~10Gig so some space was wasted. | ||
* With a typical setup - some drives are master and some are slave - it doesn't matter at this point in terms of will it work. | * With a typical setup - some drives are master and some are slave - it doesn't matter at this point in terms of will it work. | ||
* I booted to the live CD and partitioned my drives before the install in the GUI with GParted. I recommend this for the first time installers. | * I booted to the live CD and partitioned my drives before the install in the GUI with [[UbuntuHelp:GParted|GParted]]. I recommend this for the first time installers. | ||
=== Install === | === Install === | ||
* Boot from the Ubuntu alternate ISO 6.x | * Boot from the Ubuntu alternate ISO 6.x | ||
* Follow the directions to drive setup and choose manual | * Follow the directions to drive setup and choose manual partition | ||
* Setup /boot and /Swap in the manual setup - mark /boot as bootable. I formatted as ext2 | * Setup /boot and /Swap in the manual setup - mark /boot as bootable. I formatted as ext2 | ||
* Choose configure RAID option | * Choose configure RAID option | ||
第30行: | 第32行: | ||
++ Ubuntu 5.10 ++ | ++ Ubuntu 5.10 ++ | ||
Installing onto a Software RAID array, and using LVM for all of your volumes (including root and boot) is well supported in '''Ubuntu 5.10''' (Breezy Badger). You will be able to do almost everything you need to do directly from the Ubuntu installer. This page will describe how to do this, aswell as any gotcha's you might run into. Also included is a section on how to migrate a machine from a different linux distro that is running Software RAID. | Installing onto a Software RAID array, and using LVM for all of your volumes (including root and boot) is well supported in '''Ubuntu 5.10''' (Breezy Badger). You will be able to do almost everything you need to do directly from the Ubuntu installer. This page will describe how to do this, aswell as any gotcha's you might run into. Also included is a section on how to migrate a machine from a different linux distro that is running Software RAID. | ||
If you are doing this on a previous Ubuntu release, this is much more difficult. These directions [[UbuntuHelp:Installation/RAID1]] may help. | If you are doing this on a previous Ubuntu release, this is much more difficult. These directions [[UbuntuHelp:Installation/RAID1|Installation/RAID1]] may help. | ||
=== Expectations/Caveats === | === Expectations/Caveats === | ||
* All partitions will be on the raid array | * All partitions will be on the raid array | ||
* All partitions will be LVM volumes | * All partitions will be LVM volumes | ||
* Swap will be on LVM/RAID | * Swap will be on LVM/RAID | ||
* This is probably a small performance penalty during swapouts | |||
* If swap wasn't on RAID however, a single drive failure could cause the system to go down | |||
* Root/Boot will be on LVM/RAID | * Root/Boot will be on LVM/RAID | ||
* No need to manually synchronize your root partitions between your RAID-1 drives | |||
* In the case of a drive failure while the system is powered down, you will be able to boot off either drive (assuming your bios can boot off of either drive) | * In the case of a drive failure while the system is powered down, you will be able to boot off either drive (assuming your bios can boot off of either drive) | ||
* GRUB will not work, LILO is the only viable bootloader (at this time) | * GRUB will not work, LILO is the only viable bootloader (at this time) | ||
第48行: | 第50行: | ||
These directions can be easily tweaked for any RAID level. I'll explain as if you're doing RAID-1. If you're doing something else, you're probably smart enough to tweak the directions yourself. Any directions marked with {i} are for the Existing RAID array upgrade. You need to ignore these if you are doing a fresh install. | These directions can be easily tweaked for any RAID level. I'll explain as if you're doing RAID-1. If you're doing something else, you're probably smart enough to tweak the directions yourself. Any directions marked with {i} are for the Existing RAID array upgrade. You need to ignore these if you are doing a fresh install. | ||
* Install both drives into the machine | * Install both drives into the machine | ||
* {i} Actually, disconnect one of the drives from the machine. You should pull the drive that is second in the bootup process. This will mean you don't have to wait for the entire drive to sync before you can boot later on in the process. You will proceed with the full install on one drive, then insert the second drive later. This allows you to always revert to your old mirror if you have to (assuming your old stuff worked!) | |||
* Boot off of the Ubuntu installation CD | * Boot off of the Ubuntu installation CD | ||
* Server or desktop install is fine, choose as appropriate | |||
* When it prompts you to format the drive, or manually partition, ''choose manually partition'' | * When it prompts you to format the drive, or manually partition, ''choose manually partition'' | ||
* Delete any and all existing partitions on both drives | * Delete any and all existing partitions on both drives | ||
* {i} You only have one drive installed, so just clear out this drive. You'll do the other one later | |||
* Create a new primary partition. Use the entire disk. Make it a RAID partition. | * Create a new primary partition. Use the entire disk. Make it a RAID partition. | ||
* Mark it as bootable | |||
* Choose the Configure RAID option | * Choose the Configure RAID option | ||
* It'll probably ask you to write your partition table. Go ahead | |||
* Create your MD device, choose your raid level, and tell it how many disks you have | * Create your MD device, choose your raid level, and tell it how many disks you have | ||
* {i} Configure as RAID-1. When asked how many disks you have, tell it two, even though your second disk is sitting on your desk. Your raid array will be degraded (since it's missing the disk sitting on your desk) | |||
* Add devices to the MD device as appropriate | * Add devices to the MD device as appropriate | ||
* Select Finish in the Configure RAID screen | * Select Finish in the Configure RAID screen | ||
* Set the partition of your raid device as a physical volume for LVM | * Set the partition of your raid device as a physical volume for LVM | ||
* Choose Configure LVM | * Choose Configure LVM | ||
* At this point I got an error from the installer. Something like error informing kernel - invalid argument for /dev/md/0p1. | |||
* I rebooted to let everything get synced to disk, and tried again. Same error. I just ignored it. Everything was okay. I don't know if the reboot was necessary. Probably not. | |||
* Create your volume group (I used vg1) | |||
* Use /dev/md0 as the PV | |||
* Create your LVs | |||
* I don't make a partition for boot, I just put it on root. (Since there's no need for a separate boot) | |||
* Don't forget swap | |||
* Select Finish in the Configure LVM screen | |||
* Configure your partitions. Make ext3 file systems on each of the volumes, and mount them in appropriate places (root, usr, var, home, swap) | * Configure your partitions. Make ext3 file systems on each of the volumes, and mount them in appropriate places (root, usr, var, home, swap) | ||
* Write partitions (ignore the kernel error) | * Write partitions (ignore the kernel error) | ||
* The installation could continue normally, and everything should work just dandy. | * The installation could continue normally, and everything should work just dandy. | ||
* The installer will automatically use lilo for you instead of grub | * The installer will automatically use lilo for you instead of grub | ||
* You are now complete, you should test your RAID array for durability (EG: | * You are now complete, you should test your RAID array for durability (EG: disconnect drives, make sure you can boot off both drives) before you trust it | ||
* {i} You are not done yet. | * {i} You are not done yet. | ||
* {i} Once you've finished your install, get your system all working and ready to copy in your old data | * {i} Once you've finished your install, get your system all working and ready to copy in your old data | ||
第86行: | 第88行: | ||
* {i} fdisk your old drive, delete all partitions (`fdisk /dev/hde`) | * {i} fdisk your old drive, delete all partitions (`fdisk /dev/hde`) | ||
* {i} Create a single primary partition, using the whole disk, mark it as typeID `FD` (Linux raid auto) | * {i} Create a single primary partition, using the whole disk, mark it as typeID `FD` (Linux raid auto) | ||
* {i} write the | * {i} write the partition table | ||
* {i} Most likely it'll tell you to reboot. Reboot, and boot off of the live CD again | |||
* {i} Add the new drive to the RAID array | * {i} Add the new drive to the RAID array | ||
* {i} `mdadm /dev/md0 --add /dev/hde1` (or whatever your block device+partition is) | |||
* {i} Your devices will start resyncing immediately. If you yanked the second drive in the bootup process, feel free to reboot anytime and boot up regularly, since it'll boot off of the working drive first. | * {i} Your devices will start resyncing immediately. If you yanked the second drive in the bootup process, feel free to reboot anytime and boot up regularly, since it'll boot off of the working drive first. | ||
---- | ---- | ||
[[category: | [[category:CategoryInstallation]] | ||
[[category:UbuntuHelp]] | [[category:UbuntuHelp]] |
2010年5月19日 (三) 22:50的最新版本
文章出处: |
{{#if: | {{{2}}} | https://help.ubuntu.com/community/Installation/LVMOnRaid }} |
点击翻译: |
English {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/af | • {{#if: UbuntuHelp:Installation/LVMOnRaid|Afrikaans| [[::Installation/LVMOnRaid/af|Afrikaans]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/ar | • {{#if: UbuntuHelp:Installation/LVMOnRaid|العربية| [[::Installation/LVMOnRaid/ar|العربية]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/az | • {{#if: UbuntuHelp:Installation/LVMOnRaid|azərbaycanca| [[::Installation/LVMOnRaid/az|azərbaycanca]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/bcc | • {{#if: UbuntuHelp:Installation/LVMOnRaid|جهلسری بلوچی| [[::Installation/LVMOnRaid/bcc|جهلسری بلوچی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/bg | • {{#if: UbuntuHelp:Installation/LVMOnRaid|български| [[::Installation/LVMOnRaid/bg|български]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/br | • {{#if: UbuntuHelp:Installation/LVMOnRaid|brezhoneg| [[::Installation/LVMOnRaid/br|brezhoneg]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/ca | • {{#if: UbuntuHelp:Installation/LVMOnRaid|català| [[::Installation/LVMOnRaid/ca|català]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/cs | • {{#if: UbuntuHelp:Installation/LVMOnRaid|čeština| [[::Installation/LVMOnRaid/cs|čeština]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/de | • {{#if: UbuntuHelp:Installation/LVMOnRaid|Deutsch| [[::Installation/LVMOnRaid/de|Deutsch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/el | • {{#if: UbuntuHelp:Installation/LVMOnRaid|Ελληνικά| [[::Installation/LVMOnRaid/el|Ελληνικά]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/es | • {{#if: UbuntuHelp:Installation/LVMOnRaid|español| [[::Installation/LVMOnRaid/es|español]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/fa | • {{#if: UbuntuHelp:Installation/LVMOnRaid|فارسی| [[::Installation/LVMOnRaid/fa|فارسی]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/fi | • {{#if: UbuntuHelp:Installation/LVMOnRaid|suomi| [[::Installation/LVMOnRaid/fi|suomi]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/fr | • {{#if: UbuntuHelp:Installation/LVMOnRaid|français| [[::Installation/LVMOnRaid/fr|français]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/gu | • {{#if: UbuntuHelp:Installation/LVMOnRaid|ગુજરાતી| [[::Installation/LVMOnRaid/gu|ગુજરાતી]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/he | • {{#if: UbuntuHelp:Installation/LVMOnRaid|עברית| [[::Installation/LVMOnRaid/he|עברית]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/hu | • {{#if: UbuntuHelp:Installation/LVMOnRaid|magyar| [[::Installation/LVMOnRaid/hu|magyar]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/id | • {{#if: UbuntuHelp:Installation/LVMOnRaid|Bahasa Indonesia| [[::Installation/LVMOnRaid/id|Bahasa Indonesia]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/it | • {{#if: UbuntuHelp:Installation/LVMOnRaid|italiano| [[::Installation/LVMOnRaid/it|italiano]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/ja | • {{#if: UbuntuHelp:Installation/LVMOnRaid|日本語| [[::Installation/LVMOnRaid/ja|日本語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/ko | • {{#if: UbuntuHelp:Installation/LVMOnRaid|한국어| [[::Installation/LVMOnRaid/ko|한국어]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/ksh | • {{#if: UbuntuHelp:Installation/LVMOnRaid|Ripoarisch| [[::Installation/LVMOnRaid/ksh|Ripoarisch]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/mr | • {{#if: UbuntuHelp:Installation/LVMOnRaid|मराठी| [[::Installation/LVMOnRaid/mr|मराठी]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/ms | • {{#if: UbuntuHelp:Installation/LVMOnRaid|Bahasa Melayu| [[::Installation/LVMOnRaid/ms|Bahasa Melayu]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/nl | • {{#if: UbuntuHelp:Installation/LVMOnRaid|Nederlands| [[::Installation/LVMOnRaid/nl|Nederlands]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/no | • {{#if: UbuntuHelp:Installation/LVMOnRaid|norsk| [[::Installation/LVMOnRaid/no|norsk]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/oc | • {{#if: UbuntuHelp:Installation/LVMOnRaid|occitan| [[::Installation/LVMOnRaid/oc|occitan]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/pl | • {{#if: UbuntuHelp:Installation/LVMOnRaid|polski| [[::Installation/LVMOnRaid/pl|polski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/pt | • {{#if: UbuntuHelp:Installation/LVMOnRaid|português| [[::Installation/LVMOnRaid/pt|português]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/ro | • {{#if: UbuntuHelp:Installation/LVMOnRaid|română| [[::Installation/LVMOnRaid/ro|română]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/ru | • {{#if: UbuntuHelp:Installation/LVMOnRaid|русский| [[::Installation/LVMOnRaid/ru|русский]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/si | • {{#if: UbuntuHelp:Installation/LVMOnRaid|සිංහල| [[::Installation/LVMOnRaid/si|සිංහල]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/sq | • {{#if: UbuntuHelp:Installation/LVMOnRaid|shqip| [[::Installation/LVMOnRaid/sq|shqip]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/sr | • {{#if: UbuntuHelp:Installation/LVMOnRaid|српски / srpski| [[::Installation/LVMOnRaid/sr|српски / srpski]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/sv | • {{#if: UbuntuHelp:Installation/LVMOnRaid|svenska| [[::Installation/LVMOnRaid/sv|svenska]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/th | • {{#if: UbuntuHelp:Installation/LVMOnRaid|ไทย| [[::Installation/LVMOnRaid/th|ไทย]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/tr | • {{#if: UbuntuHelp:Installation/LVMOnRaid|Türkçe| [[::Installation/LVMOnRaid/tr|Türkçe]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/vi | • {{#if: UbuntuHelp:Installation/LVMOnRaid|Tiếng Việt| [[::Installation/LVMOnRaid/vi|Tiếng Việt]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/yue | • {{#if: UbuntuHelp:Installation/LVMOnRaid|粵語| [[::Installation/LVMOnRaid/yue|粵語]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/zh | • {{#if: UbuntuHelp:Installation/LVMOnRaid|中文| [[::Installation/LVMOnRaid/zh|中文]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/zh-hans | • {{#if: UbuntuHelp:Installation/LVMOnRaid|中文(简体)| [[::Installation/LVMOnRaid/zh-hans|中文(简体)]]}}|}} {{#ifexist: {{#if: UbuntuHelp:Installation/LVMOnRaid | UbuntuHelp:Installation/LVMOnRaid | {{#if: | :}}Installation/LVMOnRaid}}/zh-hant | • {{#if: UbuntuHelp:Installation/LVMOnRaid|中文(繁體)| [[::Installation/LVMOnRaid/zh-hant|中文(繁體)]]}}|}} |
{{#ifeq:UbuntuHelp:Installation/LVMOnRaid|:Installation/LVMOnRaid|请不要直接编辑翻译本页,本页将定期与来源同步。}} |
{{#ifexist: :Installation/LVMOnRaid/zh | | {{#ifexist: Installation/LVMOnRaid/zh | | {{#ifeq: {{#titleparts:Installation/LVMOnRaid|1|-1|}} | zh | | }} }} }} {{#ifeq: {{#titleparts:Installation/LVMOnRaid|1|-1|}} | zh | | }}
<<Include(Tag/ContentCleanup)>> <<Include(Tag/StyleCleanup)>> In order to perform this install you will need the Alternate ISO image and have to use the text based installer. Updates are here to support an intial install to a new RAID and onto an existing RAID.
For a New Installation
See below for an existing RAID install - Process is pretty similiar. (Was a 5.x process) This was done on 6.x I'm doing this from memory but it should be pretty close. This was a really simple process on 6.x
Expectations
- You know how to partition and setup your drives - This won't prescribe a drive setup, but covers some necessities.
- You have burned a copy of the Alternate ISO and are using the text based installer.
Drive Setup
- In my example I have 4 drives and a CDROM, no Floppy.
- I used one drive /boot and /Swap with 50Meg for /boot and 1gig-50Meg for /Swap (Better performance with Swap seperate)
- You can create Primary partitions on your drives of equal size to make them ready for the RAID setup. Leverage excess space as you think is acceptable or just leave as wasted.
- I'm using Raid 5 on 3 Drives intended to mount as /root
- My drives were ~10Gig so some space was wasted.
- With a typical setup - some drives are master and some are slave - it doesn't matter at this point in terms of will it work.
- I booted to the live CD and partitioned my drives before the install in the GUI with GParted. I recommend this for the first time installers.
Install
- Boot from the Ubuntu alternate ISO 6.x
- Follow the directions to drive setup and choose manual partition
- Setup /boot and /Swap in the manual setup - mark /boot as bootable. I formatted as ext2
- Choose configure RAID option
- Tell it how many disks you have and then select them from the menu.
- The RAID (Md0) is now in the list => open it.
- Set MD0 as / for the root and ext3 files - say yes to format it.
- Select finish
- should continue just like a normal setup. Really nice.
++ Ubuntu 5.10 ++ Installing onto a Software RAID array, and using LVM for all of your volumes (including root and boot) is well supported in Ubuntu 5.10 (Breezy Badger). You will be able to do almost everything you need to do directly from the Ubuntu installer. This page will describe how to do this, aswell as any gotcha's you might run into. Also included is a section on how to migrate a machine from a different linux distro that is running Software RAID. If you are doing this on a previous Ubuntu release, this is much more difficult. These directions Installation/RAID1 may help.
Expectations/Caveats
- All partitions will be on the raid array
- All partitions will be LVM volumes
- Swap will be on LVM/RAID
- This is probably a small performance penalty during swapouts
- If swap wasn't on RAID however, a single drive failure could cause the system to go down
- Root/Boot will be on LVM/RAID
- No need to manually synchronize your root partitions between your RAID-1 drives
- In the case of a drive failure while the system is powered down, you will be able to boot off either drive (assuming your bios can boot off of either drive)
- GRUB will not work, LILO is the only viable bootloader (at this time)
- IMPORTANT - If you load the EVMSGUI or EVMSN, it will get confused and think it's found an LVM partition on `/dev/hdX`, but a few bytes offset. You do not have an LVM partition on your block devices, you have it on `/dev/md0`. You need to configure EVMS so that this doesn't happen.
- This guide has only been tested on an i686 install
Installing over an Existing RAID Array
This is what I actually did, while writing these directions. Obviously I expect my directions to work from a scatch install, but that's not what I actually did. I was upgrading from a Debian Woody, RAID-1 (two drives mirror), EVMS for volume control, that had root/boot and swap on non-RAID. I decided that I didn't want to 'upgrade' my debian install to ubuntu, I wanted to destroy it and rebuild it. However, I didn't want to risk loosing all of my data. I decided what I wanted to do was yank one of the drives from the array, and keep it in reserve. I would do a full install on the first drive, once I confirmed everything was working, I would reattach the drive kept in reserve, copy my drive to the first one, then add the reserve drive to the RAID-1 array. If I had wanted to use my old EVMS volumes and partitions, I believe I could have, however I wanted to get root/boot + swap onto RAID and LVM. I have embedded the directions on how to install over an existing RAID array into the main directions, the directions associated with this type of upgrade are marked with a {i} icon. Although these directions should allow you to not need to backup your data, if you care about your data at all, you will have a second backup available if something goes wrong.
Installation
These directions can be easily tweaked for any RAID level. I'll explain as if you're doing RAID-1. If you're doing something else, you're probably smart enough to tweak the directions yourself. Any directions marked with {i} are for the Existing RAID array upgrade. You need to ignore these if you are doing a fresh install.
- Install both drives into the machine
- {i} Actually, disconnect one of the drives from the machine. You should pull the drive that is second in the bootup process. This will mean you don't have to wait for the entire drive to sync before you can boot later on in the process. You will proceed with the full install on one drive, then insert the second drive later. This allows you to always revert to your old mirror if you have to (assuming your old stuff worked!)
- Boot off of the Ubuntu installation CD
- Server or desktop install is fine, choose as appropriate
- When it prompts you to format the drive, or manually partition, choose manually partition
- Delete any and all existing partitions on both drives
- {i} You only have one drive installed, so just clear out this drive. You'll do the other one later
- Create a new primary partition. Use the entire disk. Make it a RAID partition.
- Mark it as bootable
- Choose the Configure RAID option
- It'll probably ask you to write your partition table. Go ahead
- Create your MD device, choose your raid level, and tell it how many disks you have
- {i} Configure as RAID-1. When asked how many disks you have, tell it two, even though your second disk is sitting on your desk. Your raid array will be degraded (since it's missing the disk sitting on your desk)
- Add devices to the MD device as appropriate
- Select Finish in the Configure RAID screen
- Set the partition of your raid device as a physical volume for LVM
- Choose Configure LVM
- At this point I got an error from the installer. Something like error informing kernel - invalid argument for /dev/md/0p1.
- I rebooted to let everything get synced to disk, and tried again. Same error. I just ignored it. Everything was okay. I don't know if the reboot was necessary. Probably not.
- Create your volume group (I used vg1)
- Use /dev/md0 as the PV
- Create your LVs
- I don't make a partition for boot, I just put it on root. (Since there's no need for a separate boot)
- Don't forget swap
- Select Finish in the Configure LVM screen
- Configure your partitions. Make ext3 file systems on each of the volumes, and mount them in appropriate places (root, usr, var, home, swap)
- Write partitions (ignore the kernel error)
- The installation could continue normally, and everything should work just dandy.
- The installer will automatically use lilo for you instead of grub
- You are now complete, you should test your RAID array for durability (EG: disconnect drives, make sure you can boot off both drives) before you trust it
- {i} You are not done yet.
- {i} Once you've finished your install, get your system all working and ready to copy in your old data
- {i} Hook up your old RAID-1 drive, and boot off of an ubuntu live CD.
- {i} IMPORTANT - you must boot from a live CD. Do not boot your system with both drives hooked up, this may result in data loss.
- {i} Once booted on the live CD, you should mount your new logical volumes, and mount your old logical volumes.
- {i} Copy data from your old LVs to your new LVs as appropriate
- {i} Continue with these directions only when you are prepared and ready to destroy your old disk
- {i} fdisk your old drive, delete all partitions (`fdisk /dev/hde`)
- {i} Create a single primary partition, using the whole disk, mark it as typeID `FD` (Linux raid auto)
- {i} write the partition table
- {i} Most likely it'll tell you to reboot. Reboot, and boot off of the live CD again
- {i} Add the new drive to the RAID array
- {i} `mdadm /dev/md0 --add /dev/hde1` (or whatever your block device+partition is)
- {i} Your devices will start resyncing immediately. If you yanked the second drive in the bootup process, feel free to reboot anytime and boot up regularly, since it'll boot off of the working drive first.