<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=us-ascii">
<meta name="Generator" content="Microsoft Word 14 (filtered medium)">
<style><!--
/* Font Definitions */
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]-->
</head>
<body lang="EN-US" link="blue" vlink="purple">
<div class="WordSection1">
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Yes, you can assume all zeros on new disks and skip the first sync. You can even do it with dirty disks, as long as the file systems are new, but the first
verify will be a deusy.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">If you’d said what version of DRBD you were running, I’d give you the link in the manual for the correct command. But there are different manual and command
syntaxes for 8.3 vs 8.4. Look in the appropriate doc for clear-bitmap.<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">Dan<o:p></o:p></span></p>
<p class="MsoNormal"><span style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span style="font-size:10.0pt;font-family:"Tahoma","sans-serif""> drbd-user-bounces@lists.linbit.com [mailto:drbd-user-bounces@lists.linbit.com]
<b>On Behalf Of </b>andreas graeper<br>
<b>Sent:</b> Wednesday, May 29, 2013 7:19 AM<br>
<b>To:</b> drbd-user@lists.linbit.com<br>
<b>Subject:</b> [DRBD-user] promoting one of new disks<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal">hi,<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">pure drbd, no corosync/pacemaker (first attempt, i started to read about lvm,cluster,... some days ago)
<o:p></o:p></p>
</div>
<p class="MsoNormal">when drbd on top of lv (lvm-logical-volumn) and on both nodes the lv are formatted with
<br>
mkfs.ext4, cause of error 40 i had to zero the start of lv. <o:p></o:p></p>
</div>
<p class="MsoNormal">after 'create-md' and 'up' on both nodes (cs:Connected ro=Sec/Sec ds=Inconsistant/Inconsistant) now i tried<o:p></o:p></p>
</div>
<p class="MsoNormal"> drbdadm --force primary r0 <o:p></o:p></p>
</div>
<p class="MsoNormal">but i got error 17 and found in www a solution <o:p></o:p></p>
</div>
<p class="MsoNormal"> drbdadm invalidate r0<o:p></o:p></p>
</div>
<p class="MsoNormal">now automatically sync starts (cs:SyncTarget ro=Sec/Sec ds=Incons/Uptodate)
<o:p></o:p></p>
</div>
<p class="MsoNormal">the peer is implicit declared uptodate this way ?<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">i should have invalidated the peer if i want to set local node to be primary ? (in case there are actually data on the node that shall become primary)
<o:p></o:p></p>
</div>
<p class="MsoNormal">but the main question:<o:p></o:p></p>
</div>
<p class="MsoNormal" style="margin-bottom:12.0pt">can i avoid the sync process, if on new disks there are no data ?<o:p></o:p></p>
</div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">sync is done (cs:Connected ro=Sec/Sec ds=Uptodate/Uptodate) <o:p>
</o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<p class="MsoNormal">i read, when brbd with pacemaker, then (i guess the resource-manager forces this) only on
<o:p></o:p></p>
</div>
<p class="MsoNormal">primary i have rw-access, and on secondary i cannot even read the mirrored data.
<o:p></o:p></p>
</div>
<p class="MsoNormal">i found the data (lv) already mounted on primary. i created a small file in /mnt/lva (mountpoint declared in /etc/fstab)
<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">now i want to change roles (manual 6.5 basic manual failover).<br>
`mount` or `df -h` does not show the mounted device.<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">umount /dev/vg_xxx/lv_aaa => not mounted<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">umount /mnt/lva => not mounted<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">umount /dev/mapper/vg_xxx-lv_aaa => not mounted
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">i simply tried (on current primary) :<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> drbdadm secondary r <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> cd /mnt/lva<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> # change on that small file <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"> /proc/drbd -> ds:uptodate/uptodate
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">on secondary : <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> drbdadm primary r <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt"> -> ro:Primary/Secondary ds:uptodate/uptodate (roles changed)
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">on new primary i cannot mount the volumn cause its busy <o:p>
</o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">on old primary i can still see the new file
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">now i stopped drbd on old primary and tried to mount the lv <o:p>
</o:p></p>
</div>
<div>
<p class="MsoNormal" style="margin-bottom:12.0pt">but it cannot mounted as ext4 anymore, cause it is damaged by the call of dd ?!<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal">how this is done correct: brbd on top of lv with internal metadata ?
<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> ? i must not zero the head of the formatted lv <o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"> ? i have to force writing metadata to the end of that lv <o:p>
</o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">thanks in advance<br>
andreas<o:p></o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<div>
<div>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
</body>
</html>