- 论坛徽章:
- 0
|
1.创建80G的pv
# mkdir /dev/vgken1
# mknod /dev/vgken1/group c 64 0x010000
# vgcreate /dev/vgken1 /dev/dsk/c5t0d0 /dev/dsk/c7t0d0
Increased the number of physical extents per physical volume to 20479.
Volume group "/dev/vgken1" has been successfully created.
Volume Group configuration for /dev/vgken1 has been saved in /etc/lvmconf/vgken1.conf
# vgdisplay -v vgken1
--- Volume groups ---
VG Name /dev/vgken1
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 1
Act PV 1
Max PE per PV 20479
VGDA 2
PE Size (Mbytes) 4
Total PE 20476
Alloc PE 20475
Free PE 1
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
--- Logical volumes ---
LV Name /dev/vgken1/lvol2
LV Status available/syncd
LV Size (Mbytes) 81900
Current LE 20475
Allocated PE 20475
Used PV 1
--- Physical volumes ---
PV Name /dev/dsk/c5t0d0
PV Name /dev/dsk/c7t0d0 Alternate Link
PV Status available
Total PE 20476
Free PE 1
Autoswitch On
二.添加100G的PV到vgken1下面
# vgextend /dev/vgken1 /dev/dsk/c5t0d1 /dev/dsk/c7t0d1
vgextend: Warning: Max_PE_per_PV for the volume group (20479) too small for this PV (25599).
Using only 20479 PEs from this physical volume.
Current path "/dev/dsk/c7t0d0" is an alternate link, skip.
Volume group "/dev/vgken1" has been successfully extended.
Volume Group configuration for /dev/vgken1 has been saved in /etc/lvmconf/vgken1.conf
# diskinfo /dev/dsk/c5t0d1
diskinfo: Character device required
# diskinfo /dev/rdsk/c5t0d1
SCSI describe of /dev/rdsk/c5t0d1:
vendor: HP
product id: HSV100
type: direct access
size: 104857600 Kbytes
bytes per sector: 512
# vgdisplay -v vgken1
--- Volume groups ---
VG Name /dev/vgken1
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 1
Open LV 1
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 20479
VGDA 4
PE Size (Mbytes) 4
Total PE 40955
Alloc PE 20475
Free PE 20480
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
--- Logical volumes ---
LV Name /dev/vgken1/lvol2
LV Status available/syncd
LV Size (Mbytes) 81900
Current LE 20475
Allocated PE 20475
Used PV 1
--- Physical volumes ---
PV Name /dev/dsk/c5t0d0
PV Name /dev/dsk/c7t0d0 Alternate Link
PV Status available
Total PE 20476
Free PE 1
Autoswitch On
PV Name /dev/dsk/c5t0d1
PV Name /dev/dsk/c7t0d1 Alternate Link
PV Status available
Total PE 20479
Free PE 20479
Autoswitch On
划分一个100G的PV ,由于Max PE per PV及PE Size (Mbytes)的限制使100G的容量只能够使用80G!!
3.在创建VG的过程中应该注意指定max_pe(-e)的数量及pe_size(-s)的大小,否则可能会限制pv的使用!
# vgcreate -s 32 -e 65535 /dev/vgken1 /dev/dsk/c5t0d0 /dev/dsk/c7t0d0
Volume group "/dev/vgken1" has been successfully created.
Volume Group configuration for /dev/vgken1 has been saved in /etc/lvmconf/vgken1.conf
# vgdisplay -v vgken1
--- Volume groups ---
VG Name /dev/vgken1
VG Write Access read/write
VG Status available
Max LV 255
Cur LV 0
Open LV 0
Max PV 16
Cur PV 2
Act PV 2
Max PE per PV 65535
VGDA 4
PE Size (Mbytes) 32
Total PE 5758
Alloc PE 0
Free PE 5758
Total PVG 0
Total Spare PVs 0
Total Spare PVs in use 0
--- Physical volumes ---
PV Name /dev/dsk/c5t0d0
PV Name /dev/dsk/c7t0d0 Alternate Link
PV Status available
Total PE 2559
Free PE 2559
Autoswitch On
PV Name /dev/dsk/c5t0d1
PV Name /dev/dsk/c7t0d1 Alternate Link
PV Status available
Total PE 3199
Free PE 3199
Autoswitch On
本文来自ChinaUnix博客,如果查看原文请点:http://blog.chinaunix.net/u/10757/showart_149219.html |
|