[root@localhost ~]# pvdisplay
--- Physical volume ---
PV Name /dev/sda3
VG Name VolGroup
PV Size 18.80 GiB / not usable 3.00 MiB
Allocatable yes (but full)
PE Size 4.00 MiB
Total PE 4813
Free PE 0
Allocated PE 4813
PV UUID r3DcdH-tavS-z0dy-bTcg-F5fz-F8MF-dpAjW3
"/dev/sdb1" is a new physical volume of "30.00 GiB"
--- NEW Physical volume ---
PV Name /dev/sdb1
VG Name
PV Size 30.00 GiB
Allocatable NO
PE Size 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID 1Ynxmw-JblF-XAeE-ZKGD-0BSV-s7BL-SU1mql
[root@localhost ~]# vgdisplay
--- Volume group ---
VG Name VolGroup
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 18.80 GiB
PE Size 4.00 MiB
Total PE 4813
Alloc PE / Size 4813 / 18.80 GiB
Free PE / Size 0 / 0
VG UUID Xdh5kq-vKjk-nroE-Dssd-mi1h-SQGK-R07tOn
[root@localhost ~]# vgdisplay
--- Volume group ---
VG Name VolGroup
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 48.80 GiB
PE Size 4.00 MiB
Total PE 12492
Alloc PE / Size 4813 / 18.80 GiB
Free PE / Size 7679 / 30.00 GiB
VG UUID Xdh5kq-vKjk-nroE-Dssd-mi1h-SQGK-R07tOn
[root@localhost ~]# lvdisplay
--- Logical volume ---
LV Name /dev/VolGroup/LogVol01
VG Name VolGroup
LV UUID IUVeUw-2bmN-mm3H-Gh16-fKaR-choS-IfSosr
LV Write Access read/write
LV Status available
# open 1
LV Size 16.80 GiB
Current LE 4301
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
--- Logical volume ---
LV Name /dev/VolGroup/LogVol00
VG Name VolGroup
LV UUID U9WYdb-xAdg-tCe1-FPxo-UyVe-v5Gp-a8UlZR
LV Write Access read/write
LV Status available
# open 1
LV Size 2.00 GiB
Current LE 512
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
[root@localhost ~]# lvextend /dev/VolGroup/LogVol01 /dev/sdb1
Extending logical volume LogVol01 to 46.80 GiB
Logical volume LogVol01 successfully resized
[root@localhost ~]# lvdisplay
--- Logical volume ---
LV Name /dev/VolGroup/LogVol01
VG Name VolGroup
LV UUID IUVeUw-2bmN-mm3H-Gh16-fKaR-choS-IfSosr
LV Write Access read/write
LV Status available
# open 1
LV Size 46.80 GiB
Current LE 11980
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
--- Logical volume ---
LV Name /dev/VolGroup/LogVol00
VG Name VolGroup
LV UUID U9WYdb-xAdg-tCe1-FPxo-UyVe-v5Gp-a8UlZR
LV Write Access read/write
LV Status available
# open 1
LV Size 2.00 GiB
Current LE 512
Segments 1
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:1
[root@localhost ~]# df -h
文件系统 容量 已用 可用 已用%% 挂载点
/dev/mapper/VolGroup-LogVol01
17G 8.3G 7.5G 53% /
tmpfs 499M 0 499M 0% /dev/shm
/dev/sda1 194M 25M 159M 14% /boot
[root@localhost ~]# resize2fs /dev/mapper/VolGroup-LogVol01
resize2fs 1.41.12 (17-May-2010)
Filesystem at /dev/mapper/VolGroup-LogVol01 is mounted on /; on-line resizing required
old desc_blocks = 2, new_desc_blocks = 3
Performing an on-line resize of /dev/mapper/VolGroup-LogVol01 to 12267520 (4k) blocks.
The filesystem on /dev/mapper/VolGroup-LogVol01 is now 12267520 blocks long.
[root@localhost ~]# df -h
文件系统 容量 已用 可用 已用%% 挂载点
/dev/mapper/VolGroup-LogVol01
47G 8.3G 36G 19% /
tmpfs 499M 0 499M 0% /dev/shm
/dev/sda1 194M 25M 159M 14% /boot
[root@centos133 ~]# fdisk -l /dev/sdb
Disk /dev/sdb: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
[root@centos133 ~]# pvcreate /dev/sdb
Physical volume "/dev/sdb" successfully created
[root@centos133 ~]# fdisk -l /dev/sdb
Disk /dev/sdb: 4294 MB, 4294967296 bytes
255 heads, 63 sectors/track, 522 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table
"/dev/sdb" is a new physical volume of "4.00 GB"
--- NEW Physical volume ---
PV Name /dev/sdb
VG Name
PV Size 4.00 GB
Allocatable NO
PE Size (KByte) 0
Total PE 0
Free PE 0
Allocated PE 0
PV UUID BzXfg4-BxSG-ZxEK-SNMX-5kod-2lTw-vV7Jv4
[root@centos133 ~]# vgdisplay
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 1
Metadata Sequence No 3
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 1
Act PV 1
VG Size 19.88 GB
PE Size 32.00 MB
Total PE 636
Alloc PE / Size 636 / 19.88 GB
Free PE / Size 0 / 0
VG UUID JWA1Lv-mz3B-Jx9n-ZwSf-vjkh-etgV-ntBC5U
[root@centos133 ~]# vgextend VolGroup00 /dev/sdb
/dev/cdrom: open failed: Read-only file system
/dev/cdrom: open failed: Read-only file system
Volume group "VolGroup00" successfully extended
[root@centos133 ~]# vgdisplay
--- Volume group ---
VG Name VolGroup00
System ID
Format lvm2
Metadata Areas 2
Metadata Sequence No 4
VG Access read/write
VG Status resizable
MAX LV 0
Cur LV 2
Open LV 2
Max PV 0
Cur PV 2
Act PV 2
VG Size 23.84 GB
PE Size 32.00 MB
Total PE 763
Alloc PE / Size 636 / 19.88 GB
Free PE / Size 127 / 3.97 GB
VG UUID JWA1Lv-mz3B-Jx9n-ZwSf-vjkh-etgV-ntBC5U
[root@centos133 ~]# lvextend /dev/VolGroup00/LogVol00 /dev/sdb
Extending logical volume LogVol00 to 21.88 GB
Logical volume LogVol00 successfully resized
[root@centos133 ~]# lvdisplay /dev/VolGroup00/LogVol00
--- Logical volume ---
LV Name /dev/VolGroup00/LogVol00
VG Name VolGroup00
LV UUID qLc45Y-rBpT-HfxG-jpbJ-mQeg-3lL2-3OEaZQ
LV Write Access read/write
LV Status available
# open 1
LV Size 21.88 GB
Current LE 700
Segments 2
Allocation inherit
Read ahead sectors auto
- currently set to 256
Block device 253:0
[root@centos133 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
18G 1.3G 16G 8% /
/dev/sda1 99M 13M 81M 14% /boot
tmpfs 501M 0 501M 0% /dev/shm
[root@centos133 ~]# resize2fs /dev/VolGroup00/LogVol00
resize2fs 1.39 (29-May-2006)
Filesystem at /dev/VolGroup00/LogVol00 is mounted on /; on-line resizing required
Performing an on-line resize of /dev/VolGroup00/LogVol00 to 5734400 (4k) blocks.
The filesystem on /dev/VolGroup00/LogVol00 is now 5734400 blocks long.
[root@centos133 ~]# df -h
Filesystem Size Used Avail Use% Mounted on
/dev/mapper/VolGroup00-LogVol00
22G 1.3G 19G 7% /
/dev/sda1 99M 13M 81M 14% /boot
tmpfs 501M 0 501M 0% /dev/shm
欢迎光临 Chinaunix (http://bbs.chinaunix.net/) | Powered by Discuz! X3.2 |