Server Fault is a question and answer site for system and network administrators. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

I'm trying to to create a RAID 5 with 4x 2TB disks on Debian 6. I followed the instructions from:

I created the raid with following command: sudo mdadm --create --verbose /dev/md0 --auto=yes --level=5 --raid-devices=4 /dev/sdb1 /dev/sdc1 /dev/sdd1 /dev/sde1

After creating the RAID mdadm --detail /dev/md0 shows me:

    Version : 1.2
 Creation Time : Mon Jun 11 18:14:26 2012
 Raid Level : raid5
 Array Size : 5860535808 (5589.04 GiB 6001.19 GB)
 Used Dev Size : 1953511936 (1863.01 GiB 2000.40 GB)
 Raid Devices : 4
 Total Devices : 4
 Persistence : Superblock is persistent

Update Time : Mon Jun 11 18:14:26 2012
      State : clean, degraded
Active Devices : 3
Working Devices : 4
Failed Devices : 0
Spare Devices : 1

     Layout : left-symmetric
 Chunk Size : 512K

       Name : rsserver:0  (local to host rsserver)
       UUID : a68c3c99:1ef865e9:5a8a7bdc:64710ed8
     Events : 0

Number   Major   Minor   RaidDevice State
   0       8       17        0      active sync   /dev/sdb1
   1       8       33        1      active sync   /dev/sdc1
   2       8       49        2      active sync   /dev/sdd1
   3       0        0        3      removed

   4       8       65        -      spare   /dev/sde1

Why is there a spare drive? I didn't create one. I don't want to use a spare drive.

share|improve this question
Refer to What are the different widely used RAID levels and when should I consider them? for reasons why RAID 5 is not recommended for large volumes. – Skyhawk Jun 11 '12 at 16:32
Couldn't agree with Miles more - please don't use R5, not unless you're leaving your job very soon anyway. – Chopper3 Jun 11 '12 at 16:41
Check again after the resync has finished. watch -n 60 cat /proc/mdstat will be handy. – Charles Jun 11 '12 at 16:51
Well, I do understand the problems while building and rebuilding the raid. But what to do for such large drives? @Charles: Thanks, I'll check. – R.S. Jun 11 '12 at 16:53
RAID 10 or 6 are the good choices for large drives. – Zoredache Jun 11 '12 at 16:59
up vote 5 down vote accepted

If you really want a Raid5 of your 4 drives (see comments above) you should be able to set the spare-device count to 0 with --spare-devices=0.

share|improve this answer
--spare-devices makes no difference in this case: see… – Jack Douglas Nov 5 '12 at 8:58

From man mdadm:

When creating a RAID5 array, mdadm will automatically create a degraded array with an extra spare drive. This is because building the spare into a degraded array is in general faster than resyncing the parity on a non-degraded, but not clean, array. This feature can be overridden with the --force option.

In other words, once the resync has finished, the spare will be added to the array as you intended, but if you prefer mdadm to build the 'slow' way, use --force.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.