{"id":3363,"date":"2019-06-22T12:08:06","date_gmt":"2019-06-22T04:08:06","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=3363"},"modified":"2022-05-11T16:27:01","modified_gmt":"2022-05-11T08:27:01","slug":"resize2fs","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/resize2fs","title":{"rendered":"resize2fs\u547d\u4ee4 – \u540c\u6b65\u6587\u4ef6\u7cfb\u7edf\u5bb9\u91cf\u5230\u5185\u6838"},"content":{"rendered":"\n

resize2fs\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201cresize to filesystem\u201d\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\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

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>resize2fs [\u53c2\u6570] \u8bbe\u5907<\/p>\n\n\n\n

\u5e38\u7528\u53c2\u6570\uff1a<\/strong><\/p>\n\n\n\n

-d<\/td>\u6253\u5f00\u8c03\u8bd5\u7279\u6027<\/td><\/tr>
-p<\/td>\u6253\u5370\u5df2\u5b8c\u6210\u7684\u767e\u5206\u6bd4\u8fdb\u5ea6\u6761<\/td><\/tr>
-f<\/td>\u5f3a\u5236\u6267\u884c\u8c03\u6574\u5927\u5c0f\u64cd\u4f5c<\/td><\/tr>
-F<\/td>\u5237\u65b0\u6587\u4ef6\u7cfb\u7edf\u8bbe\u5907\u7684\u7f13\u51b2\u533a<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

\u53c2\u8003\u5b9e\u4f8b<\/strong><\/p>\n\n\n\n

\u540c\u6b65\u6587\u4ef6\u7cfb\u7edf\u5bb9\u91cf\u4fe1\u606f\u5230\u7cfb\u7edf\u5185\u6838\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# resize2fs \/dev\/sdb<\/strong>\nresize2fs 1.44.3 (10-July-2018)\nThe filesystem is already 5242880 (4k) blocks long.  Nothing to do!<\/pre>\n\n\n\n

\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

[root@linuxcool ~]# resize2fs -p \/dev\/sdb<\/strong>\n<\/pre>\n\n\n\n

\u5f3a\u5236\u540c\u6b65\u7cfb\u7edf\u5bb9\u91cf\u4fe1\u606f\u5230\u7cfb\u7edf\u5185\u6838\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# resize2fs -f \/dev\/sdb<\/strong><\/pre>\n\n\n\n

\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

[root@linuxcool ~]# resize2fs -F \/dev\/sdb<\/strong><\/pre>\n","protected":false},"excerpt":{"rendered":"

resize2fs\u547d\u4ee4\u6765\u81ea\u4e8e\u82f1\u6587\u8bcd\u7ec4\u201cresize to filesystem\u201d\u7684\u7f29\u5199\uff0c\u5176\u529f\u80fd\u662f\u7528\u4e8e\u540c\u6b65\u6587\u4ef6\u7cfb […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[7],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3363"}],"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":12,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3363\/revisions"}],"predecessor-version":[{"id":9502,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/3363\/revisions\/9502"}],"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}]}}