<?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 Assad Ullah on Medium]]></title>
        <description><![CDATA[Stories by Assad Ullah on Medium]]></description>
        <link>https://medium.com/@akalhoro.bscs15seecs?source=rss-f8ebe0dc02e5------2</link>
        <image>
            <url>https://cdn-images-1.medium.com/fit/c/150/150/1*Bwel-4QPqkgnsqGerhIM9Q.png</url>
            <title>Stories by Assad Ullah on Medium</title>
            <link>https://medium.com/@akalhoro.bscs15seecs?source=rss-f8ebe0dc02e5------2</link>
        </image>
        <generator>Medium</generator>
        <lastBuildDate>Fri, 04 Dec 2026 14:35:23 GMT</lastBuildDate>
        <atom:link href="https://medium.com/@akalhoro.bscs15seecs/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[How to take volume snapshot and increase the disk space of AWS EC2 ubuntu instance]]></title>
            <link>https://medium.com/@akalhoro.bscs15seecs/how-to-take-volume-snapshot-and-increase-the-disk-space-of-aws-ec2-ubuntu-instance-4dde9ade5b76?source=rss-f8ebe0dc02e5------2</link>
            <guid isPermaLink="false">https://medium.com/p/4dde9ade5b76</guid>
            <category><![CDATA[aws-ec2]]></category>
            <category><![CDATA[cloud]]></category>
            <category><![CDATA[ec2-instance]]></category>
            <category><![CDATA[ebs-volume]]></category>
            <category><![CDATA[devops]]></category>
            <dc:creator><![CDATA[Assad Ullah]]></dc:creator>
            <pubDate>Thu, 27 Jan 2022 18:25:23 GMT</pubDate>
            <atom:updated>2022-01-27T18:25:23.453Z</atom:updated>
            <content:encoded><![CDATA[<figure><img alt="" src="https://cdn-images-1.medium.com/max/639/0*UXCh692uJDR3d1Q2" /></figure><p>Sometimes you may need to increase the disk size of your server so that server may not run out of the storage.</p><p>It is always recommended to take the snapshot of disk volume before extending it.</p><p><strong>Steps to take the volume snapshot</strong></p><ul><li>Search ec2 in services search bar and click on EC2</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*Gmj8uiqmYCR9Wy6JvAsRnQ.png" /></figure><ul><li>Scroll down from the left side and select Volumes from Elastic block storage portion</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/320/1*0cPuhsB_WYYlSLAJDt8jPA.png" /></figure><ul><li>select the volume whose size you want to increase and from the action select <em>create snapshot</em></li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*_xmrRcaRHN1lRw0ANEz7hA.png" /></figure><ul><li>You will be required to write description of snapshot then click on create snapshot, your snapshot will be ready.</li></ul><p>Note: You can use this snapshot if you mess up with your volume while increasing its size, thus your data will be still available in the snapshot.</p><p>Now you can follow the below steps to increase the <strong>volume/disk size</strong></p><ul><li>Check current disk space and information about available block devices using below commands</li></ul><blockquote>df -h</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/739/1*6MR2IS4oCN0enFp0LTHO2g.png" /></figure><blockquote>lsblk</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/701/1*Q0lcWgMWENWPkmT2CS_1vw.png" /></figure><p>You can see in above screenshot that current disk size is 8G. We will try to increase the size of this disk.</p><p><strong>Modify the disk size of the volume</strong></p><ul><li>Go to the EC2 instance-&gt;Volume attached to it</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S7tNCv2Buxmcbx37af01lA.png" /></figure><ul><li>Click on volume → Actions → Modify Volume</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*S0NOy8xUMFTyVXFBVvCQig.png" /></figure><ul><li>Write the volume size you want to increase i.e i have increased from 8GB to 20 GB</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/1024/1*oyjblkz0GnOGIiFKFQn_OQ.png" /></figure><ul><li>Click “modify” option to confirm modification in size</li></ul><figure><img alt="" src="https://cdn-images-1.medium.com/max/748/1*FrLJH3LNOhgXhd4XgwADOA.png" /></figure><figure><img alt="" src="https://cdn-images-1.medium.com/max/733/0*S3GHwH_Qu2P1PZAb" /></figure><ul><li>Upto this point, you have just increased the disk size, it is not available yet for usage. You need to extend the volume’s file system to use the increased volume by logging into the instance.</li></ul><p><strong>Extend filesystem</strong></p><p>You can check the volume size information by executing below command it is still 8 GB</p><blockquote>df -h</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/742/1*AGJYufOtcPYWB8ddbRJ7yw.png" /></figure><ul><li>Check the block devices information which are attached to your instance</li></ul><blockquote>lsblk</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/743/1*sXM61vIaJHleoqcAJ0bCdw.png" /></figure><ul><li>You need to check the file system type</li></ul><blockquote>lsblk -f</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/752/1*aThnw7cX7AeimCIKLBJ_Tg.png" /></figure><p>So the file system type is “xfs”.</p><p>To extend this file system run the command</p><blockquote>sudo growpart /dev/xvda1</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/801/1*fZPI5d5jy0ezn4ArwIDKQw.png" /></figure><ul><li>Now check if the volume size is extended</li></ul><blockquote>lsblk</blockquote><figure><img alt="" src="https://cdn-images-1.medium.com/max/754/1*2chebX2hR19XVDu5kGuIrA.png" /></figure><p>So you can see that the volume size is extended from 8GB to 20 GB.</p><p>Note: if your filesystem type is ext4 then you can extend the disk size by executing the below command</p><blockquote><em>sudo resize2fs /dev/xvda1</em></blockquote><p>You can need other filesystems information, you can get from the AWS official documentations <a href="https://docs.aws.amazon.com/AWSEC2/latest/UserGuide/recognize-expanded-volume-linux.html#extend-file-system">here</a></p><p><strong>Conclusion: </strong>In this article we learnt the steps to increase the volume of aws ec2 ubuntu instance particular filesystem. It is recommended to take the volume snapshot before extending the volume and it is not recommended to decrease the volume of instance.</p><img src="https://medium.com/_/stat?event=post.clientViewed&referrerSource=full_rss&postId=4dde9ade5b76" width="1" height="1" alt="">]]></content:encoded>
        </item>
    </channel>
</rss>