\u51c6\u5907ssm<\/strong><\/div>\n\u5728\u65b0\u7684CentOS\/RHEL 7\u4e0a\uff0c\u4f60\u9700\u8981\u9996\u5148\u5b89\u88c5\u7cfb\u7edf\u5b58\u50a8\u7ba1\u7406\u5668\u3002<\/p>\n
$\u00a0sudo\u00a0yum\u00a0install\u00a0system-storage-manager<\/pre>\n\u9996\u5148\uff0c\u4e0d\u59a8\u68c0\u67e5\u5173\u4e8e\u53ef\u7528\u786c\u9a71\u548cLVM\u5377\u7684\u4fe1\u606f\u3002\u4e0b\u9762\u8fd9\u4e2a\u547d\u4ee4\u5c06\u663e\u793a\u5173\u4e8e\u73b0\u6709\u78c1\u76d8\u5b58\u50a8\u8bbe\u5907\u3001\u5b58\u50a8\u6c60\u3001LVM\u5377\u548c\u5b58\u50a8\u5feb\u7167\u7684\u4fe1\u606f\u3002\u8f93\u51fa\u7ed3\u679c\u6765\u81ea\u65b0\u5b89\u88c5\u7684CentOS 7\uff0c\u5b83\u5728\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u4f7f\u7528\u4e86LVM\u548cXFS\u6587\u4ef6\u7cfb\u7edf\u3002<\/p>\n
$\u00a0sudo\u00a0ssm\u00a0list<\/pre>\n<\/p>\n
\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6709\u4e24\u4e2a\u7269\u7406\u8bbe\u5907\uff08\u201c\/dev\/sda\u201d\u548c\u201c\/dev\/sdb\u201d\uff09\u3001\u4e00\u4e2a\u5b58\u50a8\u6c60\uff08\u201ccentos\u201d\uff09,\u4ee5\u53ca\u5b58\u50a8\u6c60\u4e2d\u521b\u5efa\u7684\u4e24\u4e2aLVM\u5377\uff08\u201cdev\/centos\/root\u201d\u548c\u201c\/dev\/centos\/swap\u201d\uff09\u3002<\/p>\n
\u5c06\u7269\u7406\u78c1\u76d8\u6dfb\u52a0\u5230LVM\u6c60<\/strong><\/div>\n\u4e0d\u59a8\u5c06\u4e00\u4e2a\u65b0\u7684\u7269\u7406\u78c1\u76d8\uff08\u6bd4\u5982\/dev\/sdb\uff09\u6dfb\u52a0\u5230\u73b0\u6709\u7684\u5b58\u50a8\u6c60\uff08\u6bd4\u5982centos\uff09\u3002\u5c06\u65b0\u7684\u7269\u7406\u78c1\u76d8\u6dfb\u52a0\u5230\u73b0\u6709\u5b58\u50a8\u6c60\u7684\u547d\u4ee4\u5982\u4e0b\uff1a<\/p>\n
$\u00a0sudo\u00a0ssm\u00a0add\u00a0-p\u00a0<<\/span>pool-name<\/span>><\/span>\u00a0<<\/span>device<\/span>><\/span>\r\n<\/pre>\n<\/p>\n
\u65b0\u8bbe\u5907\u6dfb\u52a0\u5230\u5b58\u50a8\u6c60\u540e\uff0c\u5b58\u50a8\u6c60\u4f1a\u81ea\u52a8\u81ea\u52a8\u6269\u5927\uff0c\u6269\u5927\u591a\u5c11\u53d6\u51b3\u4e8e\u8bbe\u5907\u7684\u5927\u5c0f\u3002\u68c0\u67e5\u540d\u4e3acentos\u7684\u5b58\u50a8\u6c60\u7684\u5927\u5c0f\uff0c\u5982\u4e0b\u6240\u793a\u3002<\/p>\n
<\/p>\n
\u6b63\u5982\u4f60\u6240\u89c1\uff0ccentos\u5b58\u50a8\u6c60\u5df2\u6210\u529f\u5730\u75317.5GB\u6269\u5927\u52308.5GB\u3002\u4e0d\u8fc7\uff0c\u773c\u4e0b\uff0c\u4f4d\u4e8e\u5b58\u50a8\u6c60\u4e2d\u7684\u78c1\u76d8\u5377\uff08\u6bd4\u5982\/dev\/centos\/root\u548c\/dev\/centos\/swap\uff09\u5e76\u6ca1\u6709\u4f7f\u7528\u53d8\u5927\u7684\u7a7a\u95f4\u3002\u4e3a\u6b64\uff0c\u6211\u4eec\u9700\u8981\u6269\u5927\u73b0\u6709\u7684LVM\u5377\u3002<\/p>\n
\u6269\u5927LVM\u5377<\/strong><\/div>\n\u5982\u679c\u4f60\u5728\u5b58\u50a8\u6c60\u4e2d\u6709\u989d\u5916\u7a7a\u95f4\uff0c\u53ef\u4ee5\u6269\u5927\u5b58\u50a8\u6c60\u4e2d\u73b0\u6709\u7684\u78c1\u76d8\u5377\u3002\u4e3a\u6b64\uff0c\u4f7f\u7528ssm\u547d\u4ee4\u7684resize\u9009\u9879\u3002<\/p>\n
$\u00a0sudo\u00a0ssm\u00a0resize\u00a0-s\u00a0[size]\u00a0[volume]<\/pre>\n\u4e0d\u59a8\u5c06\/dev\/centos\/root\u5377\u7684\u5927\u5c0f\u589e\u52a0500MB\u3002<\/p>\n
$\u00a0sudo\u00a0ssm\u00a0resize\u00a0-s+500M\u00a0\/dev\/centos\/root<\/pre>\n<\/p>\n
\u6838\u5b9e\u73b0\u6709\u5377\u589e\u52a0\u540e\u7684\u5927\u5c0f\u3002<\/p>\n
$\u00a0sudo\u00a0ssm\u00a0list\u00a0volumes<\/pre>\n<\/p>\n
\u6211\u4eec\u53ef\u4ee5\u6838\u5b9e\uff0c\/dev\/centos\/root\u5377\u7684\u5927\u5c0f\u5df2\u4ece6.7GB\u589e\u52a0\u5230\u4e867.2GB\u3002\u4e0d\u8fc7\uff0c\u8fd9\u5e76\u4e0d\u610f\u5473\u7740\u4f60\u7acb\u5373\u5c31\u53ef\u4ee5\u4f7f\u7528\u5728\u5377\u4e2d\u521b\u5efa\u7684\u6587\u4ef6\u7cfb\u7edf\u91cc\u9762\u7684\u989d\u5916\u7a7a\u95f4\u3002\u4f60\u4f1a\u53d1\u73b0\uff0c\u6587\u4ef6\u7cfb\u7edf\u5927\u5c0f\uff08\u201cFS size\u201d\uff09\u4ecd\u7136\u662f6.7GB\u3002<\/p>\n
\u4e3a\u4e86\u8ba9\u6587\u4ef6\u7cfb\u7edf\u8bc6\u522b\u589e\u52a0\u540e\u7684\u5377\u5927\u5c0f\uff0c\u4f60\u9700\u8981\u201c\u6269\u5927\u201d\u73b0\u6709\u7684\u6587\u4ef6\u7cfb\u7edf\u672c\u8eab\u3002\u6709\u4e0d\u540c\u7684\u5de5\u5177\u53ef\u7528\u6765\u6269\u5927\u73b0\u6709\u7684\u6587\u4ef6\u7cfb\u7edf\uff0c\u8fd9\u53d6\u51b3\u4e8e\u4f60\u4f7f\u7528\u54ea\u79cd\u6587\u4ef6\u7cfb\u7edf\u3002\u6bd4\u5982\u8bf4\uff0c\u6709\u9762\u5411EXT2\/EXT3\/EXT4\u7684resize2fs\u3001\u9762\u5411XFS\u7684xfs_growfs\u4ee5\u53ca\u9762\u5411Btrfs\u7684btrfs\uff0c\u4e0d\u4e00\u800c\u8db3\u3002<\/p>\n
\u5728\u8fd9\u4e2a\u4f8b\u5b50\u4e2d\uff0c\u6211\u4eec\u4f7f\u7528CentOS 7\uff0cXFS\u6587\u4ef6\u7cfb\u7edf\u5728\u9ed8\u8ba4\u60c5\u51b5\u4e0b\u521b\u5efa\u3002\u56e0\u800c\uff0c\u6211\u4eec\u4f7f\u7528xfs_growfs\u6765\u6269\u5927\u73b0\u6709\u7684XFS\u6587\u4ef6\u7cfb\u7edf\u3002<\/p>\n
\u6269\u5927XFS\u6587\u4ef6\u7cfb\u7edf\u540e\uff0c\u6838\u5b9e\u6587\u4ef6\u7cfb\u7edf\u5b8c\u5168\u5360\u7528\u4e86\u6574\u4e2a\u78c1\u76d8\u5377\u76847.2GB\u3002<\/p>\n
<\/p>\n
<\/p>\n
\u521b\u5efa\u65b0\u7684LVM\u6c60\/\u5377<\/strong><\/div>\n\u5728\u8fd9\u4e2a\u793a\u4f8b\u4e2d\uff0c\u4e0d\u59a8\u770b\u4e00\u4e0b\u5982\u4f55\u5728\u7269\u7406\u78c1\u76d8\u9a71\u52a8\u5668\u4e0a\u521b\u5efa\u65b0\u7684\u5b58\u50a8\u6c60\u548c\u65b0\u7684LVM\u5377\u3002\u5982\u679c\u4f7f\u7528\u4f20\u7edf\u7684LVM\u5de5\u5177\uff0c\u6574\u4e2a\u8fc7\u7a0b\u76f8\u5f53\u590d\u6742\uff0c\u9700\u8981\u51c6\u5907\u5206\u533a\uff0c\u9700\u8981\u521b\u5efa\u7269\u7406\u5377\u3001\u5377\u7ec4\u3001\u903b\u8f91\u5377\uff0c\u6700\u540e\u8fd8\u8981\u5efa\u7acb\u6587\u4ef6\u7cfb\u7edf\u3002\u4e0d\u8fc7\uff0c\u82e5\u4f7f\u7528ssm\uff0c\u6574\u4e2a\u8fc7\u7a0b\u4e00\u8e74\u800c\u5c31\uff01<\/p>\n
\u4e0b\u9762\u8fd9\u4e2a\u547d\u4ee4\u7684\u4f5c\u7528\u662f\uff0c\u521b\u5efa\u4e00\u4e2a\u540d\u4e3amypool\u7684\u5b58\u50a8\u6c60\uff0c\u521b\u5efa\u5b58\u50a8\u6c60\u4e2d\u540d\u4e3adisk0\u7684500MB\u5927\u5c0f\u7684LVM\u5377\uff0c\u4f7f\u7528XFS\u6587\u4ef6\u7cfb\u7edf\u683c\u5f0f\u5316\u5377\uff0c\u5e76\u5c06\u5b83\u6302\u8f7d\u5230\/mnt\/test\u4e0b\u3002\u7acb\u5373\u5c31\u80fd\u9886\u7565\u5230ssm\u7684\u5f3a\u5927\u529f\u80fd\u3002<\/p>\n
$\u00a0sudo\u00a0ssm\u00a0create\u00a0-s\u00a0500M\u00a0-n\u00a0disk0\u00a0--fstype\u00a0xfs\u00a0-p\u00a0mypool\u00a0\/dev\/sdc\u00a0\/mnt\/test<\/pre>\n<\/p>\n
\u4e0d\u59a8\u6838\u5b9e\u5df2\u521b\u5efa\u7684\u78c1\u76d8\u5377\u3002<\/p>\n
<\/p>\n
<\/p>\n
\u5bf9LVM\u5377\u62cd\u53d6\u5feb\u7167<\/strong><\/div>\n\u4f7f\u7528ssm\u5de5\u5177\uff0c\u4f60\u8fd8\u53ef\u4ee5\u5bf9\u73b0\u6709\u7684\u78c1\u76d8\u5377\u62cd\u53d6\u5feb\u7167\u3002\u8bf7\u6ce8\u610f\uff1a\u53ea\u6709\u542b\u6709\u5377\u7684\u540e\u7aef\u652f\u6301\u5feb\u7167\u673a\u5236\uff0c\u5feb\u7167\u624d\u9002\u7528\u3002LVM\u540e\u7aef\u652f\u6301\u8054\u673a\u5feb\u7167\u529f\u80fd\uff0c\u8fd9\u610f\u5473\u7740\u6211\u4eec\u6ca1\u5fc5\u8981\u5728\u79bb\u7ebf\u72b6\u6001\u4e0b\u5bf9\u5377\u62cd\u53d6\u5feb\u7167\u3002\u53e6\u5916\uff0c\u7531\u4e8essm\u7684LVM\u540e\u7aef\u652f\u6301LVM2\uff0c\u5feb\u7167\u5177\u6709\u8bfb\u53d6\/\u5199\u5165\u529f\u80fd\u3002<\/p>\n
\u4e0d\u59a8\u5bf9\u73b0\u6709\u7684LVM\u5377\uff08\u6bd4\u5982\/dev\/mypool\/disk0\uff09\u62cd\u53d6\u5feb\u7167\u3002<\/p>\n
$\u00a0sudo\u00a0ssm\u00a0snapshot\u00a0\/dev\/mypool\/disk0<\/pre>\n\u4e00\u65e6\u5feb\u7167\u62cd\u53d6\u5b8c\u6bd5\uff0c\u5b83\u5c06\u4f5c\u4e3a\u4e00\u4e2a\u7279\u6b8a\u7684\u5feb\u7167\u5377\u5b58\u50a8\u8d77\u6765\uff0c\u5b58\u50a8\u4e86\u539f\u59cb\u5377\u4e2d\u62cd\u53d6\u5feb\u7167\u65f6\u7684\u6240\u6709\u6570\u636e\u3002<\/p>\n
<\/p>\n
\u5b58\u50a8\u5feb\u7167\u540e\uff0c\u4f60\u53ef\u4ee5\u5220\u9664\u539f\u59cb\u5377\uff0c\u5e76\u6302\u8f7d\u5feb\u7167\u5377\uff0c\u4ee5\u8bbf\u95ee\u5feb\u7167\u4e2d\u7684\u6570\u636e\u3002<\/p>\n
<\/p>\n
\u8bf7\u6ce8\u610f\uff1a\u5f53\u4f60\u8bd5\u56fe\u5728\u539f\u59cb\u5377\u6302\u8f7d\u65f6\u6302\u8f7d\u5feb\u7167\u5377\uff0c\u4f1a\u5f97\u5230\u4e0b\u5217\u51fa\u9519\u4fe1\u606f\u3002<\/p>\n
kernel:\u00a0XFS\u00a0(dm-3):\u00a0Filesystem\u00a0has\u00a0duplicate\u00a0UUID\u00a027564026-faf7-46b2-9c2c-0eee80045b5b\u00a0-\u00a0can't\u00a0mount<\/pre>\n