Re: Recipe for Mirrored OS Drives
On Tue, 03 Oct 2006, David Greaves prattled cheerily: > FYI I've done quite a bit on the Howto section: > http://linux-raid.osdl.org/index.php/Overview Ka wow. > It still needs a lot of work I think but it's getting there... Yeah: the `booting on RAID' and RAID_Boot could be merged, and it certainly could do with a refactor and update. But it's a *lot* better than having it rotting in a HOWTO. I'll look at it shortly. -- `In typical emacs fashion, it is both absurdly ornate and still not really what one wanted.' --- jdev - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Recipe for Mirrored OS Drives
Nix wrote: > On 2 Oct 2006, David Greaves spake: >> I suggest you link from http://linux-raid.osdl.org/index.php/RAID_Boot > > The pages don't really have the same purpose. RAID_Boot is `how to boot > your RAID system using initramfs'; this is `how to set up a RAID system > in the first place', i.e., setup. > > I'll give it a bit of a tweak-and-rename in a bit. > Fair :) FYI I've done quite a bit on the Howto section: http://linux-raid.osdl.org/index.php/Overview It still needs a lot of work I think but it's getting there... David -- - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Recipe for Mirrored OS Drives
On Sun, Oct 01, 2006 at 07:45:46PM -0400, andy liebman wrote: > -- Run rsync to copy contents from your existing OS drive > > rsync -av /mnt/oldroot /mnt/newroot > rsync -av /mnt/oldhome /mnt/newhome At least add the -H flag to copy hardlinks. -S for sparse files might also be useful. Erik -- +-- Erik Mouw -- www.harddisk-recovery.com -- +31 70 370 12 90 -- | Lab address: Delftechpark 26, 2628 XH, Delft, The Netherlands - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Recipe for Mirrored OS Drives
On 2 Oct 2006, David Greaves spake: > I suggest you link from http://linux-raid.osdl.org/index.php/RAID_Boot The pages don't really have the same purpose. RAID_Boot is `how to boot your RAID system using initramfs'; this is `how to set up a RAID system in the first place', i.e., setup. I'll give it a bit of a tweak-and-rename in a bit. -- `In typical emacs fashion, it is both absurdly ornate and still not really what one wanted.' --- jdev - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Recipe for Mirrored OS Drives
andy liebman wrote: > >> >> Feel free to add it here: >> http://linux-raid.osdl.org/index.php/Main_Page >> >> I haven't been able to do much for a few weeks (typical - I find some >> time and >> use it all up just getting the basic setup done - still it's started!) >> >> David >> > > Any hints on how to add a page? > > Andy > Yep :) First off it would help to read up on Wikis : http://meta.wikimedia.org/wiki/Help:Contents Basically you: * go to the page where you want to link from * edit that page to link to your new (not yet created) page * save your edit * click on the (red) link and you'll be given a page to edit * type... I suggest you link from http://linux-raid.osdl.org/index.php/RAID_Boot David -- - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Recipe for Mirrored OS Drives
Feel free to add it here: http://linux-raid.osdl.org/index.php/Main_Page I haven't been able to do much for a few weeks (typical - I find some time and use it all up just getting the basic setup done - still it's started!) David Any hints on how to add a page? Andy - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Re: Recipe for Mirrored OS Drives
andy liebman wrote: > A few weeks ago, I promised that I would put my "recipe" here for > creating "mirrored OS drives from an existing OS Drive". This "recipe" > combines what I learned from MANY OTHER sometimes conflicting documents > on the same subject -- documents that were probably developed for > earlier kernels and distributions. Feel free to add it here: http://linux-raid.osdl.org/index.php/Main_Page I haven't been able to do much for a few weeks (typical - I find some time and use it all up just getting the basic setup done - still it's started!) David - To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [EMAIL PROTECTED] More majordomo info at http://vger.kernel.org/majordomo-info.html
Recipe for Mirrored OS Drives
A few weeks ago, I promised that I would put my "recipe" here for creating "mirrored OS drives from an existing OS Drive". This "recipe" combines what I learned from MANY OTHER sometimes conflicting documents on the same subject -- documents that were probably developed for earlier kernels and distributions. I tried to follow the other instructions and always found that some steps didn't work for me or weren't necessary, or that some important steps were missing. I hope my recipe helps others who are trying to create mirrored drives with their recent Linux distributions. Please keep in mind the following: 1) This recipe works with recent 2.6.x kernels and recent Linux distributions that use UDEV. Older distributions that rely on DEVFS and that include older versions of mdadm probably will require some variations in the steps. I tested this with Mandriva 2006 and a 2.6.16 kernel. 2) This recipe is designed for SATA drives and a motherboard with SATA controllers that are supported by the current Linux kernels. It might not work with all motherboards. 3) If you have IDE drives instead of SATA drives, you should substitute "/dev/hdX" where I have "/dev/sdX" 4) Many other instructions that I read claimed that it was necessary to create a separate boot partition in order to boot with mirrored drives. I found that I was able to create mirrored OS drives WITHOUT a separate boot partition. FYI -- My installation has three partitions -- the "root" partition "/" as well as a partition for "swap" and "home". You may have a different layout. Just go with the layout to which you are accustomed. 5) This recipe does NOT require compiling RAID drivers or other drivers into the kernel. It uses an "initial ramdisk" (initrd) to load the required drivers during the early stages of booting up. 6) The distribution YOU use may have some important differences from Mandriva 2006. For instance, Mandriva puts the mdadm.conf in /etc/ and some other distributions put it in /etc/mdadm/. In addition, Mandriva doesn't require editing any sort of "initrd.conf" file in order to build a proper initrd so that it includes the required drivers. Your distribution may require you to specify what you want to put in the initrd. Recipe for Creating Mirrored OS Drives from Exiting OS Drive REQUIREMENTS: -- One or Two NEW SATA drives of the same size. If only ONE, you must have an existing SATA drive of the SAME size that you can use as part of your mirrored pairs. -- A Live CD/DVD Linux Distribution such as Mandriva One or Knoppix CAUTION: -- It is probably best to have two NEW SATA drives in addition to an existing SATA OS drive. However, if you decide to use your existing SATA drive as one of your RAID drives, you should back up your existing OS drive. That way, if you make a mistake, you can always put the current SATA OS drive back in your system. For Backup, I highly recommend using Acronis True Image. It's a great, fast, and relatively inexpensive imaging product that allows you to copy your existing OS image from one disk and restore it to another. IF YOU WANT TO SWITCH FROM IDE TO SATA: If you normally boot off of an IDE drive but want to switch to SATA, you can use Acronis True Image make an image from your IDE drive and then restore it to a SATA drive. Then, you only need to edit your /etc/fstab and boot loader configuration file (i.e., /etc/lilo.conf) so that they refer to /dev/sdX instead of /dev/hdX. THE PROCEDURE -- Assuming you already boot from a SATA drive, install a second SATA drive. If you are going to use both drives as members of your mirrored pairs, the NEW drive should be the same size or larger than the first drive. -- Boot your computer as you normally do from the SATA drive. -- Assuming that your existing OS drive comes up as /dev/sda and that the new drive comes up as /dev/sdb, copy the partition layout from /dev/sda to /dev/sdb so that you have identical partition layouts on each disk: sfdisk -d /dev/sda | sfdisk /dev/sdb -- Set the partition type on all /dev/sdb partitions to "raid autodetect -- type fd", except on any EXTENDED PARTITION. For example, assuming your root (/) partition is currently on /dev/sda1, and you have an extended partition on 2, and two logical partitions (swap and home) on 5 and 6: fdisk /dev/sdb ENTER "t" SELECT "1" for partition 1 ENTER "fd" for partition type Repeat for partitions 5 and 6 -- Shutdown your computer -- Reboot using a Live CD/DVD distribution (i.e., Mandriva One, or Knoppix) -- Open a terminal (i.e., KDE's Konsole) and become root. -- Create "degraded mirrored RAIDS" on /dev/sdb1, /dev/sdb5, /dev/sdb6 (or on ALL partitions that are part of your OS drive and that you want to mirror). The basic idea is that your motherboard probably only has built-in support for two SATA drives. In order to copy your ex