<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body text="#000000" bgcolor="#FFFFFF">
<div class="moz-cite-prefix">Hi Joe,<br>
<br>
Gluster volumes are made of brick processes. Each brick process is
associated with a particular brick directory. In case of the
original volume, the brick processes run on the brick directory
provided during the volume creation. When a snapshot of that
volume is taken, it creates a gluster snapshot volume, which has
it's own bricks which run on directories that resemble the one you
mentioned(<span class="gmail-s1">/run/gluster/</span>snaps/11efcc850133419991c4614b7cb7189c/brick3/brick).
This snapshot brick directory is where the lvm snapshot of the
original brick's lvm is mounted.<br>
<br>
On performing a snapshot restore, the volume goes offline because
we update the volume info file's of the original volume, to make
it point to the snapshot bricks instead of the original bricks. We
also remove the snapshot's info files. As a result when the volume
is then started, after restore it points to the snapshot bricks
and the user gets the data as it was when the snapshot was taken.<br>
<br>
By principle, we do not touch the user created directory as we
don't claim "jurisdiction" over it. Hence you can still see the
older data in those backend drectories even after the restore. It
is the user's onus, as in what to do with the original directory
or data. This behavior is inherited from the behavior of volume
delete, where we take the same precautions to make sure that we
don't implicitly delete the user created directories and data.<br>
<br>
However, as after you have restored the volume to a snapshot , it
is already pointing to snapshot bricks (created by gluster), any
subsequent restores henceforth will remove the snapshot bricks
that are currently a part of the volume as these snapshot bricks
are created by gluster and not by the user. Thanks.<br>
<br>
Regards,<br>
Avra<br>
<br>
On 03/04/2017 07:21 PM, Joseph Lorenzini wrote:<br>
</div>
<blockquote
cite="mid:CAMvD0VKgbHg8o_nrPyfvBPYGN8G8sK7N9Xp1xdyGUYUnyr_LFw@mail.gmail.com"
type="cite">
<div dir="ltr">Hi all,
<div><br>
</div>
<div>Testing out snapshots on gluster and they work great! I
have a question about how the snapshot restore works. After I
successully restore and start up my volume, the brick
directory is not the same<br>
<div>
<p class="gmail-p1"><span class="gmail-s1">/run/gluster/</span>snaps/11efcc850133419991c4614b7cb7189c/brick3/brick</p>
<p class="gmail-p1">And if I look in the original brick
directory, the old data that predates the restore still
exists. This isn't what I would have expected a "restore"
to do. Especially since the restore operation requires
that a volume be offline, my expectation is that it would
overwrite the data in the old brick directory. </p>
<p class="gmail-p1">Would anyone be able to explain why it
doesn't work this way? </p>
<p class="gmail-p1">Thanks,<br>
Joe</p>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Gluster-users mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a>
<a class="moz-txt-link-freetext" href="http://lists.gluster.org/mailman/listinfo/gluster-users">http://lists.gluster.org/mailman/listinfo/gluster-users</a></pre>
</blockquote>
<br>
</body>
</html>