c语言sscanf函数的用法是什么
256
2022-10-02
AWS create vg and extend disk dymaticly 动态扩容磁盘
Understanding the basic concepts
Common commands
#goto AWS COSOLE create 2 blocks with 2G & 3G
lsblk
found xvdf xvdg
yum install -y lvm2
# create physical volume
pvcreate /dev/xvdf /dev/xvdg
#show physcial volume
pvs
#display vg
vgdisplay /dev/xvdf
vgcreate vg001 /dev/xvdf /dev/xvdg
vgdisplay vg001
#5g少了一点啊
#full assign to one lv
lvcreate -l 100%FREE -n lv001 vg001
# or assign size to one lv
#lvcreate -L 4.99G -n lv001 vg001
#format and mount
#reduce & extend lv
lvreduce -L -1G -r /dev/vg001/lv001
lvextend -l +100%FREE -r /dev/vg001/lv001
#format & mount
#goto aws create 4G volume block and attached to instance
#extend vg001
vgextend vg001 /dev/xvdh
vg有9g了
#lv 也扩容下
lvextend -l +100%FREE /dev/vg001/lv001
#resize ext4 file system
resize2fs /dev/mapper/vg001-lv001
#resize xfs file system
#xfs_growfs /dev/mapper/vg001-lv001
remove command
1. Once you have umounted all the mount points, you can remove the LVs associated with them. To do so use the lvremove command :
# lvremove -f [vg_name]/[lv_name]
2. To remove the Volume group we have to deactivate it first with vgchange command :
# vgchange -an [vg_name]
3. You can remove the VG now.
# vgremove [vg_name]
4. To remove physical volumes in the VG use following command:
# pvremove [pv_name]
版权声明:本文内容由网络用户投稿,版权归原作者所有,本站不拥有其著作权,亦不承担相应法律责任。如果您发现本站中有涉嫌抄袭或描述失实的内容,请联系我们jiasou666@gmail.com 处理,核实后本网站将在24小时内删除侵权内容。
发表评论
暂时没有评论,来抢沙发吧~