{"id":32908,"date":"2019-10-31T21:49:39","date_gmt":"2019-10-31T18:49:39","guid":{"rendered":"https:\/\/prohoster.info\/blog\/kak-bystro-uvelichit-razmer-diska-na-servere\/"},"modified":"2019-10-31T21:49:39","modified_gmt":"2019-10-31T18:49:39","slug":"kak-bystro-uvelichit-razmer-diska-na-servere","status":"publish","type":"post","link":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/kak-bystro-uvelichit-razmer-diska-na-servere","title":{"rendered":"How to Quickly Increase the Disk Size on a Server","gt_translate_keys":[{"key":"rendered","format":"text"}]},"content":{"rendered":"<p>Hello everyone! I recently faced a seemingly simple task \u2014 to increase the disk size on a Linux server 'on the fly'.<\/p>\n<h4>Task Description<\/h4>\n<p>\nI have a cloud server. In my case, it\u2019s Google Cloud \u2014 Compute Engine. The operating system is Ubuntu. Currently, there is a disk size of 30 GB connected. The database is growing, files are inflating, so I need to increase the disk size, say, to 50 GB. Meanwhile, we won't turn anything off or reboot. <br \/>\n<noindex><a rel=\"nofollow\" name=\"habracut\"><\/a><\/noindex><br \/>\n<b>Attention! Before starting, make a backup of all important information!<\/b><\/p>\n<p>1. First, let's check how much free space we have in total. In the Linux console, we write:<\/p>\n<pre><code class=\"bash\">df -h<\/code><\/pre>\n<p>\n<img decoding=\"async\" alt=\"How to Quickly Increase the Disk Size on a Server\" src=\"\/wp-content\/uploads\/2019\/05\/6c119db09e126a668d36b75290215ed8.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<i>Simply put, I have 30 GB in total and 7.9 GB currently free. It needs to be increased.<\/i><\/p>\n<p>2. Next, I go to my hosting provider's console and attach a bit more GB. In Google Cloud, this is done easily, without rebooting. I go to Compute Engine -&gt; Disks -&gt; Select the disk of my server \u2014 we will change its size:<\/p>\n<p><img decoding=\"async\" alt=\"How to Quickly Increase the Disk Size on a Server\" src=\"\/wp-content\/uploads\/2019\/05\/663cbd55a4eef65b6dd26eaf5727022a.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<i>I enter, click 'Edit', and increase the disk size to the desired dimensions (in my case, to 50 GB).<\/i><\/p>\n<p>3. So, now we have 50 GB. Let's check this with <a class=\"wpil_keyword_link\" href=\"https:\/\/prohoster.info\/en\/server\/dts-dronten\/\"   title=\"server\" data-wpil-keyword-link=\"linked\"  data-wpil-monitor-id=\"2477\">server<\/a> with the command:<\/p>\n<pre><code class=\"bash\">sudo fdisk -l<\/code><\/pre>\n<p>\n<img decoding=\"async\" alt=\"How to Quickly Increase the Disk Size on a Server\" src=\"\/wp-content\/uploads\/2019\/05\/99781571a8a58ea986c00d61d0c28653.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<i>We see our new 50 GB, but currently, we can only use 30 GB.<\/i><\/p>\n<p>4. Now we will delete the current 30 GB partition and create a new one for 50 GB. You may have several partitions. You might need to create a few new partitions as well. For this operation, we will use the program <b>fdisk<\/b>, which allows managing hard disk partitions. It\u2019s also important to understand what disk partitions are and their purposes \u2014 read <noindex><a rel=\"nofollow\" href=\"https:\/\/help.ubuntu.ru\/wiki\/%D1%80%D0%B0%D0%B7%D0%B4%D0%B5%D0%BB%D1%8B_%D0%B8_%D1%84%D0%B0%D0%B9%D0%BB%D0%BE%D0%B2%D1%8B%D0%B5_%D1%81%D0%B8%D1%81%D1%82%D0%B5%D0%BC%D1%8B_linux\">here<\/a><\/noindex>. To launch the program <b>fdisk<\/b> we use the command:<\/p>\n<pre><code class=\"bash\">sudo fdisk \/dev\/sda<\/code><\/pre>\n<p>\n5. Inside the interactive mode of the program <b>fdisk<\/b> we perform several operations. <\/p>\n<p>First, we type in:<\/p>\n<pre><code class=\"bash\">p<\/code><\/pre>\n<p>\n<img decoding=\"async\" alt=\"How to Quickly Increase the Disk Size on a Server\" src=\"\/wp-content\/uploads\/2019\/05\/99431f792e1d7fc071d3ec7f04b724c0.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<i>The command outputs a list of our current partitions. In my case, there is one partition of 30 GB and another 20 GB floating free, so to speak.<\/i><\/p>\n<p>6. Next, we type in:<\/p>\n<pre><code class=\"bash\">d<\/code><\/pre>\n<p>\n<img decoding=\"async\" alt=\"How to Quickly Increase the Disk Size on a Server\" src=\"\/wp-content\/uploads\/2019\/05\/6d5f5bfb9d42eb1d12f5840863d3da53.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<i>We delete the current partition to create a new one for all 50 GB. <b>Before the operation, double-check if we've made a backup of important information!<\/b><\/i><\/p>\n<p>7. Next, we specify to the program:<\/p>\n<pre><code class=\"bash\">n<\/code><\/pre>\n<p>\n<img decoding=\"async\" alt=\"How to Quickly Increase the Disk Size on a Server\" src=\"\/wp-content\/uploads\/2019\/05\/98e66b953a749a5f8741fe81398df5c7.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<i>The command creates a new partition. All parameters should be set to default \u2014 you can just hit Enter. If you have a specific case, specify your own parameters. As shown in the screenshot, I created a partition of 50 GB \u2014 just what I need.<\/i><\/p>\n<p>8. As a result, I specify to the program:<\/p>\n<pre><code class=\"bash\">w<\/code><\/pre>\n<p>\n<img decoding=\"async\" alt=\"How to Quickly Increase the Disk Size on a Server\" src=\"\/wp-content\/uploads\/2019\/05\/59375880e5a8545c3b1abee50590dec6.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<i>This command writes the changes and exits. <b>fdisk<\/b>Don't be alarmed that reading the partition table failed. The next command will help fix this. We're almost there.<\/i><\/p>\n<p>9. We exited <b>fdisk<\/b> and returned to the main Linux command line. Next, we type as advised earlier:<\/p>\n<pre><code class=\"bash\">sudo partprobe \/dev\/sda<\/code><\/pre>\n<p>\n<i>If everything goes well, you won't see any message. If you don't have the program <b>partprobe<\/b>, then install it. This will <b>partprobe<\/b> update the partition tables, allowing us to extend the partition to 50 GB online. Let's continue.<\/i><\/p>\n<p><i>Tip! You can install <b>partprobe<\/b> like this:<\/p>\n<pre><code class=\"bash\"> apt-get install partprobe<\/code><\/pre>\n<p><\/i><br \/>\n10. Now we need to redefine the partition size using the program <b>resize2fs<\/b>. It will do this online \u2014 I even had scripts running and writing to the disk at that moment. <\/p>\n<p>Program <b>resize2fs<\/b> will rewrite the filesystem metadata. For this, we use the following command:<\/p>\n<pre><code class=\"bash\">sudo resize2fs \/dev\/sda1<\/code><\/pre>\n<p>\n<img decoding=\"async\" alt=\"How to Quickly Increase the Disk Size on a Server\" src=\"\/wp-content\/uploads\/2019\/05\/2da0d8a647ba25800c2f03a7eb0c883b.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<i>Here sda1 is the name of your partition. In most cases, it's sda1, but there may be exceptions. Be careful. As a result, the program changed our partition size. I think this is a success.<\/i><\/p>\n<p>11. Now let's make sure that the partition size has changed and we now have 50 GB. To do this, we repeat the very first command:<\/p>\n<pre><code class=\"bash\">df -h<\/code><\/pre>\n<p>\n<img decoding=\"async\" alt=\"How to Quickly Increase the Disk Size on a Server\" src=\"\/wp-content\/uploads\/2019\/05\/6f0029e5888c459b4b41c0e995798266.png\" style=\"display:block;margin: 0 auto;\" \/><br \/>\n<br \/>Source: <a content=\"nofollow\" rel=\"nofollow\" href=\"https:\/\/habr.com\/ru\/post\/450444\/\">habr.com<\/a><\/p>","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"excerpt":{"rendered":"<p>\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u2014 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u00ab\u043d\u0430 \u0433\u043e\u0440\u044f\u0447\u0443\u044e\u00bb \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0438\u0441\u043a\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Linux. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0415\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435. \u0412 \u043c\u043e\u0435\u043c \u0441\u043b\u0443\u0447\u0430\u0435, \u044d\u0442\u043e Google Cloud \u2014 Compute Engine. \u041e\u043f\u0435\u0440\u0430\u0446\u0438\u043e\u043d\u043d\u0430\u044f \u0441\u0438\u0441\u0442\u0435\u043c\u0430 \u2014 Ubuntu. \u0421\u0435\u0439\u0447\u0430\u0441 \u043f\u043e\u0434\u043a\u043b\u044e\u0447\u0435\u043d \u0434\u0438\u0441\u043a \u0440\u0430\u0437\u043c\u0435\u0440\u043e\u043c 30 \u0413\u0431. \u0411\u0430\u0437\u0430 \u0440\u0430\u0441\u0442\u0435\u0442, \u0444\u0430\u0439\u043b\u044b \u043f\u0443\u0445\u043d\u0443\u0442, \u043f\u043e\u044d\u0442\u043e\u043c\u0443 \u043d\u0443\u0436\u043d\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0438\u0441\u043a\u0430, \u0434\u043e\u043f\u0443\u0441\u0442\u0438\u043c, \u0434\u043e [&hellip;]<\/p>\n","protected":false,"gt_translate_keys":[{"key":"rendered","format":"html"}]},"author":1,"featured_media":24672,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[688],"tags":[],"class_list":["post-32908","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-administrirovanie"],"aioseo_notices":[],"aioseo_head":"\n\t\t<!-- All in One SEO 5.0.1.1 - aioseo.com -->\n\t<meta name=\"description\" content=\"\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u2014 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u00ab\u043d\u0430 \u0433\u043e\u0440\u044f\u0447\u0443\u044e\u00bb \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0438\u0441\u043a\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Linux. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0415\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435.\" \/>\n\t<meta name=\"robots\" content=\"max-image-preview:large\" \/>\n\t<meta name=\"author\" content=\"Yuri Gagarin\"\/>\n\t<link rel=\"canonical\" href=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/kak-bystro-uvelichit-razmer-diska-na-servere\" \/>\n\t<meta name=\"generator\" content=\"All in One SEO (AIOSEO) 5.0.1.1\" \/>\n\t\t<meta property=\"og:locale\" content=\"en_US\" \/>\n\t\t<meta property=\"og:site_name\" content=\"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b\" \/>\n\t\t<meta property=\"og:type\" content=\"article\" \/>\n\t\t<meta property=\"og:title\" content=\"\ud83e\udd47\u041a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0438\u0441\u043a\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 | ProHoster\" \/>\n\t\t<meta property=\"og:description\" content=\"\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u2014 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u00ab\u043d\u0430 \u0433\u043e\u0440\u044f\u0447\u0443\u044e\u00bb \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0438\u0441\u043a\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Linux. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0415\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435.\" \/>\n\t\t<meta property=\"og:url\" content=\"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/kak-bystro-uvelichit-razmer-diska-na-servere\" \/>\n\t\t<meta property=\"og:image\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:secure_url\" content=\"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg\" \/>\n\t\t<meta property=\"og:image:width\" content=\"350\" \/>\n\t\t<meta property=\"og:image:height\" content=\"350\" \/>\n\t\t<meta property=\"article:published_time\" content=\"2019-10-31T18:49:39+00:00\" \/>\n\t\t<meta property=\"article:modified_time\" content=\"2019-10-31T18:49:39+00:00\" \/>\n\t\t<meta property=\"article:publisher\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<meta property=\"article:author\" content=\"https:\/\/www.facebook.com\/prohoster\" \/>\n\t\t<!-- All in One SEO -->\n\n","aioseo_head_json":{"title":"\ud83e\udd47How to Quickly Increase Disk Size on a Server | ProHoster","description":"Hello everyone! Recently, I faced a seemingly simple task \u2014 to 'hot' increase the disk size on a Linux server. Task description: There is a cloud server.","canonical_url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/kak-bystro-uvelichit-razmer-diska-na-servere","robots":"max-image-preview:large","keywords":"","webmasterTools":{"miscellaneous":""},"schema":null,"og:locale":"en_US","og:site_name":"ProHoster | \u041a\u0443\u043f\u0438\u0442\u044c \u043d\u0430\u0434\u0435\u0436\u043d\u044b\u0439 \u0445\u043e\u0441\u0442\u0438\u043d\u0433 \u0434\u043b\u044f \u0441\u0430\u0439\u0442\u043e\u0432 \u0441 \u0437\u0430\u0449\u0438\u0442\u043e\u0439 \u043e\u0442 DDoS, VPS VDS \u0441\u0435\u0440\u0432\u0435\u0440\u044b","og:type":"article","og:title":"\ud83e\udd47\u041a\u0430\u043a \u0431\u044b\u0441\u0442\u0440\u043e \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0438\u0441\u043a\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 | ProHoster","og:description":"\u0412\u0441\u0435\u043c \u043f\u0440\u0438\u0432\u0435\u0442! \u041d\u0435\u0434\u0430\u0432\u043d\u043e \u0441\u0442\u043e\u043b\u043a\u043d\u0443\u043b\u0441\u044f \u0441 \u043f\u0440\u043e\u0441\u0442\u043e\u0439 \u043d\u0430 \u043f\u0435\u0440\u0432\u044b\u0439 \u0432\u0437\u0433\u043b\u044f\u0434 \u0437\u0430\u0434\u0430\u0447\u0435\u0439 \u2014 \u0443\u0432\u0435\u043b\u0438\u0447\u0438\u0442\u044c \u00ab\u043d\u0430 \u0433\u043e\u0440\u044f\u0447\u0443\u044e\u00bb \u0440\u0430\u0437\u043c\u0435\u0440 \u0434\u0438\u0441\u043a\u0430 \u043d\u0430 \u0441\u0435\u0440\u0432\u0435\u0440\u0435 Linux. \u041e\u043f\u0438\u0441\u0430\u043d\u0438\u0435 \u0437\u0430\u0434\u0430\u0447\u0438 \u0415\u0441\u0442\u044c \u0441\u0435\u0440\u0432\u0435\u0440 \u0432 \u043e\u0431\u043b\u0430\u043a\u0435.","og:url":"https:\/\/prohoster.info\/en\/blog\/administrirovanie\/kak-bystro-uvelichit-razmer-diska-na-servere","og:image":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:secure_url":"https:\/\/prohoster.info\/wp-content\/uploads\/2021\/11\/logo-350.jpg","og:image:width":350,"og:image:height":350,"article:published_time":"2019-10-31T18:49:39+00:00","article:modified_time":"2019-10-31T18:49:39+00:00","article:publisher":"https:\/\/www.facebook.com\/prohoster","article:author":"https:\/\/www.facebook.com\/prohoster"},"aioseo_meta_data":{"post_id":"32908","title":null,"description":null,"keywords":null,"keyphrases":null,"primary_term":null,"canonical_url":null,"og_title":null,"og_description":null,"og_object_type":"default","og_image_type":"default","og_image_url":null,"og_image_width":null,"og_image_height":null,"og_image_custom_url":null,"og_image_custom_fields":null,"og_video":null,"og_custom_url":null,"og_article_section":null,"og_article_tags":null,"twitter_use_og":false,"twitter_card":"default","twitter_image_type":"default","twitter_image_url":null,"twitter_image_custom_url":null,"twitter_image_custom_fields":null,"twitter_title":null,"twitter_description":null,"schema":{"blockGraphs":[],"customGraphs":[],"default":{"data":{"Article":[],"Course":[],"Dataset":[],"FAQPage":[],"Movie":[],"Person":[],"Product":[],"ProductReview":[],"Car":[],"Recipe":[],"Service":[],"SoftwareApplication":[],"WebPage":[]},"graphName":"","isEnabled":true},"graphs":[]},"schema_type":null,"schema_type_options":null,"pillar_content":false,"robots_default":true,"robots_noindex":false,"robots_noarchive":false,"robots_nosnippet":false,"robots_nofollow":false,"robots_noimageindex":false,"robots_noodp":false,"robots_notranslate":false,"robots_max_snippet":null,"robots_max_videopreview":null,"robots_max_imagepreview":"large","priority":null,"frequency":null,"local_seo":null,"seo_analyzer_scan_date":"2026-02-09 21:46:18","breadcrumb_settings":null,"limit_modified_date":false,"reviewed_by":null,"ai":null,"created":"2021-03-01 01:44:23","updated":"2026-02-09 21:46:18","focus_keyword":null,"additional_keywords":null,"truseo_locale":null},"gt_translate_keys":[{"key":"link","format":"url"}],"_links":{"self":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/32908","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/comments?post=32908"}],"version-history":[{"count":1,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/32908\/revisions"}],"predecessor-version":[{"id":159759,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/posts\/32908\/revisions\/159759"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media\/24672"}],"wp:attachment":[{"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/media?parent=32908"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/categories?post=32908"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/prohoster.info\/en\/wp-json\/wp\/v2\/tags?post=32908"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}