<?xml version="1.0" encoding="UTF-8"?><rss xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:atom="http://www.w3.org/2005/Atom" version="2.0" xmlns:cc="http://cyber.law.harvard.edu/rss/creativeCommonsRssModule.html">
    <channel>
        <title><![CDATA[Stories by Mansur Ul Hasan on Medium]]></title>
        <description><![CDATA[Stories by Mansur Ul Hasan on Medium]]></description>
        <link>https://medium.com/@mansurali901?source=rss-94b7e59bd758------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*nsMRCIH0rA6BHVdAWfHmSg.jpeg</url>
            <title>Stories by Mansur Ul Hasan on Medium</title>
            <link>https://medium.com/@mansurali901?source=rss-94b7e59bd758------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Thu, 19 Nov 2026 20:55:06 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@mansurali901/feed" rel="self" type="application/rss+xml"/>
        <webMaster><![CDATA[yourfriends@medium.com]]></webMaster>
        <atom:link href="http://medium.superfeedr.com/" rel="hub"/>
        <item>
            <title><![CDATA[Understanding how AI models like LLaMA Works]]></title>
            <link>https://medium.com/@mansurali901/understanding-how-ai-models-like-llama-works-064b7e2efa55?source=rss-94b7e59bd758------2</link>
            <guid isPermaLink="false">https://medium.com/p/064b7e2efa55</guid>
            <category><![CDATA[ai]]></category>
            <category><![CDATA[artificial-intelligence]]></category>
            <category><![CDATA[ai-model]]></category>
            <category><![CDATA[meta]]></category>
            <category><![CDATA[llama-3]]></category>
            <dc:creator><![CDATA[Mansur Ul Hasan]]></dc:creator>
            <pubDate>Fri, 27 Dec 2024 08:04:10 GMT</pubDate>
            <atom:updated>2024-12-27T08:04:49.988Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*td4_-qYO6zRoLmJylMvUCA.jpeg" /></figure><h3>Overview of LLaMA</h3><p>LLaMA (Large Language Model Meta AI) is a family of large language models designed for tasks like text generation, summarization, question answering, and more. These models are based on the <strong>Transformer architecture</strong>, which processes inputs in parallel, enabling high efficiency and scalability.</p><ul><li><strong>Model Size</strong>: “3.2B” refers to the number of parameters in the model. Parameters are the learned weights that the model uses to make predictions.</li><li><strong>Transformer Architecture</strong>: LLaMA uses a transformer-based design, relying on layers of self-attention and feed-forward networks to process input.</li></ul><h3>Input Token and Output Token</h3><h3>What is a Token?</h3><p>A <strong>token</strong> is a fragment of text. It can be a word, subword, or character depending on the tokenizer used.</p><p><strong>For example, the sentence “Artificial Intelligence” might be tokenized into:</strong></p><p><strong>Word-level tokens</strong>: [“Artificial”, “Intelligence”]<br><strong>Subword-level tokens</strong>: [“Art”, “ificial”, “Intelli”, “gence”]<br><strong>Character-level tokens</strong>: [“A”, “r”, “t”, “i”, “f”, …]</p><h3>Input Token</h3><p>Input tokens are the representations of the text you provide to the model. For example, “What is AI?” would be tokenized and converted into numerical IDs using a vocabulary.</p><blockquote>Example: “What is AI?” → [201, 102, 305]</blockquote><h3>Output Token</h3><ul><li>Output tokens are the predicted text fragments generated by the model during inference.</li><li>If the input is “What is AI?”, the model might generate:</li><li>[201, 102, 305] → “AI stands for Artificial Intelligence.”</li></ul><h3>Tokenization Process</h3><h3>Tokenization Steps</h3><ol><li><strong>Text Preprocessing</strong>: Remove unnecessary whitespaces, lowercasing (if applicable), etc.</li><li><strong>Subword Segmentation</strong>: The tokenizer splits the text into subwords based on the vocabulary</li><li><strong>Convert to Token IDs</strong>: Each token is mapped to an integer ID based on a pre-built vocabulary.</li></ol><h3>Popular Tokenizers</h3><ul><li>Byte Pair Encoding (BPE)</li><li>WordPiece (used in BERT)</li><li>SentencePiece (used in LLaMA)</li></ul><h3>Inference Process</h3><p>Inference refers to how the model generates predictions when given input. Here’s the step-by-step process:</p><h3>a. Input Encoding</h3><ul><li>The input text is tokenized into token IDs.</li><li>These IDs are padded or truncated to match the model’s input length.</li></ul><h3>b. Model Processing</h3><p>The token IDs are passed through <strong>embedding layers</strong> that convert them into dense vector representations.</p><p>These vectors are processed by the transformer layers, which include:</p><ol><li><strong>Self-Attention Mechanism</strong>: Each token attends to every other token to capture context.</li><li><strong>Feedforward Networks</strong>: Transforms the attended information into meaningful outputs.</li><li><strong>Positional Encodings</strong>: Adds information about the position of tokens in the sequence.</li></ol><h3>c. Decoding</h3><p>The model predicts the next token based on the current input. This process continues iteratively.</p><p><strong>Decoding strategies:</strong></p><ol><li><strong>Greedy Decoding</strong>: Picks the most probable token at each step.</li><li><strong>Beam Search</strong>: Explores multiple paths to find the most probable sequence.</li><li><strong>Sampling</strong>: Picks tokens probabilistically to introduce diversity.</li></ol><h3>Training vs. Inference</h3><h3>Training</h3><ul><li><strong>Objective</strong>: Learn to predict the next token given previous tokens.</li><li><strong>Data</strong>: Large text corpora are used to train models using supervised learning.</li><li><strong>Loss Function</strong>: Cross-entropy loss compares the predicted token probabilities with the actual token.</li><li><strong>Optimization</strong>: Backpropagation adjusts model weights to minimize the loss.</li></ul><h3>Inference</h3><ul><li><strong>Objective</strong>: Generate text based on learned weights.</li><li><strong>No Backpropagation</strong>: The model doesn’t learn; it only applies its trained parameters.</li></ul><h3>Key Components of LLaMA</h3><h3>a. Transformer Layers</h3><ul><li><strong>Self-Attention</strong>: Captures dependencies between tokens, regardless of distance.</li><li><strong>Feedforward Neural Networks</strong>: Processes attention outputs for feature extraction.</li><li><strong>Layer Normalization</strong>: Stabilizes learning and improves training dynamics.</li></ul><h3>b. Positional Encoding</h3><p>Encodes the order of tokens to account for sequence information.</p><h3>c. Embedding Layer</h3><p>Converts token IDs into dense vectors that are input to the transformer.</p><h3>Model Evaluation</h3><ul><li><strong>Metrics</strong>: Perplexity, BLEU, ROUGE, accuracy, etc., depending on the task.</li><li><strong>Use Cases</strong>: Fine-tune for specific tasks or directly use the model for general text generation.</li></ul><h3>Practical Workflow for Using LLaMA</h3><p><strong>Setup the Environment: </strong>Install frameworks like PyTorch and Hugging Face Transformers.</p><p><strong>Load the Model</strong></p><pre>from transformers import AutoModelForCausalLM, AutoTokenizer<br>tokenizer = AutoTokenizer.from_pretrained(&quot;meta-llama/Llama-2–3.2B&quot;)<br>model = AutoModelForCausalLM.from_pretrained(&quot;meta-llama/Llama-2–3.2B&quot;)</pre><p>Tokenize Input</p><pre>inputs = tokenizer(&quot;What is AI?&quot;, return_tensors=&quot;pt&quot;)</pre><p>Generate Output</p><pre>outputs = model.generate(inputs[&#39;input_ids&#39;], max_length=50)<br>print(tokenizer.decode(outputs[0]))</pre><h3>Advanced Concepts</h3><h3>Fine-Tuning</h3><p>Train the pre-trained LLaMA model on domain-specific data to adapt it to specific tasks.</p><h3>Optimizations for Inference</h3><p>Quantization: Reduce model size by lowering precision (e.g., FP16 or INT8).</p><p>Pruning: Remove less important weights to speed up computation.</p><p>Distillation: Use a smaller “student” model trained to mimic the larger model.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=064b7e2efa55" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Scheduler CrashLoopBack with Minikube]]></title>
            <link>https://medium.com/@mansurali901/scheduler-crashloopback-with-minikube-f0a55cdf9613?source=rss-94b7e59bd758------2</link>
            <guid isPermaLink="false">https://medium.com/p/f0a55cdf9613</guid>
            <category><![CDATA[minikube]]></category>
            <category><![CDATA[kubernetes]]></category>
            <category><![CDATA[cluster]]></category>
            <dc:creator><![CDATA[Mansur Ul Hasan]]></dc:creator>
            <pubDate>Mon, 03 Oct 2022 09:32:28 GMT</pubDate>
            <atom:updated>2022-10-03T09:32:28.032Z</atom:updated>
            <content:encoded><![CDATA[<blockquote>command failed” err=”failed to create listener: failed to listen on 127.0.0.1:10259: listen tcp 127.0.0.1:10259: bind: address already in use”</blockquote><p>Often we create Kubernetes clusters using minikube on our local machines and we encountered issues like a port in use and Container is stuck in CrashLoopback state this issue is very common when things setting up locally steps we can do to identify</p><h3>Step : 1 Check all the system pods in kube-system namespace</h3><blockquote><em>kubectl ge pods -n kube-system</em></blockquote><h3>Step : 2 Check logs of the pod</h3><blockquote>kubectl logs kube-scheduler-xnhdmxj -n kube-system</blockquote><p>If you see any error like below that means systemctl is not releasing port from docker daemon it happens sometimes when docker is not properly communicating</p><blockquote>command failed” err=”failed to create listener: failed to listen on 127.0.0.1:10259: listen tcp 127.0.0.1:10259: bind: address already in use”</blockquote><h3>Solution</h3><p>Solution to the above problem is docker daemon has to release the port in order to pod function properly</p><p><strong>Stop minikube</strong></p><blockquote>minikube stop — force</blockquote><p>Stop Docker from systemctl</p><blockquote>systemctl stop docker.service</blockquote><p>Wait for at 30 seconds and then start services sequentially</p><blockquote>systemctl start docker.service</blockquote><blockquote>minikube start — force</blockquote><p>above solution will solve the problem</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=f0a55cdf9613" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[Opensource replacement of Citrix Xenserver with all enterprise features]]></title>
            <link>https://medium.com/@mansurali901/opensource-replacement-of-citrix-xenserver-with-all-enterprise-features-63244cc95397?source=rss-94b7e59bd758------2</link>
            <guid isPermaLink="false">https://medium.com/p/63244cc95397</guid>
            <category><![CDATA[open-source]]></category>
            <category><![CDATA[hypervisors]]></category>
            <category><![CDATA[xcp-ng]]></category>
            <category><![CDATA[xen]]></category>
            <category><![CDATA[citrix]]></category>
            <dc:creator><![CDATA[Mansur Ul Hasan]]></dc:creator>
            <pubDate>Fri, 12 Aug 2022 08:32:21 GMT</pubDate>
            <atom:updated>2022-08-12T08:32:21.241Z</atom:updated>
            <content:encoded><![CDATA[<p>If you are a Virtualization Server Administrator and Opensource lover then this post will take you to heaven.</p><p>Nowadays, main problem with <strong>Virtualization Server Administrators</strong> is Enterprise features and market available hypervisors are not fully equipped with High Availability and enterprise feature in free or standard versions. Most of the companies don’t want to pay for hypervisors they like to run for free and important features like HA, WLB, Multi-pathing, autoupdates, security patches doesn’t comes for free therefore Virtualization Server Administrators has to suffer.</p><p><strong>Citrix Xenserver</strong> is one of widely used hypervisor as opensources but in opensource version there are no enterprise features available WLB, Multi-pathing, autoupdates, security patches so companies has to pay for these enterprise features if they want <strong>Citrix Xenserver.</strong></p><p>To solve that problem maker of XenOrchestra created an Opensource Project Called <strong>XCP-NG </strong>which is a clone of xenserver opensource code they create XCP-ng on top of opensource code with all the enterprise features available and the big news is this is available as <strong>Opensource</strong> under <strong>GPL</strong> license so <strong>Virtualization Server Administrators </strong>can utilize enterprise features <strong>HA</strong>, <strong>WLB</strong>, <strong>Multi-pathing</strong>, <strong>autoupdates</strong>, <strong>security patches.</strong></p><p>Since its a clone of Xenserver so it can easily be migrated from <strong>Citrix Xenserve</strong>r to <strong>XCP-ng</strong> Citrix Xenceter can be used to manage hypervisors the same way it was managing Citrix Xen Server.</p><p>installation media can be found here <a href="https://xcpng.satoga.ro/xcp-ng/isos/8.2/xcp-ng-8.2.1.iso">Download Link for XCP-NG</a> <br>Installations steps are same as Citrix Xenserver.</p><h3>Installation Requirements :</h3><ul><li>RAM : 2GB Minimum</li><li>CPU : 2 Core of CPU Minimum</li><li>Disk : 8GB of spare Disk</li></ul><h3>Installation Steps :</h3><p><strong>Step : 1 </strong>Download installation media from given Link and make a bootable USB or disk using any tool of choice.<br><a href="https://xcpng.satoga.ro/xcp-ng/isos/8.2/xcp-ng-8.2.1.iso">Download Link for XCP-NG</a></p><p><strong>Step : 2</strong> Restart your server and boot with CD / USB</p><p><strong>Step : 3</strong> Choose the Keyboard language</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*N5I6iDp-lowmeRoYfDvJeQ.png" /></figure><p><strong>Step : 4 </strong>Choose additional drivers (If needed this is an optional step)<strong><br></strong>If any additional drivers need to be loaded it can be done at this step</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*1FzXQuahwiZPJqp8YDueGg.png" /></figure><p><strong>Step : 5</strong> Accept End User License</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*iLxhNYMEtbflJ5avktczXg.png" /></figure><p><strong>Step : 6</strong> Choose either upgrade or clean installation</p><blockquote>Note : We are choosing clean installation as this is brand new hardware</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/954/1*YYMCTJhaD0hqlL3qVqVKow.png" /></figure><p>Step : 7 Choose installation Media Type</p><blockquote>There are several types we will be using Local Media if anyone is using NetInstall they can choose respective options</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/744/1*ngUMet9AQI9TJfnx5tVYGw.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/846/1*-E3tN2dZH6c-p9PLNk8KRQ.png" /></figure><blockquote>Once the installation is done server can be rebooted in order to manage XCP-NG Xenserver existing Xenceter can be used but it is to advised to use XCP-NG native client for better user experience</blockquote><p><a href="https://github.com/xcp-ng/xenadmin/releases/download/v20.04.01.33/XCP-ng-Center-20.04.01.33.msi">XCP NG Client Download Link</a></p><p>Download XCP-ng client from above link and install it on your windows machine user experience is similar as the Xenceter with some more additional features like WLB which is great feature for managing large scale hypervisor environment</p><p>Process of server addition is same as Citrix Xencenter all features for managing cluster is same so not change at all</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*BDjhQNerqV-h0PzI1e1FXQ.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*seHHkZZDa38rLqpjegAn7A.png" /></figure><p>Server Administrator can enjoy all enterprise features for free with XCP-NG xenmotion can easily be used to move VM within cluster and with other cluster so its really cool contribution from the developers to the community.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=63244cc95397" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to enable AWS RDS Cross-region replication using Terraform]]></title>
            <link>https://medium.com/@mansurali901/how-to-enable-aws-rds-cross-region-replication-using-terraform-9e35a397d245?source=rss-94b7e59bd758------2</link>
            <guid isPermaLink="false">https://medium.com/p/9e35a397d245</guid>
            <category><![CDATA[aws-replication]]></category>
            <category><![CDATA[crossregion-replication]]></category>
            <category><![CDATA[aws-rds-instances]]></category>
            <category><![CDATA[aws-rds]]></category>
            <category><![CDATA[high-availability]]></category>
            <dc:creator><![CDATA[Mansur Ul Hasan]]></dc:creator>
            <pubDate>Mon, 01 Aug 2022 09:09:16 GMT</pubDate>
            <atom:updated>2022-08-01T09:09:16.851Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/800/0*N_QaPLYrRHIlt1GT.png" /></figure><p>In many organization stakeholders are more lean to have high availability in infrastructure.</p><p>For any Technology based product data is always the most critical piece therefore organization prefer to have high availability for data either databases or Files storage.</p><p>In this article we will be more focused around AWS RDS high availability and we will try to cover all aspects like security of data. AWS is nowadays a giant in cloud computing and it also support IaC and SDK to deploy infrastructure resources the same way we do from AWS management console.</p><h3><strong>Scenario : We need to create AWS RDS cluster using terraform with Cross-Region replication.</strong></h3><blockquote>For this to be achieved we need to create several resources <br>- Primary RDS<br>- Nested providers (One for Primary and one for read-replica)<br>- KMS<br>- Read Replica</blockquote><p>Lets Create Nested Providers</p><pre>provider “aws” {<br> region = “us-east-2”<br>}</pre><pre># Provider for Read Replica<br>provider “aws” {<br> region = “us-west-2”<br> alias = “replica”<br>}</pre><p>In the next we need to create Primary DB Instance.</p><pre>resource “aws_db_instance” “default” {<br>  allocated_storage = 10<br>  identifier = &quot;mydb&quot;<br>  engine = &quot;postgres&quot;<br>  engine_version = &quot;13.4&quot;<br>  instance_class = &quot;db.t3.micro&quot;<br>  name = &quot;mydb&quot;<br>  username = &quot;masterusername&quot;<br>  password = &quot;mustbeeightcharacters&quot;<br>  backup_retention_period = 7<br>  storage_encrypted = true<br>  skip_final_snapshot = true<br>}</pre><p>Now we need KMS Key to encrypt database snapshots and read-replica which will be used to provision instance in different region.</p><pre>resource &quot;aws_kms_key&quot; &quot;default&quot; {<br>  description = &quot;Encryption key for automated backups&quot;<br>  provider = &quot;aws.replica&quot;<br>}</pre><p>Now the final resource will be read-replica this resource will be create in other region using nested providers.</p><pre>resource &quot;aws_db_instance&quot; &quot;dev&quot; {<br>  instance_class = var.instance_type<br>  replicate_source_db = aws_db_instance.default.arn <br>  kms_key_id = aws_kms_key.default.arn<br>  skip_final_snapshot = true<br>   lifecycle {<br>      ignore_changes = [snapshot_identifier]<br>   }<br>     provider = &quot;aws.replica&quot;<br>}</pre><p>Now we can do apply to create resource</p><pre>Terraform apply --auto-approve</pre><h3>Full Script to create resources .</h3><pre>provider &quot;aws&quot; {<br>  region = &quot;us-east-2&quot;<br>}</pre><pre># Provider for Read Replica<br>provider &quot;aws&quot; {<br>  region = &quot;us-west-2&quot;<br>  alias  = &quot;replica&quot;<br>}</pre><pre>resource &quot;aws_db_instance&quot; &quot;default&quot; {<br>  allocated_storage       = 10<br>  identifier              = &quot;mydb&quot;<br>  engine                  = &quot;postgres&quot;<br>  engine_version          = &quot;13.4&quot;<br>  instance_class          = &quot;db.t3.micro&quot;<br>  name                    = &quot;mydb&quot;<br>  username                = &quot;masterusername&quot;<br>  password                = &quot;mustbeeightcharacters&quot;<br>  backup_retention_period = 7<br>  storage_encrypted       = true<br>  skip_final_snapshot     = true<br>}</pre><pre>resource &quot;aws_kms_key&quot; &quot;default&quot; {<br>  description = &quot;Encryption key for automated backups&quot;<br>  provider = &quot;aws.replica&quot;<br>}<br>resource &quot;aws_db_instance&quot; &quot;dev&quot; {<br>  instance_class = var.instance_type<br>  replicate_source_db = aws_db_instance.default.arn <br>  kms_key_id = aws_kms_key.default.arn<br>  skip_final_snapshot = true<br>   lifecycle {<br>      ignore_changes = [snapshot_identifier]<br>   }<br>     provider = &quot;aws.replica&quot;<br>}</pre><blockquote>it is important to note here is whenever cross-region replication is required we need to use database ARN instead of database name</blockquote><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=9e35a397d245" width="1" height="1" alt="">]]></content:encoded>
        </item>
        <item>
            <title><![CDATA[How to Setup GlusterFS in Ubuntu 18+]]></title>
            <link>https://medium.com/@mansurali901/how-to-setup-glusterfs-in-ubuntu-18-e3679ece22db?source=rss-94b7e59bd758------2</link>
            <guid isPermaLink="false">https://medium.com/p/e3679ece22db</guid>
            <category><![CDATA[gluster]]></category>
            <category><![CDATA[glusterfs]]></category>
            <category><![CDATA[linux]]></category>
            <category><![CDATA[storage-solutions]]></category>
            <category><![CDATA[vsan]]></category>
            <dc:creator><![CDATA[Mansur Ul Hasan]]></dc:creator>
            <pubDate>Wed, 27 Jul 2022 10:03:36 GMT</pubDate>
            <atom:updated>2022-07-27T10:03:36.552Z</atom:updated>
            <content:encoded><![CDATA[<p><strong>GlusterFS</strong> is a scale-out network-attached storage file system. It has found applications including cloud computing, streaming media services, and content delivery networks. GlusterFS was developed originally by Gluster, Inc. and then by Red Hat, Inc., as a result of Red Hat acquiring Gluster in 2011.</p><p>In June 2012, Red Hat Storage Server was announced as a commercially supported integration of GlusterFS with Red Hat Enterprise Linux. Red Hat bought Inktank Storage in April 2014, which is the company behind the Ceph distributed file system, and re-branded GlusterFS-based Red Hat Storage Server to “Red Hat Gluster Storage”. [Source : Wikipedia]</p><h3><strong>Gluster working flow</strong></h3><figure><img alt="GlusterFS implementation Architecture" src="https://cdn-images-1.medium.com/max/1024/0*F-D2dLcskuaV46JJ.png" /></figure><p>In our case we use GlusterFS with Citrix XEN to add as NFS storage repository to store VMs data. In our case we are not using NFS ganesha which is embedded NFS Server in gluster (Reason for not to use native nfs ganesha is it has some compatibility issues with Citrix XEN that is why we switch to NFS Server with Linux)</p><p>Installation is pretty straight forward in Ubuntu with just few commands we will be able to get it running.</p><p>We have several types of replication in Gluster<br>- distributed Volumes <br>- replicated Volumes<br>In our case we required high availability so we will be using replicated volume</p><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*pwy0O-NwSknP30STOoQ4ow.png" /><figcaption>Our Lab Environment</figcaption></figure><p>Reference : <a href="https://www.youtube.com/watch?v=gEG7Eu320Rk">https://www.youtube.com/watch?v=gEG7Eu320Rk</a></p><ul><li><strong>Storage Node 1</strong>:<br><strong>Hostname:</strong> storage01.example.com<br><strong>IP address: </strong>192.168.70.12<br><strong>Gluster Storage Disk:</strong> /dev/sdb2<br><strong>Mount Point:</strong> /data<br><strong>OS:</strong> Ubuntu 18.04</li><li><strong>Storage Node 2:</strong><br><strong>Hostname:</strong> storage02.example.com<br><strong>IP address:</strong> 192.168.70.13<br><strong>Gluster Storage Disk:</strong> /dev/sdb2<br><strong>Mount Point:</strong> /data<br><strong>OS:</strong> Ubuntu 18.04</li><li><strong>GlusterFS Client:</strong><br><strong>Hostname:</strong> gfsclient.example.com<br><strong>IP address:</strong> 192.168.70.197<br><strong>OS: </strong>Ubuntu 18.04</li></ul><p><strong>Step : 1 Install Gluster Binaries</strong></p><pre>sudo apt-get install software-properties-common<br>sudo add-apt-repository ppa:gluster/glusterfs-5<br>apt-get install glusterfs-server</pre><p><strong>Step : 2 Enable Gluster Service at startup</strong></p><pre>systemctl enable glusterd</pre><pre>Note : Step 1 &amp; Step 2 need to be done on all GlusterFS servers in our case storage node 1 and Storage node 2</pre><p><strong>Step : 3 Configure GlusterFS Trusted Pool</strong></p><pre>root@storage01# gluster peer probe storage02.example.com</pre><pre>Output : <br>peer probe: success.</pre><p>To check Pool status below command can be run</p><pre>gluster peer status</pre><pre>Output :<br>Number of Peers: 1<br><br>Hostname: storage02.example.com<br>Uuid: 5a2dd392-9e3b-4710-6614-e6069084d957<br>State: Peer in Cluster (Connected)</pre><pre>+++++++++++++++++ More commands to verify </pre><pre>gluster pool list<br>UUID	                             Hostname              State<br>5a2dd392-9e3b-4710-6614-e6069084d957 storage02.example.com Connected <br>639199cd-575a-441b-887d-3344cgb703bd localhost             Connected</pre><p><strong>Step 4 : Prepare server storage</strong></p><p>We need to create a directory where we can store Gluster data and it should be under sdb2 as per our setup (mount points and path can be vary for other setups)</p><pre>mkdir /data/store</pre><pre><strong><em>Note : this step need to be done on all GlusterFS servers in our case storage node 1 and Storage node 2</em></strong></pre><p><strong>Step 5 : Create Gluster replicated volume</strong></p><pre>gluster volume create store replica 2 storage01.example.com:/data/store storage02.example.com:/data/store</pre><pre><strong><em>Output : <br></em></strong>volume create: store: success: please start the volume to access data</pre><p><strong>Step 6 : Start the volume</strong></p><pre>gluster volume start store</pre><pre><strong><em>Output:</em></strong><br>volume start: store: success</pre><p><strong>Step 7 : Mount the Volume on GlusterFS client</strong></p><p>Create the mount point</p><pre>apt-get install glusterfs-client<br>apt-get install software-properties-common<br>add-apt-repository ppa:gluster/glusterfs-5</pre><pre>mkdir /mnt/store/</pre><p>Mount gluster volume</p><pre>mount -t glusterfs storage01.example.com:/store /mnt/store/</pre><p>This is it we are done with Gluster FS setup for more information please see the video : <a href="https://youtu.be/gEG7Eu320Rk">https://youtu.be/gEG7Eu320Rk</a></p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=e3679ece22db" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>