[Date Prev][Date Next] [Thread Prev][Thread Next] [Date Index] [Thread Index]

Re: RAID



On Friday 20 April 2007 20:25, John Jason Jordan wrote:
> What I want to do now is create one more RAID 1 partition, using the
> rest of the disk. From what you say, and the silence of others, there
> is no way to do this from within Etch.

The following instructions are from memory.  I'm not going to wipe
out and rebuild a system to test them.  Follow them with caution,
there may be mistakes.  Try to read up on MD (and LVM) and understand
what you're going to do before you do it.  Check my suggestions against
the man pages and against the actual configuration of your system.

Use fdisk to create the additional partitions on each drive, and to
set their partition types to 'fd'.  I don't know what your new
partitions will be called but for the purposes of this example I'll
call them /dev/hda9 and /dev/hdb9.

"cat /etc/mdstat" and choose a /dev/mdN that isn't being used.  For
example if you have no MD devices you'd use /dev/md0, which is what
I will use in this example.

Create the new /dev/md0:
  mdadm -C /dev/md0 -n 2 -l raid1 /dev/hda9 /dev/hdb9

You could then make a filesystem on /dev/md0 and create a mountpoint
and add a line to /etc/fstab.

Better still would be to turn /dev/md0 into a LVM physical volume
(using pvcreate), create a volume group containing that physical
volume (using vgcreate), and then create a logical volume using
some of that space (using lvcreate).  You can then create the new
filesystem in the new logical volume.  This gives you much more
scope for creating, deleting, and resizing filesystems.

--Mike Bird



Reply to: