Centos and centos

Source: Internet
Author: User

Centos and centos

Find the new disk/dev/sdb

[Root @ localhost ~] # Fdisk-l

Disk/dev/sdb: 375.8 GB, 375809638400 bytes, 734003200 sectors
Units = sector of 1*512 = 512 bytes
Sector size (logical/physical): 512 bytes/512 bytes
I/O size (minimum/optimum): 512 bytes/512 bytes

Create a pv (physical volume) [root @ localhost ~] # Pvcreate/dev/sdbPhysical volume "/dev/sdb" successfully created

Resize vg (volume group)

[Root @ localhost ~] # Vgextend centos/dev/sdbVolume group "centos" successfully extended [root @ localhost ~] # VgsVG # PV # LV # SN Attr VSize VFree centos 2 3 0 wz -- n-399.50g 350.00g [root @ localhost ~] # Vgdisplay --- Volume group --- VG Name centos Alloc PE/Size 12673/49 .50 GiB Free PE/Size 89600/350 .00 GiB

Extended lv (logical volume)

[Root @ localhost ~] # Lvextend-L + 350G/dev/mapper/centos-home
Size of logical volume centos/home changed from 10.00 GiB (2560 extents) to 360.00 GiB (92160 extents ).
Logical volume home successfully resized

Redirect lv size

[Root @ localhost ~] # Xfs_growfs/dev/mapper/centos-home

View expansion Results

[Root @ localhost ~] # Df-h
File System capacity used available % mount point
/Dev/mapper/centos-root 36g 4.1G 32G 12%/
/Dev/mapper/centos-home 360G 37 M 360G 1%/home
/Dev/sda1 497 M 124 M 373 M 25%/boot

Redhat6:

[Root @ localhost ~] # Lvextend-L + 295G/dev/mapper/VolGroup-lv_home

[Root @ localhost ~] # Resize2fs/dev/mapper/VolGroup-lv_home


Refer:

LVM logical volume management tutorial:

Http://www.server110.com/linux/201403/7420.html 

Linux dynamically increases LV space:

Http://www.cnblogs.com/weaver1/archive/2011/12/30/2307451.html

 

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.