linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* mdadm -f ?
@ 2005-06-29 12:23 Mitchell Laks
  2005-07-04  7:06 ` Neil Brown
  0 siblings, 1 reply; 2+ messages in thread
From: Mitchell Laks @ 2005-06-29 12:23 UTC (permalink / raw)
  To: linux-raid

Hi,
I described  on this list (a few days ago) how I physically removed one of 2 
drives from a raid 1 array. I then took it to another computer to use it as a 
second copy of the data.



That worked fine, although I described at that time that my linux box would  
not boot normally until I ran mdadm -A --run /dev/md0 /dev/hdb1 
with the --run option
as the raid 1 would not start in the degraded state otherwise.

I was wondering. 

imagine I have /dev/md0 composed of /dev/hdb1 and /dev/hdg1

What is the effect  of the command


mdadm --manage /dev/md0 -f /dev/hdg1

Ie: If I "fail" the drive in this way:
1) will the remainder of the array (ie /dev/md0 composed of /dev/hdb1) now 
boot without the --run being added in?
2) Will I still be able to take the drive /dev/hdg1 and use it on another 
machine as a copy of the data from the array?
3) If the  answer to 2 is no, should I do
	a) remove drive /dev/hdg1 physically (machine off)
	b) then after booting without /dev/hdg1 via the --run 
		run the command 	
		mdadm --manage /dev/md0 -f /dev/hdg1 (even though it is  not on the 
machine...
		then will it boot without the --run added in.

thanks,

I am simply not sure of what -f does...

Thanks,

Mitchell 

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: mdadm -f ?
  2005-06-29 12:23 mdadm -f ? Mitchell Laks
@ 2005-07-04  7:06 ` Neil Brown
  0 siblings, 0 replies; 2+ messages in thread
From: Neil Brown @ 2005-07-04  7:06 UTC (permalink / raw)
  To: Mitchell Laks; +Cc: linux-raid

On Wednesday June 29, mlaks@verizon.net wrote:
> Hi,
> I described  on this list (a few days ago) how I physically removed one of 2 
> drives from a raid 1 array. I then took it to another computer to use it as a 
> second copy of the data.
> 
> 
> 
> That worked fine, although I described at that time that my linux box would  
> not boot normally until I ran mdadm -A --run /dev/md0 /dev/hdb1 
> with the --run option
> as the raid 1 would not start in the degraded state otherwise.

This is a safety feature of mdadm.  It makes it harder to accidentally
started an array without all devices being present.
mdadm will only start a degraded array if "--run" is explicitly given,
or if it is starting it under "--assemble --scan", and it has searched
for drives itself and not found them all.


> 
> I was wondering. 
> 
> imagine I have /dev/md0 composed of /dev/hdb1 and /dev/hdg1
> 
> What is the effect  of the command
> 
> 
> mdadm --manage /dev/md0 -f /dev/hdg1
> 
> Ie: If I "fail" the drive in this way:
> 1) will the remainder of the array (ie /dev/md0 composed of /dev/hdb1) now 
> boot without the --run being added in?

See above.  If you are using mdadm.conf and "mdadm -As" to start the
arrays, the fact that one is missing isn't a problem.


> 2) Will I still be able to take the drive /dev/hdg1 and use it on another 
> machine as a copy of the data from the array?

Yes, this should work.

> 3) If the  answer to 2 is no, should I do
> 	a) remove drive /dev/hdg1 physically (machine off)
> 	b) then after booting without /dev/hdg1 via the --run 
> 		run the command 	
> 		mdadm --manage /dev/md0 -f /dev/hdg1 (even though it is  not on the 
> machine...

This is meaningless in the context.  You cannot fail a drive that
isn't present.

> 		then will it boot without the --run added in.

See above for when --run is needed.


> 
> thanks,
> 
> I am simply not sure of what -f does...

It simulates an error on that drive and causes it to be excluded from
the array.  No further IO is performed to the drive by md.

NeilBrown

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2005-07-04  7:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-06-29 12:23 mdadm -f ? Mitchell Laks
2005-07-04  7:06 ` 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).