Skip to contentSkip to conversation

mdadm -c magic?

DISCUSSION Robert L. Harris 2 participants 3 messages Feb 20, 2003 MD RAID

lore
Share & tools
lore
#0 lore raw

Situation, I need to get a RAID5 array online ASAP. It's to be 4 160Gig IDE drives on a 3ware raid controller.

One hitch, I just lit up the box and started to mess with the disks to make the array and it seems one disk is having "issues"... I'm sending it off for RMA which can take 1-2 weeks easily.

Is it possible to have mdadm make the array and just leave the one spot open anyway? I tried a few options:

[email protected]:~# mdadm -C -c 128  -l 5 -p left-asymmetric -n 4 -x 0=
 /dev/md3 /dev/sdm1 /dev/sdn1 /dev/sdo1 /dev/sdp1
mdadm: /dev/sdm1 appears to contain an ext2fs file system
    size=3D480238464K  mtime=3DTue Dec  3 11:11:22 2002
mdadm: /dev/sdm1 appear to be part of a raid array:
    level=3D5 disks=3D4 ctime=3DTue Dec  3 10:48:56 2002
mdadm: /dev/sdo1 appear to be part of a raid array:
    level=3D5 disks=3D4 ctime=3DTue Dec  3 10:48:56 2002
mdadm: Cannot open /dev/sdp1: No such file or directory
mdadm: create aborted
[email protected]:~# mdadm -C -c 128  -l 5 -p left-asymmetric -n 4 -x 0=
 /dev/md3 /dev/sdm1 /dev/sdn1 /dev/sdo1
mdadm: You haven't given enough devices (real or missing) to create this ar=
ray

I figured trying to create it with 3 drives and then adding a 4th would just make that 4th a spare. Yes I know it's not very redundant with 3 of 4 drives but atleast I can get it online and start testing with light data load. If it fails another disk I won't be any farther behind than if I just waited...

Robert

:wq!
---------------------------------------------------------------------------
Robert L. Harris | PGP Key ID: E344DA3B

                                         @ x-hkp://pgp.mit.edu=20

DISCLAIMER:
These are MY OPINIONS ALONE. I speak for no-one else.
FYI:
perl -e 'print $i=3Dpack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10)=
;'

#1 lore raw
Quoted 11 lines · Robert L. Harris

Is it possible to have mdadm make the array and just leave the one spot open anyway? I tried a few options:

[email protected]:~# mdadm -C -c 128  -l 5 -p left-asymmetric -n 4 -x 0=
 /dev/md3 /dev/sdm1 /dev/sdn1 /dev/sdo1 /dev/sdp1
[snip]
mdadm: create aborted
[email protected]:~# mdadm -C -c 128  -l 5 -p left-asymmetric -n 4 -x 0=
 /dev/md3 /dev/sdm1 /dev/sdn1 /dev/sdo1
mdadm: You haven't given enough devices (real or missing) to create this ar=
ray

Try using the keyword 'missing' in place of a real disk or partition:

# mdadm -C /dev/md3 -c 128 -l 5 -n 4 /dev/sdm1 /dev/sdn1 /dev/sdo1 missing

That should give you a 3-disk RAID-5 in degraded mode. I think that's what you want. Add the fourth disk when it shows up and the array will resync.

#2 lore raw

Bingo. Thank you very much.

Thus spake Derek Vadala ([email protected]):

Quoted 14 lines · Robert L. Harris
Quoted 4 lines

Is it possible to have mdadm make the array and just leave the one spot open anyway? I tried a few options:

Quoted 8 lines
[email protected]:~# mdadm -C -c 128  -l 5 -p left-asymmetric -n 4 -x 0=
 /dev/md3 /dev/sdm1 /dev/sdn1 /dev/sdo1 /dev/sdp1
[snip]
mdadm: create aborted
[email protected]:~# mdadm -C -c 128  -l 5 -p left-asymmetric -n 4 -x 0=
 /dev/md3 /dev/sdm1 /dev/sdn1 /dev/sdo1
mdadm: You haven't given enough devices (real or missing) to create this ar=
ray
Quoted 7 lines

Try using the keyword 'missing' in place of a real disk or partition:

# mdadm -C /dev/md3 -c 128 -l 5 -n 4 /dev/sdm1 /dev/sdn1 /dev/sdo1 missing

That should give you a 3-disk RAID-5 in degraded mode. I think that's what you want. Add the fourth disk when it shows up and the array will resync.

:wq!
---------------------------------------------------------------------------
Robert L. Harris | PGP Key ID: E344DA3B

                                         @ x-hkp://pgp.mit.edu 

DISCLAIMER:
These are MY OPINIONS ALONE. I speak for no-one else.
FYI:
perl -e 'print $i=pack(c5,(41*2),sqrt(7056),(unpack(c,H)-2),oct(115),10);'