{"id":1873,"date":"2018-03-01T00:18:51","date_gmt":"2018-03-01T00:18:51","guid":{"rendered":"http:\/\/www.incredigeek.com\/home\/?p=1873"},"modified":"2018-03-01T00:20:49","modified_gmt":"2018-03-01T00:20:49","slug":"parted-resizing-notes","status":"publish","type":"post","link":"https:\/\/www.incredigeek.com\/home\/parted-resizing-notes\/","title":{"rendered":"Parted resizing notes"},"content":{"rendered":"<p>Launch parted with the following command.\u00a0 Specify the disk you want to modify.\u00a0 In this case \/dev\/sda.<\/p>\n<pre>sudo parted \/dev\/sda<\/pre>\n<p>Print partition and available free space.\u00a0 If you just run print, it will not show you the available free space.<\/p>\n<pre>(parted) print free<\/pre>\n<p>You can resize, or rather extend a partition using the &#8220;resizepart&#8221; command inside parted.\u00a0 Command syntax is as follows<\/p>\n<pre>(parted) resizepart PartitionNumber End<\/pre>\n<p>Example: Resize partition 1 to 30GB.\u00a0 Note you&#8217;ll need to specify the end part with the GB, otherwise, you&#8217;ll be shrinking the partition or making a mess&#8230;\u00a0 You can see what space is available with the &#8220;print free&#8221; command above<\/p>\n<pre>(parted) resizepart 1 30GB\r\n<\/pre>\n<p>After you have run the resizepart in parted, you&#8217;ll need to grow the filesystem, so run one of the following commands from the local shell.<\/p>\n<pre>resize2fs \/dev\/sda1<\/pre>\n<p>Or for XFS partitions<\/p>\n<pre>xfs_growfs \/dev\/sda1<\/pre>\n<p>You can check the partition size with<\/p>\n<pre>df -h<\/pre>\n<p>or<\/p>\n<pre>sudo fdisk -l \/dev\/sda<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>Launch parted with the following command.\u00a0 Specify the disk you want to modify.\u00a0 In this case \/dev\/sda. sudo parted \/dev\/sda Print partition and available free space.\u00a0 If you just run print, it will not show you the available free space. &hellip; <a href=\"https:\/\/www.incredigeek.com\/home\/parted-resizing-notes\/\">Continue reading <span class=\"meta-nav\">&rarr;<\/span><\/a><\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[4,3],"tags":[398,7,397,399],"class_list":["post-1873","post","type-post","status-publish","format-standard","hentry","category-command-line","category-linux","tag-hhd","tag-linux-2","tag-parted","tag-partitioning"],"_links":{"self":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/1873","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/comments?post=1873"}],"version-history":[{"count":2,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/1873\/revisions"}],"predecessor-version":[{"id":1880,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/posts\/1873\/revisions\/1880"}],"wp:attachment":[{"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/media?parent=1873"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/categories?post=1873"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.incredigeek.com\/home\/wp-json\/wp\/v2\/tags?post=1873"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}