* modifying a running array
@ 2004-11-15 12:35 Lieven Van Acker
2004-11-15 15:19 ` David Greaves
2004-11-15 21:55 ` Neil Brown
0 siblings, 2 replies; 3+ messages in thread
From: Lieven Van Acker @ 2004-11-15 12:35 UTC (permalink / raw)
To: linux-raid
Hey folks,
I didn't find any direct pointers on this issue, so maybe you experts
can advice me...
I was setting up a system, had only one disk at setup time but wanted to
configure raid 1 in advance...
so I used
mdadm --create /dev/md0 --force --run --level=1 --raid-devices=1
/dev/sda1
to create my array.
Now as I have the second disk available, after duplicating the partition
table I wanted to add add /dev/sdb1 to the array.
But
mdadm /dev/md0 -a /dev/sdb1
adds this device as a spare one, so the number of active devices stays
1. I could use the build command to reinitialise the array, but I wonder
if there's a way to extend the raiddevice while it's running?
Is there any way to arrange this?
Regards,
Lieven
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: modifying a running array
2004-11-15 12:35 modifying a running array Lieven Van Acker
@ 2004-11-15 15:19 ` David Greaves
2004-11-15 21:55 ` Neil Brown
1 sibling, 0 replies; 3+ messages in thread
From: David Greaves @ 2004-11-15 15:19 UTC (permalink / raw)
To: Lieven Van Acker; +Cc: linux-raid
Lieven Van Acker wrote:
>Hey folks,
>
>I didn't find any direct pointers on this issue, so maybe you experts
>can advice me...
>
>I was setting up a system, had only one disk at setup time but wanted to
>configure raid 1 in advance...
>
>so I used
>
>mdadm --create /dev/md0 --force --run --level=1 --raid-devices=1
>/dev/sda1
>
>
On your new disk try this:
mdadm --create /dev/md1 --level=1 --raid-devices=2 /dev/sdb1 missing
Then make a filesystem on it and copy over the data from /dev/md0
then stop /dev/md0
Once you've done all that try:
mdadm /dev/md1 -a /dev/sda1
I think that'll get you where you want to be.
you may want to hang back a while in case I made a typo ;)
David
PS from the manpage:
Setting a value of 1 is probably a mistake and so requires that --force
be specified first.
Guess what ;)
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: modifying a running array
2004-11-15 12:35 modifying a running array Lieven Van Acker
2004-11-15 15:19 ` David Greaves
@ 2004-11-15 21:55 ` Neil Brown
1 sibling, 0 replies; 3+ messages in thread
From: Neil Brown @ 2004-11-15 21:55 UTC (permalink / raw)
To: Lieven Van Acker; +Cc: linux-raid
On Monday November 15, lieven.vanacker@ugent.be wrote:
> Hey folks,
>
> I didn't find any direct pointers on this issue, so maybe you experts
> can advice me...
>
> I was setting up a system, had only one disk at setup time but wanted to
> configure raid 1 in advance...
>
> so I used
>
> mdadm --create /dev/md0 --force --run --level=1 --raid-devices=1
> /dev/sda1
>
> to create my array.
>
> Now as I have the second disk available, after duplicating the partition
> table I wanted to add add /dev/sdb1 to the array.
>
> But
>
> mdadm /dev/md0 -a /dev/sdb1
>
> adds this device as a spare one, so the number of active devices stays
> 1. I could use the build command to reinitialise the array, but I wonder
> if there's a way to extend the raiddevice while it's running?
If you are running a recent 2.6 kernel and have a recent mdadm, then
mdadm --grow /dev/md0 --raid-devices 2
will convert /dev/md0 to a 2 device raid1 array, and the spare will
start being reconstructed.
NeilBrown
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2004-11-15 21:55 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2004-11-15 12:35 modifying a running array Lieven Van Acker
2004-11-15 15:19 ` David Greaves
2004-11-15 21:55 ` Neil Brown
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).