Re: [SLUG] RAID 1 to RAID5 with raidreconf

From: Ian Blenke (icblenke@nks.net)
Date: Thu Oct 14 2004 - 11:49:53 EDT


Mario Lombardo wrote:

>On Wednesday 13 October 2004 17:43, steve szmidt wrote:
>
>
>>On Wednesday 13 October 2004 04:07 pm, Mario Lombardo wrote:
>>
>>
>>>I thought it was an fdisk'd 0xfd (RAID autodetect) drive as a backup, and
>>>the md driver handles the relaying of the filesystem (ext3 or otherwise)?
>>>It's supposed to be a bare disk?
>>>
>>>
>>The thing to remember is that your RAID 1 drive may not be accessable when
>>you got the RAID 5 system running.
>>
>>To make sure you don't have a problem later, make it a plain ext3 drive.
>>Then mount it to something like /opt/backup.
>>
>>
>>
>
>To make it a "plain ext3 drive," you mean make it an fdisk type 0x83
>partition? I've changed partition types on the fly with no problems except I
>had to reboot.
>
>
Setting the partition type to 0xfd is really for auto-raid detection.
The kernel will look for 0xfd partitions, and attempt to start
metadevices based on a fingerprint scan of the partition (for the RAID
magic).

If you change it to 0x83, you can still specify a raid array by passing
the correct "md=" to the kernel (via "append=" in lilo, or similarly in
grub, et al). For example, the following would tell the kernel to try
and create a /dev/md0 as a raid0 array implicitly using the two physical
partitions /dev/hda2 and /dev/hdc2:

    linux md=1,/dev/hda2,/dev/hdc2

I use this trick all the time when mucking around with building new systems.

Usually, 0xfd partitions are used for any mirrored root filesystem,
while the remaining RAID partitions are typically left as 0x83 and
brought up by a raidtools2 raidstart or appropriate mdadm magic in your
system init scripts.

As for rebooting: if you resize any partitions with fdisk, you will
generally want to reboot to let the kernel re-read the partition table
before trying to use any /dev/ devices representing that partition.
Changing the partition type shouldn't "need" a reboot, as it really only
affects the boot process.

 - Ian

-----------------------------------------------------------------------
This list is provided as an unmoderated internet service by Networked
Knowledge Systems (NKS). Views and opinions expressed in messages
posted are those of the author and do not necessarily reflect the
official policy or position of NKS or any of its employees.



This archive was generated by hypermail 2.1.3 : Fri Aug 01 2014 - 19:44:15 EDT