\r\n# \u5f53\u7cbe\u7b80\u6c60\u7684\u4f7f\u7528\u7387\u8d85\u8fc7\u6b64\u767e\u5206\u6bd4\u65f6\uff0c\u5c06\u81ea\u52a8\u6269\u5c55\u8be5\u6c60\uff0c\u5c06\u5176\u66f4\u6539\u4e3a100\u5c06\u7981\u7528\u81ea\u52a8\u6269\u5c55\u3002\u53ef\u63a5\u53d7\u7684\u6700\u5c0f\u503c\u662f50\u3002\r\n thin_pool_autoextend_threshold = 80\r\n# \u901a\u8fc7\u81ea\u52a8\u6269\u5c55\u7cbe\u7b80\u6c60\uff0c\u4f1a\u589e\u52a0\u8fd9\u4e2a\u767e\u5206\u6bd4\u7684\u989d\u5916\u7a7a\u95f4\u3002\u6dfb\u52a0\u5230\u7cbe\u7b80\u6c60\u7684\u989d\u5916\u7a7a\u95f4\u91cf\u662f\u5176\u5f53\u524d\u5927\u5c0f\u7684\u767e\u5206\u6bd4\u3002\r\n thin_pool_autoextend_percent = 20\r\n<\/pre>\n\u4e0b\u9762\u521b\u5efatp_lv_user5\u548ctp_lv_user6\u4e24\u4e2a\u7cbe\u7b80\u5377\uff1a<\/p>\n
\r\n[root@localhost ~]# lvcreate -V 200M -T vg_thin\/thin_pool -n tp_lv_user5\r\n Logical volume \"tp_lv_user5\" created.\r\n[root@localhost ~]# lvcreate -V 200M -T vg_thin\/thin_pool -n tp_lv_user6\r\n Logical volume \"tp_lv_user6\" created.\r\n[root@localhost ~]# mkfs.xfs \/dev\/vg_thin\/tp_lv_user5 \r\n[root@localhost ~]# mkfs.xfs \/dev\/vg_thin\/tp_lv_user6\r\n[root@localhost ~]# mkdir -p \/mnt\/user{5..6}\r\n[root@localhost ~]# mount \/dev\/vg_thin\/tp_lv_user5 \/mnt\/user5\r\n[root@localhost ~]# mount \/dev\/vg_thin\/tp_lv_user6 \/mnt\/user6\r\n<\/pre>\n\u770b\u4e00\u4e0b\u4f7f\u7528\u7684\u60c5\u51b5\uff1a
\n
\n\u4e0b\u9762\u6211\u4eec\u5411\/mnt\/user5\u548c\/mnt\/user6\u586b\u5145\u5185\u5bb9\uff0c\u76f4\u5230thin_pool\u7cbe\u7b80\u6c60\u7684\u4f7f\u7528\u7387\u8d85\u8fc780%\uff0c\u6211\u4eec\u53ef\u4ee5\u770b\u5230\u7cbe\u7b80\u6c60\u7684\u5bb9\u91cf\u6269\u5bb9\u4e86\u3002<\/p>\n
\r\n[root@localhost ~]# lvs\r\n LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert\r\n root cl -wi-ao---- 15.00g \r\n swap cl -wi-ao---- 2.00g \r\n thin_pool vg_thin twi-aotz-- 1.20g 75.94 22.66 \r\n tp_lv_user1 vg_thin Vwi-aotz-- 200.00m thin_pool 77.97 \r\n tp_lv_user2 vg_thin Vwi-aotz-- 200.00m thin_pool 77.97 \r\n tp_lv_user3 vg_thin Vwi-aotz-- 200.00m thin_pool 77.97 \r\n tp_lv_user4 vg_thin Vwi-aotz-- 200.00m thin_pool 77.97 \r\n tp_lv_user5 vg_thin Vwi-aotz-- 200.00m thin_pool 77.97 \r\n tp_lv_user6 vg_thin Vwi-aotz-- 200.00m thin_pool 77.97 \r\n<\/pre>\n
\n\u53ef\u4ee5\u770b\u5230\u4e0a\u9762\uff0cthin_pool\u7cbe\u7b80\u6c60\u7684\u5bb9\u91cf\u63d0\u5347\u4e86200M\uff0c\u8fd9\u5c31\u8bf4\u660e\u5f53\u7cbe\u7b80\u6c60\u7684\u4f7f\u7528\u7387\u8d85\u8fc780%\u65f6\uff0c\u63d0\u534720%\u7684\u5bb9\u91cf\u3002<\/p>\n
\u5982\u4f55\u6269\u5c55\u7cbe\u7b80\u6c60<\/strong><\/div>\n\u6269\u5c55\u7cbe\u7b80\u6c60\u65f6\uff0c\u6211\u4eec\u9700\u8981\u9075\u5faa\u4e24\u4e2a\u6b65\u9aa4\uff1a<\/p>\n
\n- 1. \u6269\u5c55\u7cbe\u7b80\u6c60\u7684\u5143\u6570\u636e<\/li>\n
- 2. \u7136\u540e\u518d\u6269\u5c55\u7cbe\u7b80\u6c60\u3002<\/li>\n<\/ul>\n
\u8981\u6269\u5c55\u7cbe\u7b80\u6c60\uff0c\u6211\u4eec\u4e0d\u5e94\u8be5\u7acb\u5373\u7ee7\u7eed\u6269\u5c55\u7cbe\u7b80\u6c60\u3002\u9996\u5148\uff0c\u901a\u8fc7\u8fd0\u884clvs -a<\/code>\u67e5\u770b\u73b0\u6709\u5143\u6570\u636e\u4f7f\u7528\u7684\u5927\u5c0f\u60c5\u51b5\u3002<\/p>\n\r\n[root@localhost ~]# lvs -a\r\n LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert\r\n root cl -wi-ao---- 15.00g \r\n swap cl -wi-ao---- 2.00g \r\n [lvol0_pmspare] vg_thin ewi------- 4.00m \r\n thin_pool vg_thin twi-aotz-- 1.20g 75.94 22.66 \r\n [thin_pool_tdata] vg_thin Twi-ao---- 1.20g \r\n [thin_pool_tmeta] vg_thin ewi-ao---- 4.00m \r\n tp_lv_user1 vg_thin Vwi-aotz-- 200.00m thin_pool 77.97 \r\n tp_lv_user2 vg_thin Vwi-aotz-- 200.00m thin_pool 77.97 \r\n tp_lv_user3 vg_thin Vwi-aotz-- 200.00m thin_pool 77.97 \r\n tp_lv_user4 vg_thin Vwi-aotz-- 200.00m thin_pool 77.97 \r\n tp_lv_user5 vg_thin Vwi-aotz-- 200.00m thin_pool 77.97 \r\n tp_lv_user6 vg_thin Vwi-aotz-- 200.00m thin_pool 77.97 \r\n<\/pre>\n<\/p>\n
\u6269\u5c55\u7cbe\u7b80\u6c60metadata\u7684\u5927\u5c0f<\/strong><\/span><\/div>\n\u5143\u6570\u636e\u7684\u5f53\u524d\u5927\u5c0f\u4ec5\u4e3a4 MB\u3002\u8ba9\u6211\u4eec\u5728\u5f53\u524d\u5927\u5c0f\u7684\u57fa\u7840\u4e0a\u6dfb\u52a04MB\u3002<\/p>\n
\r\n[root@localhost ~]# lvextend --poolmetadatasize +4M vg_thin\/thin_pool\r\n<\/pre>\n
\n\u53ef\u4ee5\u770b\u5230[thin_pool_tmeta]<\/code>\u5df2\u7ecf\u53d8\u62108M\u4e86\u3002<\/p>\n\u6269\u5c55\u7cbe\u7b80\u6c60\u7684\u5927\u5c0f<\/strong><\/span><\/div>\n\u5b8c\u6210\u6269\u5c55\u5143\u6570\u636e\u540e\uff0c\u5f00\u59cb\u5c06\u7cbe\u7b80\u6c60\u6269\u5c55\u5230\u6240\u9700\u7684\u5927\u5c0f\u3002\u5c06\u7cbe\u7b80\u6c60\u6269\u5bb9\u91cf\u518d\u6dfb\u52a01G\u5bb9\u91cf\u3002<\/p>\n
\r\n[root@localhost ~]# lvextend -L +1G \/dev\/vg_thin\/thin_pool \r\n<\/pre>\n
\n\u73b0\u5728\u5927\u5c0f\u5df2\u53d8\u62102.2G\u4e86\u3002<\/p>\n
\u6269\u5c55\u7cbe\u7b80\u5377<\/strong><\/div>\n\u6269\u5c55\u7cbe\u7b80\u5377\u548c\u6269\u5c55\u7cbe\u7b80\u6c60\u7c7b\u4f3c\uff1a<\/p>\n
\r\n[root@localhost ~]# lvextend -L +200M \/dev\/vg_thin\/tp_lv_user1 \r\n<\/pre>\n<\/p>\n
\u5220\u9664\u7cbe\u7b80\u5377\u3001\u7cbe\u7b80\u6c60<\/strong><\/div>\n\u8981\u5220\u9664\u7cbe\u7b80\u6c60\uff0c\u9996\u5148\u9700\u8981\u5378\u8f7d\u6240\u6709\u6587\u4ef6\u7cfb\u7edf\uff0c\u7136\u540e\u5220\u9664\u6240\u6709\u7cbe\u7b80\u5377\uff0c\u6700\u540e\u5220\u9664\u7cbe\u7b80\u6c60\u3002<\/p>\n
\r\n# \u5378\u8f7d\u5206\u533a\r\n[root@localhost ~]# umount \/mnt\/user{1..6}\r\n# \u5220\u9664\u7cbe\u7b80\u5377\r\n[root@localhost ~]# lvremove -y \/dev\/vg_thin\/tp_lv_user[1-6]\r\n Logical volume \"tp_lv_user1\" successfully removed\r\n Logical volume \"tp_lv_user2\" successfully removed\r\n Logical volume \"tp_lv_user3\" successfully removed\r\n Logical volume \"tp_lv_user4\" successfully removed\r\n Logical volume \"tp_lv_user5\" successfully removed\r\n Logical volume \"tp_lv_user6\" successfully removed\r\n# \u5220\u9664\u7cbe\u7b80\u6c60\r\n[root@localhost ~]# lvremove -y \/dev\/vg_thin\/thin_pool\r\n Logical volume \"thin_pool\" successfully removed\r\n<\/pre>\n\u4f7f\u7528lvs \u547d\u4ee4\u67e5\u770b\u4ee5\u4e0b\uff0c\u662f\u5426\u5df2\u7ecf\u5220\u9664\u5e72\u51c0\uff1a<\/p>\n
\r\n[root@localhost ~]# lvs -a\r\n LV VG Attr LSize Pool Origin Data% Meta% Move Log Cpy%Sync Convert\r\n root cl -wi-ao---- 15.00g \r\n swap cl -wi-ao---- 2.00g \r\n<\/pre>\n<\/p>\n
\u603b\u7ed3<\/strong><\/div>\n\u7cbe\u7b80\u5377\u662f\u53ef\u4ee5\u521b\u5efa\u5927\u4e8e\u53ef\u7528\u78c1\u76d8\u7684\u903b\u8f91\u5377\u3002\u4f7f\u7528\u7cbe\u7b80\u5377\uff0c\u4f60\u53ef\u4ee5\u7ba1\u7406\u53ef\u7528\u7a7a\u95f4\u7684\u5b58\u50a8\u6c60\uff08\u79f0\u4e3a\u7cbe\u7b80\u6c60\uff09\uff0c\u53ef\u4ee5\u5728\u5e94\u7528\u7a0b\u5e8f\u9700\u8981\u65f6\u5c06\u5176\u5206\u914d\u7ed9\u4efb\u610f\u6570\u91cf\u7684\u8bbe\u5907\u3002\u7cbe\u7b80\u6c60\u53ef\u4ee5\u5728\u9700\u8981\u65f6\u8fdb\u884c\u52a8\u6001\u6269\u5c55\uff0c\u4ee5\u8282\u7701\u6210\u672c\u3002<\/p>\n","protected":false},"excerpt":{"rendered":"
Centos8 \u4e0b\u9762\u6211\u4eec\u6dfb\u52a0\u4e00\u5757\u786c\u76d8\u3002\u521b\u5efa\u7269\u7406\u5377\uff0c\u7136\u540e\u521b\u5efa\u5377\u7ec4\uff1a [root@localhost ~]# pv […]<\/p>\n","protected":false},"author":309,"featured_media":213534,"comment_status":"closed","ping_status":"closed","sticky":false,"template":"","format":"standard","meta":{"_acf_changed":false,"footnotes":""},"categories":[55],"tags":[],"class_list":["post-213533","post","type-post","status-publish","format-standard","has-post-thumbnail","hentry","category-thread"],"acf":[],"_links":{"self":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/213533","targetHints":{"allow":["GET"]}}],"collection":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/users\/309"}],"replies":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/comments?post=213533"}],"version-history":[{"count":2,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/213533\/revisions"}],"predecessor-version":[{"id":213549,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/posts\/213533\/revisions\/213549"}],"wp:featuredmedia":[{"embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media\/213534"}],"wp:attachment":[{"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/media?parent=213533"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/categories?post=213533"},{"taxonomy":"post_tag","embeddable":true,"href":"https:\/\/lrxjmw.cn\/wp-json\/wp\/v2\/tags?post=213533"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}