All of lore.kernel.org
 help / color / mirror / Atom feed
* Configuring RAID5 w/ Spare?
@ 2010-03-11 18:11 Carlos Mennens
  2010-03-11 18:16 ` Brendan Conoboy
  0 siblings, 1 reply; 4+ messages in thread
From: Carlos Mennens @ 2010-03-11 18:11 UTC (permalink / raw)
  To: Mdadm

 have a machine that supports 4 S-ATA drives. I have all identical
drives in each slot. I am asking for someone to please tell me how I
can create a RAID5 array on Linux and then also have the 4th drive
(/dev/sdd) as a hot spare for any of the three drives in the array /
volume?

I did the following:

/device = type @ parition size

/dev/sda1 = fd @ 100 MB (bootable for /boot)
/dev/sda2 = fd @ 1 GB (Going to be used for Swap)
/dev/sda3 = fd @ 300 GB (Going to be used for /)

Now I make the same thing for /dev/sdb & /dev/sdc. I DON'T PARTITION
OR FORMAT /dev/sdd.

Now I am creating my RAID and this is where I am confused. How do I
correctly issue the 'mdadm' command to create the volumes for my
filesystem and also utilize /dev/sdd as a hot spare?

(/boot)

mdadm --create /dev/md0 --level=1 --raid-devices=3 /dev/sda1 /dev/sdb1
/dev/sdc1 --spare-devices=1 /dev/sdd
(Swap)

mdadm --create /dev/md1 --level=1 --raid-devices=3 /dev/sda2 /dev/sdb2
/dev/sdc2 --spare-devices=1 /dev/sdd
(/)

mdadm --create /dev/md2 --level=5 --raid-devices=3 /dev/sda3 /dev/sdb3
/dev/sdc3 --spare-devices=1 /dev/sdd
Is that correct above or would I 1st have to partition the /dev/sdd drive?

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Configuring RAID5 w/ Spare?
  2010-03-11 18:11 Configuring RAID5 w/ Spare? Carlos Mennens
@ 2010-03-11 18:16 ` Brendan Conoboy
  2010-03-11 18:18   ` Carlos Mennens
  0 siblings, 1 reply; 4+ messages in thread
From: Brendan Conoboy @ 2010-03-11 18:16 UTC (permalink / raw)
  To: Carlos Mennens; +Cc: Mdadm

On 03/11/2010 11:11 AM, Carlos Mennens wrote:
> Now I make the same thing for /dev/sdb&  /dev/sdc. I DON'T PARTITION
> OR FORMAT /dev/sdd.

Why not partition?  It's possible to create a floating spare, but it 
doesn't really make sense for the configuration you've described.  Just 
add identical partitions on sdd and include the respective partitions on 
each of your array creation commands.

-- 
Brendan Conoboy / Red Hat, Inc. / blc@redhat.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Configuring RAID5 w/ Spare?
  2010-03-11 18:16 ` Brendan Conoboy
@ 2010-03-11 18:18   ` Carlos Mennens
  2010-03-11 18:24     ` Brendan Conoboy
  0 siblings, 1 reply; 4+ messages in thread
From: Carlos Mennens @ 2010-03-11 18:18 UTC (permalink / raw)
  To: Mdadm

On Thu, Mar 11, 2010 at 1:16 PM, Brendan Conoboy <blc@redhat.com> wrote:
> Why not partition?  It's possible to create a floating spare, but it doesn't
> really make sense for the configuration you've described.  Just add
> identical partitions on sdd and include the respective partitions on each of
> your array creation commands.

OK so you're just saying all I should change is partition /dev/sdd as
I did the rest? I don't however need to format this when installing my
Linux O.S., correct? I should just skip formatting and mount point
assignment since it's a hot spare?
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

^ permalink raw reply	[flat|nested] 4+ messages in thread

* Re: Configuring RAID5 w/ Spare?
  2010-03-11 18:18   ` Carlos Mennens
@ 2010-03-11 18:24     ` Brendan Conoboy
  0 siblings, 0 replies; 4+ messages in thread
From: Brendan Conoboy @ 2010-03-11 18:24 UTC (permalink / raw)
  To: Carlos Mennens; +Cc: linux-raid list

On 03/11/2010 11:18 AM, Carlos Mennens wrote:
> OK so you're just saying all I should change is partition /dev/sdd as
> I did the rest? I don't however need to format this when installing my
> Linux O.S., correct? I should just skip formatting and mount point
> assignment since it's a hot spare?

Right.  In reality the only "formatting" that takes place on these 
partitions is when you run the mdadm command: It combines the partitions 
according to your command line arguments, producing a new block device, 
/dev/mdX.  It's /dev/mdX that you format (or put LVM on, then create a 
physical volume.. then a volume group... then a logical volume... then 
format that with a filesystem).

-- 
Brendan Conoboy / Red Hat, Inc. / blc@redhat.com

^ permalink raw reply	[flat|nested] 4+ messages in thread

end of thread, other threads:[~2010-03-11 18:24 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2010-03-11 18:11 Configuring RAID5 w/ Spare? Carlos Mennens
2010-03-11 18:16 ` Brendan Conoboy
2010-03-11 18:18   ` Carlos Mennens
2010-03-11 18:24     ` Brendan Conoboy

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.