{"id":3363,"date":"2019-06-22T12:08:06","date_gmt":"2019-06-22T04:08:06","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=3363"},"modified":"2023-12-05T04:02:28","modified_gmt":"2023-12-04T20:02:28","slug":"resize2fs","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/resize2fs","title":{"rendered":"resize2fs\u547d\u4ee4 &#8211; \u540c\u6b65\u6587\u4ef6\u7cfb\u7edf\u5bb9\u91cf\u5230\u5185\u6838"},"content":{"rendered":"\n<p>resize2fs\u547d\u4ee4\u6765\u81ea\u82f1\u6587\u8bcd\u7ec4resize to filesystem\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u540c\u6b65\u6587\u4ef6\u7cfb\u7edf\u5bb9\u91cf\u5230\u5185\u6838\u3002\u5982\u5bf9EXT3\u3001EXT4\u3001XFS\u7b49\u8bbe\u5907\u5377\u5bb9\u91cf\u8fdb\u884c\u4e86\u8c03\u6574\uff0c\u5219\u9700\u8981\u4f7f\u7528resize2fs\u547d\u4ee4\u540c\u6b65\u4fe1\u606f\u5230\u7cfb\u7edf\u5185\u6838\u3002<\/p>\n\n\n\n<p><strong>\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>resize2fs \u53c2\u6570 \u8bbe\u5907\u540d<\/p>\n\n\n\n<p><strong>\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n<figure class=\"wp-block-table\"><table><tbody><tr><td>-d<\/td><td>\u6253\u5f00\u8c03\u8bd5\u7279\u6027<\/td><td rowspan=\"3\">&nbsp;<\/td><td>-M<\/td><td>\u5c06\u6587\u4ef6\u7cfb\u7edf\u7f29\u5c0f\u5230\u6700\u5c0f\u503c<\/td><\/tr><tr><td>-f<\/td><td>\u5f3a\u5236\u8c03\u6574\u8bbe\u5907\u5bb9\u91cf\u800c\u4e0d\u8be2\u95ee<\/td><td>-p<\/td><td>\u663e\u793a\u5df2\u5b8c\u6210\u7684\u767e\u5206\u6bd4\u8fdb\u5ea6\u6761<\/td><\/tr><tr><td>-F<\/td><td>\u5237\u65b0\u6587\u4ef6\u7cfb\u7edf\u8bbe\u5907\u7684\u7f13\u51b2\u533a<\/td><td>-P<\/td><td>\u663e\u793a\u6587\u4ef6\u7cfb\u7edf\u7684\u6700\u5c0f\u503c<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n<p><strong>\u53c2\u8003\u793a\u4f8b<\/strong><\/p>\n\n\n\n<p>\u540c\u6b65\u6587\u4ef6\u7cfb\u7edf\u5bb9\u91cf\u4fe1\u606f\u5230\u7cfb\u7edf\u5185\u6838\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@linuxcool ~]# resize2fs \/dev\/sdb \r\nresize2fs 1.44.3 (10-July-2018) \r\nThe filesystem is already 5242880 (4k) blocks long. Nothing to do! \r<\/pre>\n\n\n\n<p>\u540c\u6b65\u6587\u4ef6\u7cfb\u7edf\u5bb9\u91cf\u4fe1\u606f\u5230\u7cfb\u7edf\u5185\u6838\uff0c\u5e76\u663e\u793a\u767e\u5206\u6bd4\u8fdb\u5ea6\u6761\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@linuxcool ~]# resize2fs -p \/dev\/sdb<\/pre>\n\n\n\n<p>\u5f3a\u5236\u540c\u6b65\u7cfb\u7edf\u5bb9\u91cf\u4fe1\u606f\u5230\u7cfb\u7edf\u5185\u6838\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@linuxcool ~]# resize2fs -f \/dev\/sdb<\/pre>\n\n\n\n<p>\u5237\u65b0\u6587\u4ef6\u7cfb\u7edf\u8bbe\u5907\u7684\u7f13\u51b2\u533a\uff0c\u968f\u540e\u540c\u6b65\u5bb9\u91cf\u4fe1\u606f\u5230\u7cfb\u7edf\u5185\u6838\uff1a<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">[root@linuxcool ~]# resize2fs -F \/dev\/sdb<\/pre>\n","protected":false},"excerpt":{"rendered":"<p>resize2fs\u547d\u4ee4\u6765\u81ea\u82f1\u6587\u8bcd\u7ec4resize to filesystem\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u540c\u6b65\u6587\u4ef6\u7cfb\u7edf\u5bb9\u91cf\u5230\u5185 [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[7],"tags":[],"class_list":["post-3363","post","type-post","status-publish","format-standard","hentry","category-system"],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3363","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/comments?post=3363"}],"version-history":[{"count":16,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3363\/revisions"}],"predecessor-version":[{"id":16661,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3363\/revisions\/16661"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=3363"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=3363"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=3363"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}