{"id":209,"date":"2021-12-12T04:17:31","date_gmt":"2021-12-12T04:17:31","guid":{"rendered":"https:\/\/hiyokotech.com\/?p=209"},"modified":"2021-12-19T12:24:00","modified_gmt":"2021-12-19T12:24:00","slug":"aws-add-new-disk-volume","status":"publish","type":"post","link":"https:\/\/hiyokotech.com\/?p=209","title":{"rendered":"AWS Add new disk volume"},"content":{"rendered":"\n<figure class=\"wp-block-image size-large is-resized\"><img loading=\"lazy\" src=\"https:\/\/hiyokotech.com\/wp-content\/uploads\/2021\/12\/icon_041510_256.png\" alt=\"\" class=\"wp-image-210\" width=\"138\" height=\"138\" srcset=\"https:\/\/hiyokotech.com\/wp-content\/uploads\/2021\/12\/icon_041510_256.png 256w, https:\/\/hiyokotech.com\/wp-content\/uploads\/2021\/12\/icon_041510_256-150x150.png 150w\" sizes=\"(max-width: 138px) 100vw, 138px\" \/><\/figure>\n\n\n\n<p>The procedure of add new 1 GB disk volume for AWS EC2.<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p><strong>Procudure:<\/strong><\/p>\n\n\n\n<p>a.) Login to AWS console and, modify ec2 disk volume.<\/p>\n\n\n\n<p>b) Access EC2 by ssh<\/p>\n\n\n\n<p>c.) Check the partition block and file system<\/p>\n\n\n\n<p>d.) expand the partition block<\/p>\n\n\n\n<p>e.) expand the file system<\/p>\n\n\n\n<p><\/p>\n\n\n\n<p>0. Check the petition size.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"> <\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># df -h\nFilesystem      Size  Used Avail Use% Mounted on\ndevtmpfs        482M     0  482M   0% \/dev\ntmpfs           492M     0  492M   0% \/dev\/shm\ntmpfs           492M  560K  492M   1% \/run\ntmpfs           492M     0  492M   0% \/sys\/fs\/cgroup\n\/dev\/xvda1      8.0G  7.3G  775M  91% \/\ntmpfs            99M     0   99M   0% \/run\/user\/0\ntmpfs            99M     0   99M   0% \/run\/user\/1000<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">1. Login to AWS console and select \"volume\"<\/pre>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"230\" height=\"124\" src=\"https:\/\/hiyokotech.com\/wp-content\/uploads\/2021\/12\/image.png\" alt=\"\" class=\"wp-image-212\"\/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>2. Select exit volume and select &#8220;Modify Volume&#8221;<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"353\" height=\"166\" src=\"https:\/\/hiyokotech.com\/wp-content\/uploads\/2021\/12\/image-1.png\" alt=\"\" class=\"wp-image-214\" srcset=\"https:\/\/hiyokotech.com\/wp-content\/uploads\/2021\/12\/image-1.png 353w, https:\/\/hiyokotech.com\/wp-content\/uploads\/2021\/12\/image-1-300x141.png 300w\" sizes=\"(max-width: 353px) 100vw, 353px\" \/><\/figure>\n\n\n\n<p>3. Change Size and push &#8220;Modify&#8221; buton<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"556\" height=\"255\" src=\"https:\/\/hiyokotech.com\/wp-content\/uploads\/2021\/12\/image-3.png\" alt=\"\" class=\"wp-image-216\" srcset=\"https:\/\/hiyokotech.com\/wp-content\/uploads\/2021\/12\/image-3.png 556w, https:\/\/hiyokotech.com\/wp-content\/uploads\/2021\/12\/image-3-300x138.png 300w\" sizes=\"(max-width: 556px) 100vw, 556px\" \/><\/figure>\n\n\n\n<p>4. Read the message and push &#8220;Yes&#8221;.<\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"681\" height=\"306\" src=\"https:\/\/hiyokotech.com\/wp-content\/uploads\/2021\/12\/image-6.png\" alt=\"\" class=\"wp-image-219\" srcset=\"https:\/\/hiyokotech.com\/wp-content\/uploads\/2021\/12\/image-6.png 681w, https:\/\/hiyokotech.com\/wp-content\/uploads\/2021\/12\/image-6-300x135.png 300w\" sizes=\"(max-width: 681px) 100vw, 681px\" \/><\/figure>\n\n\n\n<p><\/p>\n\n\n\n<p>5. Close the box. <\/p>\n\n\n\n<figure class=\"wp-block-image size-large\"><img loading=\"lazy\" width=\"668\" height=\"204\" src=\"https:\/\/hiyokotech.com\/wp-content\/uploads\/2021\/12\/image-7.png\" alt=\"\" class=\"wp-image-220\" srcset=\"https:\/\/hiyokotech.com\/wp-content\/uploads\/2021\/12\/image-7.png 668w, https:\/\/hiyokotech.com\/wp-content\/uploads\/2021\/12\/image-7-300x92.png 300w\" sizes=\"(max-width: 668px) 100vw, 668px\" \/><\/figure>\n\n\n\n<p>6. Check the disk volume again.  but the disk volume had not been expanded.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># df -h\nFilesystem      Size  Used Avail Use% Mounted on\ndevtmpfs        482M     0  482M   0% \/dev\ntmpfs           492M     0  492M   0% \/dev\/shm\ntmpfs           492M  504K  492M   1% \/run\ntmpfs           492M     0  492M   0% \/sys\/fs\/cgroup\n\/dev\/xvda1      8.0G  7.3G  775M  91% \/\ntmpfs            99M     0   99M   0% \/run\/user\/1000<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<p>7. Check the file system. mail partition \/dev\/xvda1 file system is &#8216;xfs&#8217;.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># df -hT\nFilesystem     Type      Size  Used Avail Use% Mounted on\ndevtmpfs       devtmpfs  482M     0  482M   0% \/dev\ntmpfs          tmpfs     492M     0  492M   0% \/dev\/shm\ntmpfs          tmpfs     492M  504K  492M   1% \/run\ntmpfs          tmpfs     492M     0  492M   0% \/sys\/fs\/cgroup\n\/dev\/xvda1     xfs       8.0G  7.3G  775M  91% \/\ntmpfs          tmpfs      99M     0   99M   0% \/run\/user\/1000<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<p>8. List block device and expand volume<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># lsblk\nNAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINT\nxvda    202:0    0   9G  0 disk\nmqxvda1 202:1    0   8G  0 part \/<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code># growpart \/dev\/xvda 1\nCHANGED: partition=1 start=4096 old: size=16773087 end=16777183 new: size=18870239 end=18874335<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<p>9. Check the volume of the block<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\n# lsblk\nNAME    MAJ:MIN RM SIZE RO TYPE MOUNTPOINT\nxvda    202:0    0   9G  0 disk\nmqxvda1 202:1    0   9G  0 part <\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<p>10. Check the file system <\/p>\n\n\n\n<p>Check by df command and it found the partition \/dev\/xvda1 file system is &#8216;xfs&#8217;.<\/p>\n\n\n\n<pre class=\"wp-block-code\"><code># df -hT\nFilesystem     Type      Size  Used Avail Use% Mounted on\ndevtmpfs       devtmpfs  482M     0  482M   0% \/dev\ntmpfs          tmpfs     492M     0  492M   0% \/dev\/shm\ntmpfs          tmpfs     492M  504K  492M   1% \/run\ntmpfs          tmpfs     492M     0  492M   0% \/sys\/fs\/cgroup\n\/dev\/xvda1     xfs       8.0G  7.3G  775M  91% \/\ntmpfs          tmpfs      99M     0   99M   0% \/run\/user\/1000<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<p>11. expand xfs file system<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\"><\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\n# xfs_growfs -d \/\nmeta-data=\/dev\/xvda1             isize=512    agcount=4, agsize=524159 blks\n         =                       sectsz=512   attr=2, projid32bit=1\n         =                       crc=1        finobt=1 spinodes=0\ndata     =                       bsize=4096   blocks=2096635, imaxpct=25\n         =                       sunit=0      swidth=0 blks\nnaming   =version 2              bsize=4096   ascii-ci=0 ftype=1\nlog      =internal               bsize=4096   blocks=2560, version=2\n         =                       sectsz=512   sunit=0 blks, lazy-count=1\nrealtime =none                   extsz=4096   blocks=0, rtextents=0\ndata blocks changed from 2096635 to 2358779<\/code><\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">* if file system is ext4, please use resize2fs command. <\/pre>\n\n\n\n<pre class=\"wp-block-preformatted\">\nThe \/dev\/xvda1 size is expanded to 9.0GB<\/pre>\n\n\n\n<pre class=\"wp-block-code\"><code>\n\n# df -h\nFilesystem      Size  Used Avail Use% Mounted on\ndevtmpfs        482M     0  482M   0% \/dev\ntmpfs           492M     0  492M   0% \/dev\/shm\ntmpfs           492M  512K  492M   1% \/run\ntmpfs           492M     0  492M   0% \/sys\/fs\/cgroup\n\/dev\/xvda1      9.0G  7.3G  1.8G  81% \/\ntmpfs            99M     0   99M   0% \/run\/user\/1000<\/code><\/pre>\n\n\n\n<p><\/p>\n","protected":false},"excerpt":{"rendered":"<p>The procedure of add new 1 GB disk volume for AWS EC2. Procudure: a.) Login to AWS console and, modify ec2 disk volume. b) Access EC2 by ssh c.) Check the partition block and file system d.) expand the partition block e.) expand the file system 0. Check the petition size. 1. Login to AWS <br \/><a class=\"read-more-button\" href=\"https:\/\/hiyokotech.com\/?p=209\">Read More &raquo;<\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":[],"categories":[1],"tags":[],"_links":{"self":[{"href":"https:\/\/hiyokotech.com\/index.php?rest_route=\/wp\/v2\/posts\/209"}],"collection":[{"href":"https:\/\/hiyokotech.com\/index.php?rest_route=\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/hiyokotech.com\/index.php?rest_route=\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/hiyokotech.com\/index.php?rest_route=\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/hiyokotech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcomments&post=209"}],"version-history":[{"count":9,"href":"https:\/\/hiyokotech.com\/index.php?rest_route=\/wp\/v2\/posts\/209\/revisions"}],"predecessor-version":[{"id":232,"href":"https:\/\/hiyokotech.com\/index.php?rest_route=\/wp\/v2\/posts\/209\/revisions\/232"}],"wp:attachment":[{"href":"https:\/\/hiyokotech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fmedia&parent=209"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/hiyokotech.com\/index.php?rest_route=%2Fwp%2Fv2%2Fcategories&post=209"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/hiyokotech.com\/index.php?rest_route=%2Fwp%2Fv2%2Ftags&post=209"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}