{"id":7291,"date":"2020-04-29T18:53:05","date_gmt":"2020-04-29T10:53:05","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=7291"},"modified":"2020-04-29T18:53:08","modified_gmt":"2020-04-29T10:53:08","slug":"fsadm","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/fsadm","title":{"rendered":"fsadm\u547d\u4ee4 – \u5728\u8bbe\u5907\u4e0a\u8c03\u6574\u6216\u68c0\u67e5\u6587\u4ef6\u7cfb\u7edf"},"content":{"rendered":"\n

fsadm\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u5728\u8bbe\u5907\u4e0a\u8c03\u6574\u6216\u68c0\u67e5\u6587\u4ef6\u7cfb\u7edf\u3002fsadm\u547d\u4ee4\u4f7f\u7528\u76f8\u540c\u7684API\u5bf9ext2\uff0cext3\uff0cext4\uff0cReiserFS\u548cXFS\u6587\u4ef6\u7cfb\u7edf\u8fdb\u884c\u64cd\u4f5c\u3002<\/p>\n\n\n\n

\u5f53fsadm\u547d\u4ee4\u6210\u529f\u5b8c\u6210\u540e\uff0c\u72b6\u6001\u4ee3\u7801\u4e3a0\u3002\u72b6\u6001\u4ee3\u78012\u8868\u793a\u64cd\u4f5c\u5df2\u88ab\u7528\u6237\u4e2d\u65ad\u3002\u72b6\u6001\u4ee3\u78013\u8868\u793a\u7531\u4e8e\u6587\u4ef6\u7cfb\u7edf\u5df2\u5b89\u88c5\u4e14\u4e0d\u652f\u6301\u5728\u7ebffsck\uff0c\u65e0\u6cd5\u6267\u884c\u8bf7\u6c42\u7684\u68c0\u67e5\u64cd\u4f5c\u3002\u5176\u4ed6\u6545\u969c\u4f7f\u7528\u72b6\u6001\u78011\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>fsadm [\u53c2\u6570] check [\u8bbe\u5907]
fsadm [\u53c2\u6570] resize [\u8bbe\u5907] [\u65b0\u7684\u5927\u5c0f]<\/p>\n\n\n\n

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

-v<\/td>\u5197\u957f\u6a21\u5f0f<\/td><\/tr>
-e<\/td>\u5728\u8c03\u6574\u5927\u5c0f\u4e4b\u524d\u5378\u8f7d\u6587\u4ef6\u7cfb\u7edf<\/td><\/tr>
-f<\/td>\u7701\u7565\u5408\u7406\u68c0\u67e5<\/td><\/tr>
-n<\/td>\u65e0\u9700\u8fd0\u884c\uff0c\u663e\u793a\u547d\u4ee4<\/td><\/tr>
-l<\/td>\u8c03\u6574\u6307\u5b9a\u7684\u8bbe\u5907\uff08\u5982\u679c\u5b83\u662fLVM\u8bbe\u5907\uff09<\/td><\/tr>
-y<\/td>\u4efb\u4f55\u63d0\u793a\u56de\u7b54\u662fyes<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

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

\u5728\u8bbe\u5907\/dev\/sda1\u4e0a\u68c0\u67e5\u6587\u4ef6\u7cfb\u7edf\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# fsadm check \/dev\/sda1<\/pre>\n\n\n\n

\u5728\u8bbe\u5907\/dev\/sda1\u4e0a\u8c03\u6574\u6587\u4ef6\u7cfb\u7edf\u5927\u5c0f\u4e3a20480KB\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# fsadm resize \/dev\/sda1 20480<\/pre>\n\n\n\n

\u5728\u8bbe\u5907\/dev\/test\u4e0a\u7684\u6587\u4ef6\u7cfb\u7edf\u8c03\u6574\u4e3a3048MB\u3002\u5982\u679c\u5305\u542b\u5176\u5b83\u6587\u4ef6\u7cfb\u7edf\uff0c\u5b83\u5c06\u5728\u8c03\u6574\u5927\u5c0f\u4e4b\u524d\u88ab\u5378\u8f7d\u3002\u6240\u6709\u95ee\u9898\u90fd\u5c06\u56de\u7b54\u201c y\u201d\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# fsadm -e -y resize \/dev\/test 3048M<\/pre>\n","protected":false},"excerpt":{"rendered":"

fsadm\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u5728\u8bbe\u5907\u4e0a\u8c03\u6574\u6216\u68c0\u67e5\u6587\u4ef6\u7cfb\u7edf\u3002fsadm\u547d\u4ee4\u4f7f\u7528\u76f8\u540c\u7684API\u5bf9ext2\uff0cext3\uff0cext4 […]<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":[],"categories":[5],"tags":[],"_links":{"self":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/7291"}],"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=7291"}],"version-history":[{"count":6,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/7291\/revisions"}],"predecessor-version":[{"id":7297,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/7291\/revisions\/7297"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=7291"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=7291"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=7291"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}