* How to move a singleton raid1 drive from raid1 /dev/md2 to /dev/md1
@ 2005-04-07 5:25 Mitchell Laks
2005-04-07 5:41 ` Neil Brown
0 siblings, 1 reply; 3+ messages in thread
From: Mitchell Laks @ 2005-04-07 5:25 UTC (permalink / raw)
To: linux-raid
Hi Software Raid Gurus!:
I have
A1:~# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 hdb1[0] hdg1[1]
244195904 blocks [2/2] [UU]
md1 : active raid1 hdc1[0]
244195904 blocks [1/1] [U]
md2 : active raid1 hde1[0]
244195904 blocks [1/1] [U]
Now I want to take /dev/hde1 and get rid of /dev/md2 and add /dev/hde1
to /dev/md1.
First i made sure that /dev/md2 was unmounted. I then took it out
of /etc/fstab.
Then I did:
A1:~# mdadm /dev/md2 -f /dev/hde1
mdadm: set /dev/hde1 faulty in /dev/md2
Then I tried:
A1:~# mdadm /dev/md2 -r /dev/hde1
mdadm: hot remove failed for /dev/hde1: Device or resource busy
So I didnt know what to do next. So I did
A1:~# mdadm -S /dev/md2
then I did
A1:~# mdadm /dev/md2 -r /dev/hde1
mdadm: cannot get array info for /dev/md2
obviously the wrong thing to do...
A1:~# cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 hdb1[0] hdg1[1]
244195904 blocks [2/2] [UU]
md1 : active raid1 hdc1[0]
244195904 blocks [1/1] [U]
unused devices: <none>
A1:~#
So I decided not to risk anything else, and I turn to you for help. I would
like to take the device /dev/hde1 at this point and add it to /dev/md1 safely
and then sync /dev/md1 to full raid1 status ... Then I would like to adjust
the /etc/mdadm.conf file ...
I guess I dont know the algorithm for ending a raid on a single
drive/partition and then making it subservient to another drive in a raid1
status.
Thank you all for your help!!!!
Mitchell Laks
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to move a singleton raid1 drive from raid1 /dev/md2 to /dev/md1
2005-04-07 5:25 How to move a singleton raid1 drive from raid1 /dev/md2 to /dev/md1 Mitchell Laks
@ 2005-04-07 5:41 ` Neil Brown
2005-04-08 4:29 ` Mitchell Laks
0 siblings, 1 reply; 3+ messages in thread
From: Neil Brown @ 2005-04-07 5:41 UTC (permalink / raw)
To: Mitchell Laks; +Cc: linux-raid
On Thursday April 7, mlaks@verizon.net wrote:
> Hi Software Raid Gurus!:
>
> I have
>
> A1:~# cat /proc/mdstat
> Personalities : [raid1]
> md0 : active raid1 hdb1[0] hdg1[1]
> 244195904 blocks [2/2] [UU]
>
> md1 : active raid1 hdc1[0]
> 244195904 blocks [1/1] [U]
>
> md2 : active raid1 hde1[0]
> 244195904 blocks [1/1] [U]
>
> Now I want to take /dev/hde1 and get rid of /dev/md2 and add /dev/hde1
> to /dev/md1.
md1 is a 1-drive array. You to make it a 2-drive array you need a
recent 2.6 kernel and a recent release of mdadm. If you have these,
then
mdadm -S /dev/md2 # shutdown md2 and release hde1
mdadm /dev/md1 -a /dev/hde1 # add hde1 as a spare in md1
mdadm -G -n2 /dev/md1 # grow md1 to have two devices.
If you don't have 2.6, then you will have to recreate md1 with
the desired number of components, which will require unmounting it.
mdadm -S /dev/md2
mdadm -S /dev/md1
mdadm -C /dev/md1 -l1 -n2 /dev/hdc1 missing
mdadm /dev/md1 -a /dev/hde1
NeilBrown
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: How to move a singleton raid1 drive from raid1 /dev/md2 to /dev/md1
2005-04-07 5:41 ` Neil Brown
@ 2005-04-08 4:29 ` Mitchell Laks
0 siblings, 0 replies; 3+ messages in thread
From: Mitchell Laks @ 2005-04-08 4:29 UTC (permalink / raw)
To: linux-raid
Thanks you Neil!!
i am running debian sarge with 1.9 and kernel 2.6.8
I followed your instructions
mdadm -S /dev/md2 # shutdown md2 and release hde1
mdadm /dev/md1 -a /dev/hde1 # add hde1 as a spare in md1
mdadm -G -n2 /dev/md1 # grow md1 to have two devices.
and now
wustl@A1:~$ cat /proc/mdstat
Personalities : [raid1]
md0 : active raid1 hdb1[0] hdg1[1]
244195904 blocks [2/2] [UU]
md1 : active raid1 hde1[1] hdc1[0]
244195904 blocks [2/2] [UU]
Yay!!!
Thank you very much.
Mitchell
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2005-04-08 4:29 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-04-07 5:25 How to move a singleton raid1 drive from raid1 /dev/md2 to /dev/md1 Mitchell Laks
2005-04-07 5:41 ` Neil Brown
2005-04-08 4:29 ` Mitchell Laks
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).