{"id":7901,"date":"2020-06-13T15:37:16","date_gmt":"2020-06-13T07:37:16","guid":{"rendered":"https:\/\/www.linuxcool.com\/?p=7901"},"modified":"2020-06-13T15:37:17","modified_gmt":"2020-06-13T07:37:17","slug":"lvchange","status":"publish","type":"post","link":"https:\/\/www.linuxcool.com\/lvchange","title":{"rendered":"lvchange\u547d\u4ee4 – \u66f4\u6539\u903b\u8f91\u5377\u5c5e\u6027"},"content":{"rendered":"\n

lvchange\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u53ef\u4ee5\u66f4\u6539\u4e00\u4e2a\u903b\u8f91\u5377\u7684\u5c5e\u6027\u3002<\/p>\n\n\n\n

\u903b\u8f91\u5377\u662f\u4e00\u79cddevice mapper\u6280\u672f\uff0c\u5373\u53ef\u4ee5\u5c06\u4e00\u4e2a\u6216\u8005\u591a\u4e2a\u5e95\u5c42\u5757\u8bbe\u5907\u7ec4\u7ec7\u6210\u4e00\u4e2a\u903b\u8f91\u8bbe\u5907\uff0c\u4ece\u800c\u63d0\u4f9b\u52a8\u6001\u6539\u53d8\u5927\u5c0f\uff0c\u4e0d\u505c\u673a\u60c5\u51b5\u4e0b\u6dfb\u52a0\u78c1\u76d8\uff0c\u5feb\u7167\u4ee5\u53ca\u5907\u4efd \u7b49\u529f\u80fd\uff0c\u4f7f\u5f97\u5bf9\u4e8e\u78c1\u76d8\u7684\u7ba1\u7406\u66f4\u52a0\u65b9\u4fbf\u3002<\/p>\n\n\n\n

\u903b\u8f91\u5377\u7684\u4f53\u7cfb\u5206\u4e3a3\u4e2a\u5c42\u6b21: \u5e95\u5c42\u7684PV\uff0c\u4e2d\u5c42\u7684VG\uff0c\u6700\u4e0a\u5c42\u7684LV\u3002<\/p>\n\n\n\n

\u8bed\u6cd5\u683c\u5f0f\uff1a<\/strong>lvchange [\u53c2\u6570] [\u903b\u8f91\u5377\u8def\u5f84]<\/p>\n\n\n\n

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

-p<r|rw><\/td>\u66f4\u6539\u8bbf\u95ee\u6743\u9650\u4e3a\u53ea\u8bfb\uff08r\uff09\u6216\u8bfb\/\u5199\uff08rw\uff09<\/td><\/tr>
-C<y|n><\/td>\u4e3a\u903b\u8f91\u5377\u8bd5\u56fe\u8bbe\u7f6e\u6216\u91cd\u7f6e\u8fde\u7eed\u5206\u914d\u7b56\u7565<\/td><\/tr>
--monitor<y|n><\/td>\u5982\u679cdmeventd\u5df2\u5b89\u88c5\uff0c\u542f\u52a8\u6216\u505c\u6b62\u76d1\u63a7\u955c\u50cf\u6216\u5feb\u7167\u903b\u8f91\u5377<\/td><\/tr>
-M<y|n><\/td>\u8bbe\u7f6e\u4e3ay\u4ee5\u4f7f\u6b21\u8981\u53f7\u7801\u6307\u5b9a\u4e3a\u6c38\u4e45<\/td><\/tr>
-a<a|e|1|y|n><\/td>\u63a7\u5236\u4f7f\u7528\u7684\u903b\u8f91\u5377\u7684\u53ef\u7528\u6027<\/td><\/tr>
--refresh<\/td>\u5982\u679c\u903b\u8f91\u5377\u88ab\u6fc0\u6d3b\uff0c\u91cd\u65b0\u52a0\u8f7d\u5176\u5143\u6570\u636e<\/td><\/tr>
--noudevsync<\/td>\u7981\u7528udev\u540c\u6b65<\/td><\/tr>
-r<ReadAheadSectors|auto|none><\/td>\u8bbe\u7f6e\u9884\u8bfb\u6bd4\u903b\u8f91\u5377\u7684\u6247\u533a\u6570\uff0c\u53ef\u4ee5\u8bbe\u7f6e\u4e3aReadAheadSectors\u3001auto\u3001none<\/td><\/tr>
--minor<\u6b21\u8981\u53f7\u7801><\/td>\u8bbe\u7f6e\u6b21\u8981\u53f7\u7801<\/td><\/tr>
--resync<\/td>\u5f3a\u5236\u955c\u50cf\u5b8c\u5168\u540c\u6b65\u3002\u5728\u6b63\u5e38\u60c5\u51b5\u4e0b\u4e0d\u9700\u8981\u8fd9\u4e2a\u9009\u9879\uff0c\u56e0\u4e3a\u540c\u6b65\u662f\u81ea\u52a8\u53d1\u751f\u7684<\/td><\/tr>
--sysinit<\/td>\u8868\u660e\u5728\u53ef\u5199\u7684\u6587\u4ef6\u7cfb\u7edf\u53ef\u7528\u4e4b\u524d\uff0c\u4ece\u65e9\u671f\u7684\u7cfb\u7edf\u521d\u59cb\u5316\u811a\u672c<\/td><\/tr><\/tbody><\/table><\/figure>\n\n\n\n

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

\u5c06\u903b\u8f91\u5377\/dev\/vg1\/linuxcool_v1\u7684\u72b6\u6001\u8bbe\u7f6e\u4e3a\u4e0d\u53ef\u7528\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# lvchange -a y \/dev\/vg1\/linuxcool_v1<\/pre>\n\n\n\n

\u5c06\u903b\u8f91\u5377linuxcool_v1\u7684\u8bbf\u95ee\u6743\u9650\u8bbe\u7f6e\u4e3a\u53ea\u8bfb\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# lvchange -p r vg1\/linuxcool_v1<\/pre>\n\n\n\n

\u5c06\u903b\u8f91\u5377linuxcool_v1\u7684\u8bbf\u95ee\u6743\u9650\u8bbe\u7f6e\u4e3a\u8bfb\u5199\uff1a<\/p>\n\n\n\n

[root@linuxcool ~]# lvchange -p rw vg1\/linuxcool_v1<\/pre>\n","protected":false},"excerpt":{"rendered":"

lvchange\u547d\u4ee4\u7684\u4f5c\u7528\u662f\u53ef\u4ee5\u66f4\u6539\u4e00\u4e2a\u903b\u8f91\u5377\u7684\u5c5e\u6027\u3002 \u903b\u8f91\u5377\u662f\u4e00\u79cddevice mapper\u6280\u672f\uff0c\u5373\u53ef\u4ee5\u5c06\u4e00 […]<\/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\/7901"}],"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=7901"}],"version-history":[{"count":3,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/7901\/revisions"}],"predecessor-version":[{"id":7972,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/posts\/7901\/revisions\/7972"}],"wp:attachment":[{"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/media?parent=7901"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/categories?post=7901"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/www.linuxcool.com\/wp-json\/wp\/v2\/tags?post=7901"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}