{"id":2161,"date":"2018-06-10T12:44:15","date_gmt":"2018-06-10T20:44:15","guid":{"rendered":"https:\/\/www.cloudinsidr.com\/content\/?p=2161"},"modified":"2018-06-10T13:03:12","modified_gmt":"2018-06-10T21:03:12","slug":"how-to-expand-the-ebs-boot-volume-of-a-linux-based-ec2-instance","status":"publish","type":"post","link":"https:\/\/www.cloudinsidr.com\/content\/how-to-expand-the-ebs-boot-volume-of-a-linux-based-ec2-instance\/","title":{"rendered":"How to expand the EBS boot volume of a Linux-based EC2 instance"},"content":{"rendered":"<p>This is easier than you probably think: AWS will expand the EBS boot volume\u00a0of an EC2 instance running Linux automatically when you launch a new instance off of it with the desired capacity.<\/p>\n<p>Here is how it works in more detail.<\/p>\n<p><!--more--><\/p>\n<h3>Step 1. Check storage space utilization<\/h3>\n<p>Check the storage space utilization using the command:<\/p>\n<pre>df -h<\/pre>\n<p>This gives you an output in a human-readable form.<\/p>\n<figure id=\"attachment_2166\" aria-describedby=\"caption-attachment-2166\" style=\"width: 794px\" class=\"wp-caption alignnone\"><a href=\"https:\/\/www.cloudinsidr.com\/content\/how-to-expand-the-ebs-boot-volume-of-a-linux-based-ec2-instance\/check_free_space\/\" rel=\"attachment wp-att-2166\"><img loading=\"lazy\" decoding=\"async\" class=\"wp-image-2166 size-full\" src=\"https:\/\/www.cloudinsidr.com\/content\/wp-content\/uploads\/2018\/06\/check_free_space-e1528663041565.png\" alt=\"Check storage space utilization on Linux\" width=\"794\" height=\"325\" srcset=\"https:\/\/www.cloudinsidr.com\/content\/wp-content\/uploads\/2018\/06\/check_free_space-e1528663041565.png 794w, https:\/\/www.cloudinsidr.com\/content\/wp-content\/uploads\/2018\/06\/check_free_space-e1528663041565-300x123.png 300w, https:\/\/www.cloudinsidr.com\/content\/wp-content\/uploads\/2018\/06\/check_free_space-e1528663041565-768x314.png 768w, https:\/\/www.cloudinsidr.com\/content\/wp-content\/uploads\/2018\/06\/check_free_space-e1528663041565-600x246.png 600w\" sizes=\"(max-width: 794px) 100vw, 794px\" \/><\/a><figcaption id=\"caption-attachment-2166\" class=\"wp-caption-text\">Check storage space utilization on Linux before you expand the EBS boot volume<\/figcaption><\/figure>\n<p>If you would rather check the size of individual items in the root directory, use this command (add the -x flag to skip items located on other file systems):<\/p>\n<pre>du -hs \/* | sort -h<\/pre>\n<p>The du command shows you the totals (-s) for each item (*) at root (\/) in a human-readable form (-h), and pipes its output to the sort command. The sort command orders the results in human-readable form (-h).<\/p>\n<h3>Step 2. Create a new AMI based on the instance you want to modify.<\/h3>\n<p>Stop any services on the instance you want to modify, then stop the instance (any data on ephemeral storage will be lost). Create a new AMI based on the stopped instance. This ensures that any data you saved will persist to the new instance.<\/p>\n<h3>Step 3. Launch a new instance based on the AMI<\/h3>\n<p>Launch a new instance based on the newly created AMI.<\/p>\n<p>When configuring the storage details of the new instance, increase the size of the boot volume.\u00a0If you want to use an existing reservation to cover the costs, make sure you select the same settings as for the original instance (instance type, region\/zone, etc.).<\/p>\n<h3>Step 4. Reassign EIP and terminate the old instance<\/h3>\n<p>Reassign your EIP to the new instance and restart any services that need restarting.<\/p>\n<h3>Step 5.\u00a0Terminate the old instance<\/h3>\n<p>Terminate the old instance. Remember to delete any leftover resources which you no longer need.<\/p>\n","protected":false},"excerpt":{"rendered":"<p>This is easier than you probably think: AWS will expand the EBS boot volume\u00a0of an EC2 instance running Linux automatically when you launch a new instance off of it with the desired capacity. Here is how it works in more detail.<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"_genesis_hide_title":false,"_genesis_hide_breadcrumbs":false,"_genesis_hide_singular_image":false,"_genesis_hide_footer_widgets":false,"_genesis_custom_body_class":"","_genesis_custom_post_class":"","_genesis_layout":"","footnotes":""},"categories":[213],"tags":[76,58,63,28],"yoast_head":"<!-- This site is optimized with the Yoast SEO plugin v14.5 - https:\/\/yoast.com\/wordpress\/plugins\/seo\/ -->\n<title>How to expand the EBS boot volume of a Linux-based EC2 instance - CloudInsidr<\/title>\n<meta name=\"description\" content=\"Here is a detailed explanation of how to expand the EBS boot volume of an EC2 instance running Linux on AWS when you need more space.\" \/>\n<meta name=\"robots\" content=\"index, follow\" \/>\n<meta name=\"googlebot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<meta name=\"bingbot\" content=\"index, follow, max-snippet:-1, max-image-preview:large, max-video-preview:-1\" \/>\n<link rel=\"canonical\" href=\"https:\/\/www.cloudinsidr.com\/content\/how-to-expand-the-ebs-boot-volume-of-a-linux-based-ec2-instance\/\" \/>\n<meta property=\"og:locale\" content=\"en_US\" \/>\n<meta property=\"og:type\" content=\"article\" \/>\n<meta property=\"og:title\" content=\"How to expand the EBS boot volume of a Linux-based EC2 instance - CloudInsidr\" \/>\n<meta property=\"og:description\" content=\"Here is a detailed explanation of how to expand the EBS boot volume of an EC2 instance running Linux on AWS when you need more space.\" \/>\n<meta property=\"og:url\" content=\"https:\/\/www.cloudinsidr.com\/content\/how-to-expand-the-ebs-boot-volume-of-a-linux-based-ec2-instance\/\" \/>\n<meta property=\"og:site_name\" content=\"CloudInsidr\" \/>\n<meta property=\"article:published_time\" content=\"2018-06-10T20:44:15+00:00\" \/>\n<meta property=\"article:modified_time\" content=\"2018-06-10T21:03:12+00:00\" \/>\n<meta property=\"og:image\" content=\"https:\/\/www.cloudinsidr.com\/content\/wp-content\/uploads\/2018\/06\/check_free_space-e1528663041565.png\" \/>\n<meta name=\"twitter:card\" content=\"summary\" \/>\n<script type=\"application\/ld+json\" class=\"yoast-schema-graph\">{\"@context\":\"https:\/\/schema.org\",\"@graph\":[{\"@type\":\"WebSite\",\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/#website\",\"url\":\"https:\/\/www.cloudinsidr.com\/content\/\",\"name\":\"CloudInsidr\",\"description\":\"Cyber security, infotech\",\"potentialAction\":[{\"@type\":\"SearchAction\",\"target\":\"https:\/\/www.cloudinsidr.com\/content\/?s={search_term_string}\",\"query-input\":\"required name=search_term_string\"}],\"inLanguage\":\"en-US\"},{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/how-to-expand-the-ebs-boot-volume-of-a-linux-based-ec2-instance\/#primaryimage\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/www.cloudinsidr.com\/content\/wp-content\/uploads\/2018\/06\/check_free_space-e1528663041565.png\",\"width\":794,\"height\":325,\"caption\":\"Check storage space utilization on Linux\"},{\"@type\":\"WebPage\",\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/how-to-expand-the-ebs-boot-volume-of-a-linux-based-ec2-instance\/#webpage\",\"url\":\"https:\/\/www.cloudinsidr.com\/content\/how-to-expand-the-ebs-boot-volume-of-a-linux-based-ec2-instance\/\",\"name\":\"How to expand the EBS boot volume of a Linux-based EC2 instance - CloudInsidr\",\"isPartOf\":{\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/#website\"},\"primaryImageOfPage\":{\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/how-to-expand-the-ebs-boot-volume-of-a-linux-based-ec2-instance\/#primaryimage\"},\"datePublished\":\"2018-06-10T20:44:15+00:00\",\"dateModified\":\"2018-06-10T21:03:12+00:00\",\"author\":{\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/#\/schema\/person\/dd6ee9cb21cf05763fd7cff3d6f11b2b\"},\"description\":\"Here is a detailed explanation of how to expand the EBS boot volume of an EC2 instance running Linux on AWS when you need more space.\",\"inLanguage\":\"en-US\",\"potentialAction\":[{\"@type\":\"ReadAction\",\"target\":[\"https:\/\/www.cloudinsidr.com\/content\/how-to-expand-the-ebs-boot-volume-of-a-linux-based-ec2-instance\/\"]}]},{\"@type\":[\"Person\"],\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/#\/schema\/person\/dd6ee9cb21cf05763fd7cff3d6f11b2b\",\"name\":\"Cloud Insidr\",\"image\":{\"@type\":\"ImageObject\",\"@id\":\"https:\/\/www.cloudinsidr.com\/content\/#personlogo\",\"inLanguage\":\"en-US\",\"url\":\"https:\/\/secure.gravatar.com\/avatar\/8b2fa1415b3d573b97d818b8f8f83b7c?s=96&d=mm&r=g\",\"caption\":\"Cloud Insidr\"}}]}<\/script>\n<!-- \/ Yoast SEO plugin. -->","_links":{"self":[{"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/posts\/2161"}],"collection":[{"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/comments?post=2161"}],"version-history":[{"count":7,"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/posts\/2161\/revisions"}],"predecessor-version":[{"id":2172,"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/posts\/2161\/revisions\/2172"}],"wp:attachment":[{"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/media?parent=2161"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/categories?post=2161"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.cloudinsidr.com\/content\/wp-json\/wp\/v2\/tags?post=2161"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}