Re: RAID 1 setup on woody
hiya
to make an existing distro into a raid1 setup after the fact
is a little dangerous to its data ...
- backup your data first
numerous ways to convert /dev/hda into raid1 with hda and hdc
http://www.1U-Raid5.net/HowTo/SW-Raid-HOWTO.txt
( lots of "fun" reading...
- key parts....
- backup your important files
- partition your disks similarly to keep things simple
- make sure your raid partitions are "fd" type ( NOT 83 )
- the "FD" types sorta tells me you cant use an
existing disk... you have to wipe it ( format it too )...
- if its not fs type.... i am not sure that you can
still boot off the other mirror... you cant ??
- learn some raid commands ( dont experiement with real data )
http://www.1U-Raid5.net/HowTo/Commands.uhow2.txt
- raidstart, raidstop, raidhotadd, raidsetfaulty, etc
- mdctl --examine
- cat /proc/mdstat
- mdadd ...
Existing/working raid1 mirror
http://www.1U-Raid5.net/Conf/raid1_root_raid.lilo.conf
http://www.1U-Raid5.net/Conf/raid1_root_raid.raidtab
- pull out a disk and see if it boots in degraded mode
starting from scratch ... "FD" partition and re-installing is about
1hr process ??? and re-store data from backups...
- trying to do stuff from the "middle" might take lots longer
- using a good installer might help too ???
( one that knows how to make root-raid
- if the above is redhat... than make a standalone boot disks
to run in memory... wipe out the disk ... and overwrite / with
debian... and you're done in under an hour ??..
have fun raiding
alvin
http://www.1U-Raid5.net
On Fri, 22 Feb 2002, Dave Sherohman wrote:
> On Fri, Feb 22, 2002 at 10:32:17AM -0800, Richard Weil wrote:
> > I need some help setting up RAID 1 on a fresh Woody
> > install. The software is newer than the docs,
> > particularly for Lilo, so any help from those with
> > experience would be most appreicated.
>
> The Software-RAID-HOWTO got me through this one.
>
> > My hda and hdc drives are identical in size. hda is
> > divided into multiple partitions -- / (/dev/hda2),
> > /boot (/dev/hda1), /home (/dev/hda5), /usr
> > (/dev/hda6), /var (/dev/hda7). There is nothing on hdc
> > yet.
>
> Step 1: Partition hdc just like hda. You should probably set your
> partitions to type FD on both drives if you haven't done so already.
>
> > If anyone has a similar setup already working, I'd
> > love to see their /etc/raidtab
>
> Just lots of sections that look like:
>
> raiddev /dev/md0
> raid-level 1
> nr-raid-disks 2
> nr-spare-disks 0
> persistent-superblock 1
> chunk-size 4
> device /dev/hdg1
> raid-disk 0
> device /dev/hde1
> raid-disk 1
>
> > and lilo.conf files
>
> Pretty bog-standard, aside from the lines:
>
> boot=/dev/md0
> root=/dev/md0
>
> > with a brief description of how to get it working
> > without deleting anything on hda (i.e., reformating
> > the drive).
>
> 1. Partition both drives identically. Make sure that no partitions
> on hdc (except for swap - swap can stripe itself, so don't RAID it)
> are larger than the corresponding partitions on hda.
>
> 2. Install on hda.
>
> 3. Create your /etc/raidtab with an md device for each non-swap
> partition on hda/hdc. For now, set up the last 4 lines of each md
> device like so:
>
> device /dev/hdcX
> raid-disk 0
> device /dev/hdaX
> failed-disk 1
>
> Note that the partition on hdc is listed first and the partition on
> hda is listed as a failed-disk instead of a raid-disk.
>
> 4. Start your RAID devices with raidstart. They will all be
> degraded (due to the "failed" partitions on hda), but that's what you
> want at this point. Format the md devices with, e.g., "mke2fs
> /dev/mdX".
>
> 5. In single-user mode, copy each partition from hda to the
> corresponding md device. After copying the root partition over, edit
> the copy of etc/fstab on the RAID (i.e., /mnt/etc/fstab) to reference
> the appropriate md devices instead of the partitions on hda.
>
> 6. Edit lilo.conf, changing the boot and root devices to /dev/md0
> and re-run lilo.
>
> 7. Reboot. When the system comes back up, use mount to check
> whether your system is mounted from hda or the RAID devices. It
> should now be on RAID.
>
> 8. Change your partition types on hda to FD if you haven't already
> done so, change all the failed-disk directives in /etc/raidtab to
> raid-disk, and add the partitions from hda using raidhotadd.
>
> And you're done. Easy as that.
>
> > - Can I create a single RAID device (md0) that
> > mirrors all of the hda/c, or do I need to create
> > separate RAID devices for each partition(md0, md1,
> > ...,md4)?
>
> I'm not entirely sure whether it's possible to create an uber-RAID
> and partition it using the md driver, but separate md devices works
> fine.
>
> > - Assuming I need one for each partition, what are
> > people's thoughts on skipping / and /boot RAID? This
> > is the most intimidating part from reading the docs,
> > but it would seem to lessen the value of RAID
> > considerably.
>
> There's no reason that / and /boot can't be RAIDed also. If you put
> them on RAID, you'll have to reboot to complete the transition, but
> that's no big deal.
>
> > - Is the Boot+Root+RAID Howto still accurate,
> > particularly for Lilo?
>
> Never read it. Like I said, the Software-RAID-HOWTO seems to be
> sufficient.
>
> > There's now a RAID boot option in Lilo which I'm not
> > sure how it would effect things like boot= and root=.
>
> Not familiar with this option, but I've used the procedure above
> several times (I've got 3 or 4 systems running all-RAID) and it works
> fine with potato's lilo. I can't imagine that woody's would have a
> problem with it.
>
> --
> When we reduce our own liberties to stop terrorism, the terrorists
> have already won. - reverius
>
> Innocence is no protection when governments go bad. - Tom Swiss
>
>
> --
> To UNSUBSCRIBE, email to debian-user-request@lists.debian.org
> with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org
>
Reply to: