<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Meh, I should have read the bug first.<br>
<br>
I didn't realize that AFR2 broke that, so with that patch:<br>
<br>
<pre>1. ssh root@node-1
2. gluster volume stop example-vol node-1:/srv/brick-02/brick.0
3. # replace physical disk
4. remount /srv/brick-02
5. gluster volume replace-brick example-vol node-1:/srv/brick-02/brick.0 node-1:/srv/brick-02/brick.0
</pre>
<br>
On 03/18/2016 08:34 AM, Joe Julian wrote:<br>
<blockquote cite="mid:56EC1FEB.9050601@julianfamily.org" type="cite">
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
I completely agree that we should not have to kill (never -9 as
this will cause the clients to wait for ping-timeout) brick
processes directly. There should be a cli command to stop an
individual brick.<br>
<br>
The "Today" method should be corrected as follows:<br>
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<pre style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; white-space: pre-wrap;"> 1. ssh root@node-1
2. kill $(gluster volume status example-vol | awk '/srv.brick-02.brick.0/{print $3}')
3. # replace physical disk
4. remount /srv/brick-02
5. gluster volume start example-vol force # no replace-brick necessary
6. gluster volume heal example-vol full
</pre>
I'd love to see step 2 replaced with<br>
<pre>gluster volume stop example-vol node-1:/srv/brick-02/brick.0
</pre>
This command should gracefully stop the brick, closing tcp
connections. It should fail if there are pending-heals with that
brick as the source unless you add the "force" keyword at the end.<br>
<br>
This would turn your hypothetical example into<br>
<br>
<pre style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; white-space: pre-wrap;"> 1. ssh root@node-1
2. gluster volume stop example-vol node-1:/srv/brick-02/brick.0
3. # replace physical disk
4. remount /srv/brick-02
5. gluster volume start example-vol force
6. gluster volume heal example-vol full </pre>
<br>
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<br>
<br>
<div class="moz-cite-prefix">On 03/18/2016 08:11 AM, Peter
Portante wrote:<br>
</div>
<blockquote
cite="mid:942EA141-14ED-4D4B-ADFD-B7D235DE4E83@gmail.com"
type="cite">
<div>
<div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,
sans-serif; font-size: 14px;">Hi Folks,</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,
sans-serif; font-size: 14px;"><br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,
sans-serif; font-size: 14px;">There is a review posted, <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="http://review.gluster.org/#/c/12250"><a class="moz-txt-link-freetext" href="http://review.gluster.org/#/c/12250">http://review.gluster.org/#/c/12250</a></a>,
to which I tacked on a review comment for an update to the
replace-brick command. The gist of it is at <a
moz-do-not-send="true" class="moz-txt-link-freetext"
href="https://gist.github.com/portante/248407dbfb29c2515fc3"><a class="moz-txt-link-freetext" href="https://gist.github.com/portante/248407dbfb29c2515fc3">https://gist.github.com/portante/248407dbfb29c2515fc3</a></a></div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,
sans-serif; font-size: 14px;"><br>
</div>
</div>
</div>
</blockquote>
gist included for completeness:<br>
<meta http-equiv="content-type" content="text/html;
charset=windows-1252">
<pre style="color: rgb(0, 0, 0); font-style: normal; font-variant: normal; font-weight: normal; letter-spacing: normal; line-height: normal; orphans: auto; text-align: start; text-indent: 0px; text-transform: none; widows: 1; word-spacing: 0px; -webkit-text-stroke-width: 0px; word-wrap: break-word; white-space: pre-wrap;"> > I like where this is going. Perhaps we could consider the steps an
> admin has to take and orient the commands to address what they need
> to do.
>
> First, having to "kill -9" a process as an interface to stopping a
> brick seems dicey.
>
> So to that end, perhaps we could two sets of commands, the first to
> tell gluster to take the brick out of service, allowing the admin
> to then replace it, and a second command to brick the brick back
> into service.
>
> For example:
>
> gluster volume name: example-vol
> 6 node cluster, each member providing 12 bricks, three way replicated, distributed
> members are named node-0 ... node-5
> disks are named /srv/brick-00/brick.0 .. /srv/brick-11/brick.0
>
> Lets say the disk for /srv/brick-02/brick.0 on node-1 goes bad.
>
> Today I believe I have to:
>
> 1. ssh root@node-1
> 2. kill -9 $(gluster volume status | grep /srv/brick-02/brick | awk '{print $3}')
> 3. # replace physical disk
> 4. remount /srv/brick-02
> 5. mkdir /srv/brick-02/brick.1
> 6. # on a FUSE mnt, do the directory dance and the xattr dance
> 7. # ensure other node brick trusted IDs for healing are correct
> 8. gluster volume replace-brick example-vol node-1:/srv/brick-02/brick.0 node-1:/srv/brick-02/brick.1 commit force
>
> Perhaps we could do the following instead:
>
> 1. ssh root@node-1
> 2. gluster volume replace-brick example-vol node-1:/srv/brick-02/brick.0 offline
> 3. # replace physical disk
> 4. remount /srv/brick-02
> 5. mkdir /srv/brick-02/brick.0
> 6. gluster volume replace-brick example-vol node-1:/srv/brock-02/brick.0 online
>
> Then the new step #6 would take care of the old steps #6 & #7. We
> would lose the "kill -9" and replace with a declaration of
> intention command that tells gluster to "take this brick off line,
> stopping the brick process, and removing references to the mount
> point".
>
> What do you all think?
>
> Please excuse my ignorance of the ins-and-outs of gluster commands
> if I have the above steps off a bit.</pre>
<br>
<blockquote
cite="mid:942EA141-14ED-4D4B-ADFD-B7D235DE4E83@gmail.com"
type="cite">
<div>
<div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,
sans-serif; font-size: 14px;">What do folks think of such
a proposal?</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,
sans-serif; font-size: 14px;"><br>
</div>
<div><font face="Calibri,sans-serif">Thanks!</font></div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,
sans-serif; font-size: 14px;"><br>
</div>
<div style="color: rgb(0, 0, 0); font-family: Calibri,
sans-serif; font-size: 14px;">-peter</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Gluster-devel mailing list
<a moz-do-not-send="true" class="moz-txt-link-abbreviated" href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a>
<a moz-do-not-send="true" class="moz-txt-link-freetext" href="http://www.gluster.org/mailman/listinfo/gluster-devel">http://www.gluster.org/mailman/listinfo/gluster-devel</a></pre>
</blockquote>
<br>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Gluster-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a>
<a class="moz-txt-link-freetext" href="http://www.gluster.org/mailman/listinfo/gluster-devel">http://www.gluster.org/mailman/listinfo/gluster-devel</a></pre>
</blockquote>
<br>
</body>
</html>