Linux Server disk expansion method (figure) _linux

Source: Internet
Author: User

1, the system environment as follows:


2, for the system to add a new virtual hard disk, add the need to restart the virtual machine, otherwise the system is not recognized; The following figure,/DEV/SDC is a newly added hard disk;


3. FDISK/DEV/SDC create partitions for new hard drives:


4, Linux allows a primary partition of 4, then we create partitions for/DEV/SDC1
5, by default, the new partition format for Linux, we use LVM dynamic add disk space, it is necessary to modify the/DEV/SDC1 partition format LVM,LVM format ID 8e;
6, create and modify the success of the need to format the partition: MKFS.EXT3/DEV/SDC1
7, execution completed into the/ETC directory to see if there is a SDC1 folder, if it does not exist, then execute the command partprobe, and then execute the format command;
8, add new LVM to existing LVM group, to achieve expansion:
(1) LVM into LVM management
(2) LVM>PVCREATE/DEV/SDC1 initialization partition
(3) Lvm>vgextend VOLGROUP00/DEV/SDC1 the initialized partition into the virtual volume group Volgroup00-logvol00
(4) Lvm>lvextend-l +5g/dev/mapper/volgroup00-logvol00 expands the capacity of existing volumes
(5) Lvm>pvdisplay View volume capacity
(6) Lvm>quit
9, expansion of the file system: Resize2fs/dev/mapper/volgroup00-logvol00

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.