<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/<volname>/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"><<a href="mailto:merlin.morgenstern@gmail.com" target="_blank">merlin.morgenstern@gmail.com</a>></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 > 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">> to mount snapshot volume:</span><br style="font-size:12.8px"><span style="font-size:12.8px">> mount -t glusterfs <hostname>:/snaps/<snap-name>/</span><span style="font-size:12.8px"><origin-volname> /<mount_point></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 'gluster volume status' 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"><<a href="mailto:rjoseph@redhat.com" target="_blank">rjoseph@redhat.com</a>></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>
> From: "Merlin Morgenstern" <<a href="mailto:merlin.morgenstern@gmail.com" target="_blank">merlin.morgenstern@gmail.com</a>><br>
</span><span>> To: "Rajesh Joseph" <<a href="mailto:rjoseph@redhat.com" target="_blank">rjoseph@redhat.com</a>><br>
> Cc: "gluster-users" <<a href="mailto:gluster-users@gluster.org" target="_blank">gluster-users@gluster.org</a>><br>
> Sent: Wednesday, September 2, 2015 11:53:05 AM<br>
> Subject: Re: [Gluster-users] gluster volume snap shot - basic questions<br>
><br>
> Thank you Rjesh for your help. I have a thinly provisioned LVM now running<br>
> and can create snapshots on a real device, surviving boot.<br>
><br>
> There are 2 other questions rising up now.<br>
><br>
> 1. I have a LV with 20G, data is 7G. How is it possible, that I could make<br>
> 3 snapshots, each 7G?<br>
><br>
> /dev/mapper/gluster-thinv1 20G 7.0G 12G<br>
> 38% /bricks/brick1<br>
><br>
> /dev/mapper/gluster-7cb4b2c8f8a64ceaba62bc4ca6cd76b2_0 20G 7.0G 12G<br>
> 38% /run/gluster/snaps/7cb4b2c8f8a64ceaba62bc4ca6cd76b2/brick1<br>
><br>
> /dev/mapper/gluster-506cb09085b2428e9daca8ac0857c2c9_0 20G 7.0G 12G<br>
> 38% /run/gluster/snaps/506cb09085b2428e9daca8ac0857c2c9/brick1<br>
><br>
> /dev/mapper/gluster-fbee900c1cc7407f9527f98206e6566d_0 20G 7.0G 12G<br>
> 38% /run/gluster/snaps/fbee900c1cc7407f9527f98206e6566d/brick1<br>
><br>
> /dev/mapper/gluster-d0c254908dca451d8f566be77437c538_0 20G 7.0G 12G<br>
> 38% /run/gluster/snaps/d0c254908dca451d8f566be77437c538/brick1<br>
><br>
><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 "lvs" 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>
> 2. The name of the snapshot folder is the UUID, My plan is to do a "tar cf"<br>
> on the snapshot and even incremental tars. Therefore I would need the name<br>
> of the folder. How could I pass that name to my bash script in order to<br>
> make a backup of the last snap?<br>
><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 <hostname>:/snaps/<snap-name>/<origin-volname> /<mount_point><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>
><br>
> 3. A tar process will take hours on the million files I have. I understand<br>
> this is a snapshot, is there a way to backup a "single" snapshot file<br>
> 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>
><br>
> Thank you in advance for sheding some light on this topic<br>
><br>
> 2015-09-02 7:59 GMT+02:00 Rajesh Joseph <<a href="mailto:rjoseph@redhat.com" target="_blank">rjoseph@redhat.com</a>>:<br>
><br>
> ><br>
> ><br>
> > ----- Original Message -----<br>
> > > From: "Merlin Morgenstern" <<a href="mailto:merlin.morgenstern@gmail.com" target="_blank">merlin.morgenstern@gmail.com</a>><br>
> > > To: "gluster-users" <<a href="mailto:gluster-users@gluster.org" target="_blank">gluster-users@gluster.org</a>><br>
> > > Sent: Tuesday, September 1, 2015 3:15:43 PM<br>
> > > Subject: [Gluster-users] gluster volume snap shot - basic questions<br>
> > ><br>
> > > Hi everybody,<br>
> > ><br>
> > > I am looking into the snap shot tool, following this tutorial:<br>
> > > <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>
> > ><br>
> > > While having successfully created the LVM, gluster volume and one<br>
> > snapshot,<br>
> > > there are some questions arrising where I was hoping to find some<br>
> > guidence<br>
> > > here:<br>
> > ><br>
> > > 1. From a working setup as in the example I rebooted and everything was<br>
> > gone.<br>
> > > How can I make this setup persistent, so the gluster share is up and<br>
> > running<br>
> > > after boot.<br>
> > ><br>
> ><br>
> > What do you mean by "everything was gone"? Are you using loop back device<br>
> > as disks?<br>
> > If yes then this is expected. Loop back device mapping is gone after<br>
> > machine restart.<br>
> > You should test with real disk or lvm partition.<br>
> ><br>
> > > 2. I understand that the snaps are under /var/run/gluster/snaps/ and I<br>
> > found<br>
> > > them there. Is it save to simply copy them to another server for backup?<br>
> > My<br>
> > > goal is to create a backup each day and transfer the snaps to an<br>
> > FTP-Server<br>
> > > in order to be able to recover from a broken machine.<br>
> > ><br>
> ><br>
> > Yes, snap of individual bricks are mounted at /var/run/gluster/snaps/. I<br>
> > am assuming<br>
> > that you mean copy of data hosted on the snap brick when you say copy the<br>
> > snap.<br>
> > Are you planning to use some backup software or to run rsync on each brick?<br>
> ><br>
> > > 3. Do I really need LVM to use this feature? Currently my setup works on<br>
> > the<br>
> > > native system. As I understand the tuturial I would need to move that to<br>
> > a<br>
> > > LV, right?<br>
> > ><br>
> ><br>
> > Yes, you need LVM and to be precise thinly provisioned LVM for snapshot to<br>
> > work.<br>
> ><br>
> > > Thank you in advance on any help!<br>
> > ><br>
> > > _______________________________________________<br>
> > > Gluster-users mailing list<br>
> > > <a href="mailto:Gluster-users@gluster.org" target="_blank">Gluster-users@gluster.org</a><br>
> > > <a href="http://www.gluster.org/mailman/listinfo/gluster-users" rel="noreferrer" target="_blank">http://www.gluster.org/mailman/listinfo/gluster-users</a><br>
> ><br>
><br>
</div></div></blockquote></div><br></div>
</div></div></blockquote></div><br></div></div>