Additional hard disk space for LVM disks under Linux

Source: Internet
Author: User

Summarize:

~~~~~~~~~~~~~~~~~~~~

Fdisk-l
Pvcreate/dev/sdb
Vgextend Volgroup/dev/sdb
Lvextend-l +180g/dev/mapper/volgroup-lv_root
Resize2fs/dev/volgroup/lv_root

~~~~~~~~~~~~~~~~~~~

1. Add a new hard disk to the client in VM WARE ESXi

2, restart the client

3. View entire disk space with Fdisk–l

#fdisk-L

DISK/DEV/SDA:34.4GB,34359738368bytes255Heads theSectors/track,4177cylindersunits= Cylinders of16065* +=8225280bytessector size (logical/physical): +Bytes/ +Bytesi/o Size (minimum/optimal): +Bytes/ +bytesdisk Identifier:0x000b2d34Device Boot Start End Blocks Id System/DEV/SDA1 *1           -      512000    thelinuxpartition1does not end on cylinder boundary./dev/sda2 -        4178    330414088e Linux LVM Disk/DEV/SDB:214.7GB,214748364800bytes255Heads theSectors/track,26108cylindersunits= Cylinders of16065* +=8225280bytessector size (logical/physical): +Bytes/ +Bytesi/o Size (minimum/optimal): +Bytes/ +bytesdisk Identifier:0x00000000Disk/dev/mapper/volgroup-lv_root:30.4GB,30396121088bytes255Heads theSectors/track,3695cylindersunits= Cylinders of16065* +=8225280bytessector size (logical/physical): +Bytes/ +Bytesi/o Size (minimum/optimal): +Bytes/ +bytesdisk Identifier:0x00000000Disk/dev/mapper/volgroup-lv_swap:3435MB,3435134976bytes255Heads theSectors/track,417cylindersunits= Cylinders of16065* +=8225280bytessector size (logical/physical): +Bytes/ +Bytesi/o Size (minimum/optimal): +Bytes/ +bytesdisk Identifier:0x00000000

4. Add a new hard disk to the physical volume with Pvcreate/dev/sdb

Pvcreate/dev/sdb

" /dev/sdb " successfully created

5. Add a new hard disk to the volume group with Vgextend Volgroup/dev/sdb

Vgextend Volgroup/dev/sdb

" VolGroup " successfully extended

6, diffusion space lvextend-l +200g/dev/mapper/volgroup-lv_root for root partition

Lvextend-l +180g/dev/mapper/volgroup-lv_root

208.31 giblogical Volume lv_root successfully resized

7, apply it to Resize2fs/dev/volgroup/lv_root

Resize2fs/dev/volgroup/lv_root

1.41.  (-may-/dev/volgroup/lv_root ismounted on/; on-2  performingan on5460684854606848long.

8, then use Df–h to view the space, has joined

Df-h

Filesystem                    Size  used Avail use% mountedon/dev/mapper/volgroup-lv_root  206G  5. 7G  189G   3%/tmpfs                         1. 9G     0  1. 9G   0/dev/ shm/dev/sda1                     485M   32M  428M   7/boot

9, other details

Additional hard disk space for LVM disks under Linux

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.