<html><body><div style="font-family: garamond,new york,times,serif; font-size: 12pt; color: #000000"><div><br></div><div><br></div><hr id="zwchr"><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;"><b>From: </b>"Venky Shankar" &lt;vshankar@redhat.com&gt;<br><b>To: </b>"Aravinda" &lt;avishwan@redhat.com&gt;<br><b>Cc: </b>"Shyam" &lt;srangana@redhat.com&gt;, "Krutika Dhananjay" &lt;kdhananj@redhat.com&gt;, "Gluster Devel" &lt;gluster-devel@gluster.org&gt;<br><b>Sent: </b>Thursday, September 3, 2015 8:29:37 AM<br><b>Subject: </b>Re: [Gluster-devel] Gluster Sharding and Geo-replication<br><div><br></div>On Wed, Sep 2, 2015 at 11:39 PM, Aravinda &lt;avishwan@redhat.com&gt; wrote:<br>&gt;<br>&gt; On 09/02/2015 11:13 PM, Shyam wrote:<br>&gt;&gt;<br>&gt;&gt; On 09/02/2015 10:47 AM, Krutika Dhananjay wrote:<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; ------------------------------------------------------------------------<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; *From: *"Shyam" &lt;srangana@redhat.com&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; *To: *"Aravinda" &lt;avishwan@redhat.com&gt;, "Gluster Devel"<br>&gt;&gt;&gt; &nbsp; &nbsp; &lt;gluster-devel@gluster.org&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; *Sent: *Wednesday, September 2, 2015 8:09:55 PM<br>&gt;&gt;&gt; &nbsp; &nbsp; *Subject: *Re: [Gluster-devel] Gluster Sharding and Geo-replication<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; On 09/02/2015 03:12 AM, Aravinda wrote:<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; Geo-replication and Sharding Team today discussed about the<br>&gt;&gt;&gt; approach<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; to make Sharding aware Geo-replication. Details are as below<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; Participants: Aravinda, Kotresh, Krutika, Rahul Hinduja, Vijay<br>&gt;&gt;&gt; Bellur<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; - Both Master and Slave Volumes should be Sharded Volumes with<br>&gt;&gt;&gt; same<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp;configurations.<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; If I am not mistaken, geo-rep supports replicating to a non-gluster<br>&gt;&gt;&gt; &nbsp; &nbsp; local FS at the slave end. Is this correct? If so, would this<br>&gt;&gt;&gt; &nbsp; &nbsp; limitation<br>&gt;&gt;&gt; &nbsp; &nbsp; not make that problematic?<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; When you state *same configuration*, I assume you mean the sharding<br>&gt;&gt;&gt; &nbsp; &nbsp; configuration, not the volume graph, right?<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; That is correct. The only requirement is for the slave to have shard<br>&gt;&gt;&gt; translator (for, someone needs to present aggregated view of the file to<br>&gt;&gt;&gt; the READers on the slave).<br>&gt;&gt;&gt; Also the shard-block-size needs to be kept same between master and<br>&gt;&gt;&gt; slave. Rest of the configuration (like the number of subvols of DHT/AFR)<br>&gt;&gt;&gt; can vary across master and slave.<br>&gt;&gt;<br>&gt;&gt;<br>&gt;&gt; Do we need to have the sharded block size the same? As I assume the file<br>&gt;&gt; carries an xattr that contains the size it is sharded with<br>&gt;&gt; (trusted.glusterfs.shard.block-size), so if this is synced across, it would<br>&gt;&gt; do. If this is true, what it would mean is that "a sharded volume needs a<br>&gt;&gt; shard supported slave to ge-rep to".<br>&gt;<br>&gt; Yes. Number of bricks and replica count can be different. But sharded block<br>&gt; size should be same. Only the first file will have<br>&gt; xattr(trusted.glusterfs.shard.block-size), Geo-rep should sync this xattr<br>&gt; also to Slave. Only Gsyncd can read/write the sharded chunks. Sharded Slave<br>&gt; Volume is required to understand these chunks when read(non Gsyncd clients)<br><div><br></div>Even if this works I am very much is disagreement with this mechanism<br>of synchronization (not that I have a working solution in my head as<br>of now).<br></blockquote><div><br></div><div>Hi Venky,<br></div><div><br></div><div>It is not apparent to me what issues you see with approach 2. If you could lay them out here, it would be helpful in taking the discussions further.<br></div><div><br></div><div>-Krutika<br></div><blockquote style="border-left:2px solid #1010FF;margin-left:5px;padding-left:5px;color:#000;font-weight:normal;font-style:normal;text-decoration:none;font-family:Helvetica,Arial,sans-serif;font-size:12pt;">&gt;<br>&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; -Krutika<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; - In Changelog record changes related to Sharded files also. Just<br>&gt;&gt;&gt; &nbsp; &nbsp; like<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp;any regular files.<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; - Sharding should allow Geo-rep to list/read/write Sharding<br>&gt;&gt;&gt; internal<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp;Xattrs if Client PID is gsyncd(-1)<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; - Sharding should allow read/write of Sharded files(that is in<br>&gt;&gt;&gt; &nbsp; &nbsp; .shards<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp;directory) if Client PID is GSYNCD<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; - Sharding should return actual file instead of returning the<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp;aggregated content when the Main file is requested(Client PID<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp;GSYNCD)<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; For example, a file f1 is created with GFID G1.<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; When the file grows it gets sharded into chunks(say 5 chunks).<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; &nbsp;f1 &nbsp; G1<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; &nbsp;.shards/G1.1 &nbsp; G2<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; &nbsp;.shards/G1.2 &nbsp; G3<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; &nbsp;.shards/G1.3 &nbsp; G4<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; &nbsp;.shards/G1.4 &nbsp; G5<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; In Changelog, this is recorded as 5 different files as below<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; &nbsp;CREATE G1 f1<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; &nbsp;DATA G1<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; &nbsp;META G1<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; &nbsp;CREATE G2 PGS/G1.1<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; &nbsp;DATA G2<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; &nbsp;META G1<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; &nbsp;CREATE G3 PGS/G1.2<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; &nbsp;DATA G3<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; &nbsp;META G1<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; &nbsp;CREATE G4 PGS/G1.3<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; &nbsp;DATA G4<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; &nbsp;META G1<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; &nbsp;CREATE G5 PGS/G1.4<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; &nbsp;DATA G5<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; &nbsp; &nbsp; &nbsp;META G1<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; Where PGS is GFID of .shards directory.<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; Geo-rep will create these files independently in Slave Volume and<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; syncs Xattrs of G1. Data can be read only when all the chunks are<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; synced to Slave Volume. Data can be read partially if main/first<br>&gt;&gt;&gt; file<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; and some of the chunks synced to Slave.<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; Please add if I missed anything. C &amp; S Welcome.<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; regards<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; Aravinda<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; On 08/11/2015 04:36 PM, Aravinda wrote:<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; Hi,<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; We are thinking different approaches to add support in<br>&gt;&gt;&gt; &nbsp; &nbsp; Geo-replication<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; for Sharded Gluster Volumes[1]<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; *Approach 1: Geo-rep: Sync Full file*<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; &nbsp; &nbsp;- In Changelog only record main file details in the same brick<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; where it is created<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; &nbsp; &nbsp;- Record as DATA in Changelog whenever any addition/changes<br>&gt;&gt;&gt; &nbsp; &nbsp; to the<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; sharded file<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; &nbsp; &nbsp;- Geo-rep rsync will do checksum as a full file from mount and<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; syncs as new file<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; &nbsp; &nbsp;- Slave side sharding is managed by Slave Volume<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; *Approach 2: Geo-rep: Sync sharded file separately*<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; &nbsp; &nbsp;- Geo-rep rsync will do checksum for sharded files only<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; &nbsp; &nbsp;- Geo-rep syncs each sharded files independently as new files<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; &nbsp; &nbsp;- [UNKNOWN] Sync internal xattrs(file size and block count)<br>&gt;&gt;&gt; &nbsp; &nbsp; in the<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; main sharded file to Slave Volume to maintain the same state as<br>&gt;&gt;&gt; &nbsp; &nbsp; in Master.<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; &nbsp; &nbsp;- Sharding translator to allow file creation under .shards<br>&gt;&gt;&gt; &nbsp; &nbsp; dir for<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; gsyncd. that is Parent GFID is .shards directory<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; &nbsp; &nbsp;- If sharded files are modified during Geo-rep run may end up<br>&gt;&gt;&gt; &nbsp; &nbsp; stale<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; data in Slave.<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; &nbsp; &nbsp;- Files on Slave Volume may not be readable unless all sharded<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; files sync to Slave(Each bricks in Master independently sync<br>&gt;&gt;&gt; &nbsp; &nbsp; files to<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; slave)<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; First approach looks more clean, but we have to analize the Rsync<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; checksum performance on big files(Sharded in backend, accessed<br>&gt;&gt;&gt; &nbsp; &nbsp; as one<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; big file from rsync)<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; Let us know your thoughts. Thanks<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; Ref:<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; [1]<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;&gt;&gt; http://www.gluster.org/community/documentation/index.php/Features/sharding-xlator<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; --<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; regards<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; Aravinda<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; _______________________________________________<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; Gluster-devel mailing list<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; Gluster-devel@gluster.org<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;&gt; http://www.gluster.org/mailman/listinfo/gluster-devel<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; _______________________________________________<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; Gluster-devel mailing list<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; Gluster-devel@gluster.org<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt; http://www.gluster.org/mailman/listinfo/gluster-devel<br>&gt;&gt;&gt; &nbsp; &nbsp; &nbsp;&gt;<br>&gt;&gt;&gt; &nbsp; &nbsp; _______________________________________________<br>&gt;&gt;&gt; &nbsp; &nbsp; Gluster-devel mailing list<br>&gt;&gt;&gt; &nbsp; &nbsp; Gluster-devel@gluster.org<br>&gt;&gt;&gt; &nbsp; &nbsp; http://www.gluster.org/mailman/listinfo/gluster-devel<br>&gt;&gt;&gt;<br>&gt;&gt;&gt;<br>&gt;<br>&gt; regards<br>&gt; Aravinda<br>&gt;<br>&gt; _______________________________________________<br>&gt; Gluster-devel mailing list<br>&gt; Gluster-devel@gluster.org<br>&gt; http://www.gluster.org/mailman/listinfo/gluster-devel<br></blockquote><div><br></div></div></body></html>