<div dir="ltr">Just double checked for the location of the snapshot files.<div><br></div><div>Documentations says they should be here:</div><div><pre style="font-size:1em;border:1px dashed rgb(102,102,102);padding:15px 20px;overflow:auto;color:rgb(0,0,0);background:rgb(238,238,238)">A directory named snap will be created under the vol directory (..../glusterd/vols/&lt;volname&gt;/snap). Under which each created snap will be a self contained directory with meta files, and snap volumes</pre></div><div class="gmail_extra"><a href="http://www.gluster.org/community/documentation/index.php/Features/snapshot">http://www.gluster.org/community/documentation/index.php/Features/snapshot</a><br></div><div class="gmail_extra"><br></div><div class="gmail_extra">Unfortunatelly they are not, they are in /var/lib/glusterd/snaps/</div><div class="gmail_extra"><br></div><div class="gmail_extra">Each snap has a directory with volumes inside. </div><div class="gmail_extra"><br></div><div class="gmail_extra">If I want to use the dd command, which volume should I backup?</div><div class="gmail_extra"><br></div><div class="gmail_extra">ls:</div><div class="gmail_extra">







<p class=""><span class="">node1:/data/mysql/data$ ll /var/lib/glusterd/snaps/snap1/2d828e6282964e0e89616b297130aa1b/</span></p>
<p class=""><span class="">total 56</span></p>
<p class=""><span class="">drwxr-xr-x 3 root root 4096 Sep  2 16:04 </span><span class=""><b>.</b></span><span class="">/</span></p>
<p class=""><span class="">drwxr-xr-x 4 root root 4096 Sep  2 16:04 </span><span class=""><b>..</b></span><span class="">/</span></p>
<p class=""><span class="">-rw------- 1 root root 4559 Sep  2 16:03 2d828e6282964e0e89616b297130aa1b.gs1.run-gluster-snaps-2d828e6282964e0e89616b297130aa1b-brick1-brick1.vol</span></p>
<p class=""><span class="">-rw------- 1 root root 4559 Sep  2 16:03 2d828e6282964e0e89616b297130aa1b.gs2.run-gluster-snaps-2d828e6282964e0e89616b297130aa1b-brick2-brick1.vol</span></p>
<p class=""><span class="">-rw------- 1 root root 2250 Sep  2 16:03 2d828e6282964e0e89616b297130aa1b-rebalance.vol</span></p>
<p class=""><span class="">-rw------- 1 root root 2250 Sep  2 16:03 2d828e6282964e0e89616b297130aa1b.tcp-fuse.vol</span></p>
<p class=""><span class="">drwxr-xr-x 2 root root 4096 Sep  2 16:04 </span><span class=""><b>bricks</b></span><span class="">/</span></p>
<p class=""><span class="">-rw------- 1 root root   16 Sep  2 16:04 cksum</span></p>
<p class=""><span class="">-rw------- 1 root root  587 Sep  2 16:04 info</span></p>
<p class=""><span class="">-rw------- 1 root root   93 Sep  2 16:04 <a href="http://node_state.info">node_state.info</a></span></p>
<p class=""><span class="">-rw------- 1 root root    0 Sep  2 16:03 quota.conf</span></p>
<p class=""><span class="">-rw------- 1 root root   13 Sep  2 16:04 <a href="http://snapd.info">snapd.info</a></span></p>
<p class=""><span class="">-rw------- 1 root root 2478 Sep  2 16:03 trusted-2d828e6282964e0e89616b297130aa1b.tcp-fuse.vol</span></p></div><div class="gmail_extra"><br></div><div class="gmail_extra">







<p class=""><br></p></div><div class="gmail_extra"><br><div class="gmail_quote">2015-09-02 16:31 GMT+02:00 Merlin Morgenstern <span dir="ltr">&lt;<a href="mailto:merlin.morgenstern@gmail.com" target="_blank">merlin.morgenstern@gmail.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><div dir="ltr">So what would be the fastest possible way to make a backup to one single fileof the entire file system? Would this be probably dd?<div><span style="color:rgb(63,64,66);font-family:monospace,Courier;font-size:14.4px;line-height:1.3em;background-color:rgb(249,249,249)"><br></span></div><div><span style="color:rgb(63,64,66);font-family:monospace,Courier;font-size:14.4px;line-height:1.3em;background-color:rgb(249,249,249)">e.g.:</span></div><div><div><font color="#3f4042" face="monospace, Courier"><span style="font-size:14.4px;line-height:18.72px">sudo umount /run/gluster/snaps/7cb4b2c8f8a64ceaba62bc4ca6cd76b2/brick1</span></font></div><div><br></div><div>sudo dd if=/dev/mapper/gluster-506cb09085b2428e9daca8ac0857c2c9_0<font color="#3f4042" face="monospace, Courier"><span style="font-size:14.4px;line-height:18.72px;white-space:pre-wrap"> | gzip &gt; snap01.gz</span></font></div></div><div><font color="#3f4042" face="monospace, Courier"><span style="font-size:14.4px;line-height:18.72px;white-space:pre-wrap"><br></span></font></div><div>That seems to work, but how could I possibly know the snapshot name? I took this info here from df -h since the snapshot can not be found under /snaps/snapshot_name</div><div><br></div><div>I also tried to run the command you mentioned: </div><span class=""><div><br></div><div><span style="font-size:12.8px">&gt; to mount snapshot volume:</span><br style="font-size:12.8px"><span style="font-size:12.8px">&gt; mount -t glusterfs &lt;hostname&gt;:/snaps/&lt;snap-name&gt;/</span><span style="font-size:12.8px">&lt;origin-volname&gt; /&lt;mount_point&gt;</span><br style="font-size:12.8px"></div><div><br></div></span><div>This did not work. There seems not to be any folder called /snaps/ as when I press tab I get suggestion for vol1 but nothing else.</div><div><br></div><div>Here is the mount log:</div><div><br></div><div>E [MSGID: 114058] [client-handshake.c:1524:client_query_portmap_cbk] 0-vol1-client-0: failed to get the port number for remote subvolume. Please run &#39;gluster volume status&#39; on server to see if brick process is running.</div><div><br></div><div>Thank you in advance for any help</div><div><br></div><div><br></div></div><div class=""><div class="h5"><div class="gmail_extra"><br><div class="gmail_quote">2015-09-02 14:11 GMT+02:00 Rajesh Joseph <span dir="ltr">&lt;<a href="mailto:rjoseph@redhat.com" target="_blank">rjoseph@redhat.com</a>&gt;</span>:<br><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left-width:1px;border-left-color:rgb(204,204,204);border-left-style:solid;padding-left:1ex"><span><br>
<br>
----- Original Message -----<br>
&gt; From: &quot;Merlin Morgenstern&quot; &lt;<a href="mailto:merlin.morgenstern@gmail.com" target="_blank">merlin.morgenstern@gmail.com</a>&gt;<br>
</span><span>&gt; To: &quot;Rajesh Joseph&quot; &lt;<a href="mailto:rjoseph@redhat.com" target="_blank">rjoseph@redhat.com</a>&gt;<br>
&gt; Cc: &quot;gluster-users&quot; &lt;<a href="mailto:gluster-users@gluster.org" target="_blank">gluster-users@gluster.org</a>&gt;<br>
&gt; Sent: Wednesday, September 2, 2015 11:53:05 AM<br>
&gt; Subject: Re: [Gluster-users] gluster volume snap shot - basic questions<br>
&gt;<br>
&gt; Thank you Rjesh for your help. I have a thinly provisioned LVM now running<br>
&gt; and can create snapshots on a real device, surviving boot.<br>
&gt;<br>
&gt; There are 2 other questions rising up now.<br>
&gt;<br>
&gt; 1. I have a LV with 20G, data is 7G. How is it possible, that I could make<br>
&gt; 3 snapshots, each 7G?<br>
&gt;<br>
&gt; /dev/mapper/gluster-thinv1                               20G  7.0G   12G<br>
&gt; 38% /bricks/brick1<br>
&gt;<br>
&gt; /dev/mapper/gluster-7cb4b2c8f8a64ceaba62bc4ca6cd76b2_0   20G  7.0G   12G<br>
&gt; 38% /run/gluster/snaps/7cb4b2c8f8a64ceaba62bc4ca6cd76b2/brick1<br>
&gt;<br>
&gt; /dev/mapper/gluster-506cb09085b2428e9daca8ac0857c2c9_0   20G  7.0G   12G<br>
&gt; 38% /run/gluster/snaps/506cb09085b2428e9daca8ac0857c2c9/brick1<br>
&gt;<br>
&gt; /dev/mapper/gluster-fbee900c1cc7407f9527f98206e6566d_0   20G  7.0G   12G<br>
&gt; 38% /run/gluster/snaps/fbee900c1cc7407f9527f98206e6566d/brick1<br>
&gt;<br>
&gt; /dev/mapper/gluster-d0c254908dca451d8f566be77437c538_0   20G  7.0G   12G<br>
&gt; 38% /run/gluster/snaps/d0c254908dca451d8f566be77437c538/brick1<br>
&gt;<br>
&gt;<br>
<br>
</span>These snapshots are copy-on-write (COW) therefore they hardly consume any space.<br>
As your main volume change the space consumption of the snapshots also grow.<br>
Check the &quot;lvs&quot; command to see the actual snapshot space consumption.<br>
<br>
You can get more detailed information if you search for thinly provisioned LVM and snapshots.<br>
<span><br>
<br>
&gt; 2. The name of the snapshot folder is the UUID, My plan is to do a &quot;tar cf&quot;<br>
&gt; on the snapshot and even incremental tars. Therefore I would need the name<br>
&gt; of the folder. How could I pass that name to my bash script in order to<br>
&gt; make a backup of the last snap?<br>
&gt;<br>
<br>
</span>Instead of taking per brick backup you can think of taking backup of the entire snapshot<br>
volume. You can mount the snapshot volume and perform the backup. Use the following command<br>
to mount snapshot volume:<br>
mount -t glusterfs &lt;hostname&gt;:/snaps/&lt;snap-name&gt;/&lt;origin-volname&gt; /&lt;mount_point&gt;<br>
<br>
or else if you want to find the name of the snapshot volume (UUID) then run the<br>
following command<br>
gluster snapshot info<br>
<span><br>
&gt;<br>
&gt; 3. A tar process will take hours on the million files I have. I understand<br>
&gt; this is a snapshot, is there a way to backup a &quot;single&quot; snapshot file<br>
&gt; instead?<br>
<br>
</span>Snapshot is maintained in the underlying file-system and I see no way of transferring<br>
it to another system.<br>
<div><div><br>
&gt;<br>
&gt; Thank you in advance for sheding some light on this topic<br>
&gt;<br>
&gt; 2015-09-02 7:59 GMT+02:00 Rajesh Joseph &lt;<a href="mailto:rjoseph@redhat.com" target="_blank">rjoseph@redhat.com</a>&gt;:<br>
&gt;<br>
&gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; ----- Original Message -----<br>
&gt; &gt; &gt; From: &quot;Merlin Morgenstern&quot; &lt;<a href="mailto:merlin.morgenstern@gmail.com" target="_blank">merlin.morgenstern@gmail.com</a>&gt;<br>
&gt; &gt; &gt; To: &quot;gluster-users&quot; &lt;<a href="mailto:gluster-users@gluster.org" target="_blank">gluster-users@gluster.org</a>&gt;<br>
&gt; &gt; &gt; Sent: Tuesday, September 1, 2015 3:15:43 PM<br>
&gt; &gt; &gt; Subject: [Gluster-users] gluster volume snap shot - basic questions<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; Hi everybody,<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; I am looking into the snap shot tool, following this tutorial:<br>
&gt; &gt; &gt; <a href="http://blog.gluster.org/2014/10/gluster-volume-snapshot-howto/" rel="noreferrer" target="_blank">http://blog.gluster.org/2014/10/gluster-volume-snapshot-howto/</a><br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; While having successfully created the LVM, gluster volume and one<br>
&gt; &gt; snapshot,<br>
&gt; &gt; &gt; there are some questions arrising where I was hoping to find some<br>
&gt; &gt; guidence<br>
&gt; &gt; &gt; here:<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; 1. From a working setup as in the example I rebooted and everything was<br>
&gt; &gt; gone.<br>
&gt; &gt; &gt; How can I make this setup persistent, so the gluster share is up and<br>
&gt; &gt; running<br>
&gt; &gt; &gt; after boot.<br>
&gt; &gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; What do you mean by &quot;everything was gone&quot;? Are you using loop back device<br>
&gt; &gt; as disks?<br>
&gt; &gt; If yes then this is expected. Loop back device mapping is gone after<br>
&gt; &gt; machine restart.<br>
&gt; &gt; You should test with real disk or lvm partition.<br>
&gt; &gt;<br>
&gt; &gt; &gt; 2. I understand that the snaps are under /var/run/gluster/snaps/ and I<br>
&gt; &gt; found<br>
&gt; &gt; &gt; them there. Is it save to simply copy them to another server for backup?<br>
&gt; &gt; My<br>
&gt; &gt; &gt; goal is to create a backup each day and transfer the snaps to an<br>
&gt; &gt; FTP-Server<br>
&gt; &gt; &gt; in order to be able to recover from a broken machine.<br>
&gt; &gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Yes, snap of individual bricks are mounted at /var/run/gluster/snaps/. I<br>
&gt; &gt; am assuming<br>
&gt; &gt; that you mean copy of data hosted on the snap brick when you say copy the<br>
&gt; &gt; snap.<br>
&gt; &gt; Are you planning to use some backup software or to run rsync on each brick?<br>
&gt; &gt;<br>
&gt; &gt; &gt; 3. Do I really need LVM to use this feature? Currently my setup works on<br>
&gt; &gt; the<br>
&gt; &gt; &gt; native system. As I understand the tuturial I would need to move that to<br>
&gt; &gt; a<br>
&gt; &gt; &gt; LV, right?<br>
&gt; &gt; &gt;<br>
&gt; &gt;<br>
&gt; &gt; Yes, you need LVM and to be precise thinly provisioned LVM for snapshot to<br>
&gt; &gt; work.<br>
&gt; &gt;<br>
&gt; &gt; &gt; Thank you in advance on any help!<br>
&gt; &gt; &gt;<br>
&gt; &gt; &gt; _______________________________________________<br>
&gt; &gt; &gt; Gluster-users mailing list<br>
&gt; &gt; &gt; <a href="mailto:Gluster-users@gluster.org" target="_blank">Gluster-users@gluster.org</a><br>
&gt; &gt; &gt; <a href="http://www.gluster.org/mailman/listinfo/gluster-users" rel="noreferrer" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-users</a><br>
&gt; &gt;<br>
&gt;<br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>