[prev in list] [next in list] [prev in thread] [next in thread] 

List:       suse-amd64
Subject:    Re: [suse-amd64] creating a raid1 device via mdadm (at the beginning with only one hd)
From:       Martti Laaksonen <martti.laaksonen () sci ! fi>
Date:       2006-08-16 8:29:36
Message-ID: 790DD583-CA22-47FE-9006-C321682F788B () sci ! fi
[Download RAW message or body]


Tob_Sch@gmx.de kirjoitti 16.8.2006 kello 10.28:

> So my questions are:
> 1. How can I setup a raid1 device with only one valid disk with the  
> intention to extend the raid1 device later with a second valid disk?

Quote from the mdadm man page:

"To create a "degraded" array in which some devices are missing,  
simply give the word "missing" in  place  of device  name. This will  
cause mdadm to leave the corresponding slot in the array empty."

So, your initial attempt was almost correct. Just change it to:

mdadm -C /dev/md0 -l raid1 -n 2 /dev/hda1 missing

and you should be good to go.

> 2. How can change a spare device to a active (raid1) device without  
> recreating the raid1 md device?

I haven't tried this myself, but you should first add the new device  
with

mdadm -a /dev/md0 /dev/hdb1

This will make it a spare disk. Then change the number of active  
devices in raid1 with

mdadm --grow /dev/md0 -n 2

I hope these instructions will help you.


-- Martti Laaksonen

-- 
Check the List-Unsubscribe header to unsubscribe
For additional commands, email: suse-amd64-help@suse.com

[prev in list] [next in list] [prev in thread] [next in thread] 

Configure | About | News | Add a list | Sponsored by KoreLogic