2015-08-31 Linux Add a physical disk and use LVM for capacity expansion

Source: Internet
Author: User

Linux adds a physical disk, using LVM for capacity expansion
First, create a new partition:
Fdisk/dev/sdb
N
P #选择逻辑分区, if not, first create an extended partition and then add the logical partition (hard disk: up to four partitions p-p-p-p or P-P-P-E)
1 #分区号 (starting from 5),/DEV/SDB1
T 8e #分区类型8e表示LVM分区
W #写入分区表
Partprobe #重读分区表
Reboot #重启
Mkfs–t EXT3/DEV/SDB1 #格式化
Partx/dev/sdb #查看当前硬盘的分区表及使用情况
Second, the creation of PV, expansion vg,lv
Pvcreate/dev/sdb1
Vgdisplay #查看当前已经存在的VG信息
Vgextend VOLGROUP/DEV/SDB1 #扩展VolGroup
Lvdisplay #查看已经存在的LV信息,
Lvextend–l +10g/dev/mapper/volgroup-lv_root #扩展/root
E2fsck-f/dev/mapper/volgroup-lv_root #检查/root Logical Volume
Resize2fs/dev/mapper/volgroup-lv_root #执行该重设大小, refresh volgroup-lv_root disk space size
Df–h #查看挂载情况, has been enlarged
Reference documents
Http://www.cnblogs.com/einyboy/archive/2012/05/31/2528661.html

2015-08-31 Linux Add a physical disk and use LVM for capacity expansion

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.