<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 3.2//EN">
<HTML>
<HEAD>
<META HTTP-EQUIV="Content-Type" CONTENT="text/html; charset=us-ascii">
<META NAME="Generator" CONTENT="MS Exchange Server version 6.5.7652.24">
<TITLE>Activate/rebuilding with broken disk</TITLE>
</HEAD>
<BODY>
<!-- Converted from text/rtf format -->

<P><FONT SIZE=2 FACE="Arial CE">Hi,</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial CE">I'm writing code to make data recovery (rebuild) with dmraid/device-mapper.</FONT>

<BR><FONT SIZE=2 FACE="Arial CE">Assume I have created and mounted a mirror raid volume with disk A and B.</FONT>

<BR><FONT SIZE=2 FACE="Arial CE"># dmsetup table</FONT>

<BR><FONT SIZE=2 FACE="Arial CE">isw_dgdccjfdbi_test: 0 20971779 mirror core 2 16384 nosync 2 8:16 0 8:32 0 1 handle_errors</FONT>

<BR><FONT SIZE=2 FACE="Arial CE"># dmsetup status</FONT>

<BR><FONT SIZE=2 FACE="Arial CE">isw_dgdccjfdbi_test: 0 20971779 mirror 2 8:16 8:32 1281/1281 1 AA 1 core</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial CE">When I remove one of disk (assume A) and make write or read from that volume I receive dmsetup status with one "AD" (with appropriate patches to kernel).</FONT></P>

<P><FONT SIZE=2 FACE="Arial CE">I can work with one broken disk (assume it is mirror) and device-mapper will take care of next writes/reads to be directed only to device B.</FONT></P>

<P><FONT SIZE=2 FACE="Arial CE">Then I add a new disk C (for example 8:48).</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial CE">Some questions I have:</FONT>

<BR><FONT SIZE=2 FACE="Arial CE">1. How to update device mapper table in a way where device-mapper will know that I have only disk B and C and that C is a new empty disk that should not be used at the moment?</FONT></P>

<P><FONT SIZE=2 FACE="Arial CE">2. If 1 is possible without interrupting system work (volume is still mounted) then is it possible to start rebuilding of disk B to C (also with mounted volume)?</FONT></P>

<P><FONT SIZE=2 FACE="Arial CE">3. During rebuild "dmsetup status" will show rebuild progress from 0//1281 to 1281/1281 - assume it is in the middle 500/1281</FONT></P>

<P><FONT SIZE=2 FACE="Arial CE">A) Does device mapper take care of writes to disk B and C together if they are directed to blocks just recovered?</FONT>

<BR><FONT SIZE=2 FACE="Arial CE">B) Does device mapper take care of writes only to disk B if they are directed to blocks not recovered yet?</FONT>
</P>

<P><FONT SIZE=2 FACE="Arial CE">Regards,</FONT>

<BR><FONT SIZE=2 FACE="Arial CE">Radoslaw Mitura</FONT>
</P>
<BR>

<pre>---------------------------------------------------------------------
Intel Technology Poland sp. z o.o.
z siedziba w Gdansku
ul. Slowackiego 173
80-298 Gdansk

Sad Rejonowy Gdansk Polnoc w Gdansku, 
VII Wydzial Gospodarczy Krajowego Rejestru Sadowego, 
numer KRS 101882

NIP 957-07-52-316
Kapital zakladowy 200.000 zl

This e-mail and any attachments may contain confidential material for
the sole use of the intended recipient(s). Any review or distribution
by others is strictly prohibited. If you are not the intended
recipient, please contact the sender and delete all copies.
</pre></BODY>
</HTML>