3

I'm building a raid1 (ok it will probably be a raid10,f2 but the difference with 2 drives... isn't much) system with 2 1TB drives. However, 1 of the drives I've ordered is bad so I'm RMA-ing it. I'm wondering if I could partition and install to the 1 drive and then rebuild the array when I get the second drive (after I test it of course) My initial investigation doesn't show me a way of creating the array without specifying all devices... and the device the second drive will be is one that has data that I will need to migrate (plus it's not big enough). Is it possible that I could create an array without specifying all devices? or specify false ones and reconfigure to the right ones later? Or some other method I'm not thinking of.

peterh
  • 4,914
  • 13
  • 29
  • 44
xenoterracide
  • 1,476
  • 2
  • 12
  • 26

1 Answers1

4

mdadm will let you create a new array with a missing device. Name the drive / partition as "missing" in the mdadm command line, like, say:

mdadm --create /dev/md0 --level=raid1 --raid-devices=2 /dev/sda1 missing

You can add the second drive to the array when you get it back:

mdadm --manage /dev/md0 --add /dev/sdb1

Given that you've had one of these drives fail already I'd question the wisdom in using the other drive until you've got the first one back from RMA.

Evan Anderson
  • 141,071
  • 19
  • 191
  • 328
  • I been testing this drive with badblocks and smartctl for about a week. the other drive was definitely DOA it found badblocks in maybe an hour or so. besides I'm going to make sure my data is backed up. This old drive isn't going anywhere. I'll try these commands thanks. – xenoterracide May 14 '10 at 01:07