additional hard disk space for LVM disks under LINUX
1, add a new hard disk to the client
2, restart the client
3. View entire disk space with fdisk-l
#fdisk-L
disk/dev/sda:34.4 GB, 34359738368 bytes
255 heads, Sectors/track, 4177 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x000b2d34
Device Boot Start End Blocks Id System
/DEV/SDA1 * 1 512000 Linux
Partition 1 does not end on cylinder boundary.
/dev/sda2 4178 33041408 8e Linux LVM
disk/dev/sdb:214.7 GB, 214748364800 bytes// Newly added disk drive
255 heads, Sectors/track, 26108 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000
disk/dev/mapper/volgroup-lv_root:30.4 GB, 30396121088 bytes
255 heads, Sectors/track, 3695 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000
disk/dev/mapper/volgroup-lv_swap:3435 MB, 3435134976 bytes
255 heads, Sectors/track, 417 cylinders
Units = Cylinders of 16065 * 8225280 bytes
Sector size (logical/physical): bytes/512 bytes
I/O size (minimum/optimal): bytes/512 bytes
Disk identifier:0x00000000
4. Add a new hard disk to the physical volume with pvcreate/dev/sdb
Pvcreate/dev/sdb
Physical volume "/dev/sdb" successfully created
5. Add a new hard disk to the volume group with vgextend volgroup/dev/sdb
Vgextend Volgroup/dev/sdb
Volume Group "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// plus 180G
Lvextend-l +100%free/dev/volgroup-lv_root// plus all
Extending logical Volume Lv_root to 208.31 GiB
Logical Volume Lv_root successfully resized
7, apply it to resize2fs/dev/volgroup/lv_root
Resize2fs/dev/volgroup/lv_root
RESIZE2FS 1.41.12 (17-may-2010)
Filesystem at/dev/volgroup/lv_root is mounted on/; On-line resizing required
Old desc_blocks = 2, new_desc_blocks = 14
Performing an on-line resize of/dev/volgroup/lv_root to 54606848 (4k) blocks.
The filesystem on/dev/volgroup/lv_root is now 54606848 blocks long.
8, then with DF
–H view space, joined
Df-h
Filesystem Size used Avail use% mounted on
/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
This article is from the "Jinchuang" blog, make sure to keep this source http://jinchuang.blog.51cto.com/8690689/1844414
Additional hard disk space for LVM disks under Linux