Create a volume group version 2.0
Overview
|
Create a volume group version 2.0 with 8 disk, for
pvg-strict/distributed.
|
Procedures
|
Create a volume group version 2.0 named /dev/vg09 with 8
physical volumes, an extent size of 256 megabytes and a maximum total size of
1 petabyte.
#cat xp.out |grep -iE
"4f:14|4f:15|4f:16|4f:17|5d:c4|5d:c5|5d:c6|5d:c7"
/dev/rdisk/disk212 82
--- 24 CL5H 4f:14
OPEN-V 00065760
/dev/rdisk/disk173 82
--- 25 CL5H 4f:15
OPEN-V 00065760
/dev/rdisk/disk215 74
--- 26 CL6H 4f:16
OPEN-V 00065760
/dev/rdisk/disk225 74
--- 27 CL6H 4f:17
OPEN-V 00065760
/dev/rdisk/disk763 88
--- 88 CL1H 5d:c4
OPEN-V 00066657
/dev/rdisk/disk764 88
--- 89 CL1H 5d:c5
OPEN-V 00066657
/dev/rdisk/disk766 75
--- 8a CL4H 5d:c6
OPEN-V 00066657
/dev/rdisk/disk770 75
--- 8b CL4H 5d:c7
OPEN-V 00066657
#
#cat RDISK |sed "s/rdisk/disk/"
/dev/disk/disk212
/dev/disk/disk173
/dev/disk/disk215
/dev/disk/disk225
/dev/disk/disk763
/dev/disk/disk764
/dev/disk/disk766
/dev/disk/disk770
#cat RDISK |sed "s/rdisk/disk/"
|while read disk
> do
> strings /etc/lvmtab|grep -w $disk
> done
#
Initialize the
disks using pvcreate
cat RDISK |while read disk
> do
> pvcreate $disk
> done
Physical volume
"/dev/rdisk/disk212" has been successfully created.
Physical volume
"/dev/rdisk/disk173" has been successfully created.
Physical volume
"/dev/rdisk/disk215" has been successfully created.
Physical volume
"/dev/rdisk/disk225" has been successfully created.
Physical volume
"/dev/rdisk/disk763" has been successfully created.
Physical volume
"/dev/rdisk/disk764" has been successfully created.
Physical volume
"/dev/rdisk/disk766" has been successfully created.
Physical volume
"/dev/rdisk/disk770" has been successfully created.
The vg_name directory and group file will be created automatically. Optionally, these files can be created
before doing the vgcreate, as follows:
mkdir /dev/vg09
mknod /dev/vg09/group c 128 0x009000
NOTE: Notice that the major number for a volume group version 2.0
or higher is 128 while the major number for a volume group
version 1.0 is 64. Also, the
volume group number occupies the
high order 12 bits of the minor number rather than the high order
8 bits as in volume groups version 1.0.
Create the volume group version 2.0.
# vgcreate -V 2.0
-s 256 -S 1p /dev/vg09 /dev/disk/disk212
/dev/disk/disk173
Volume group "/dev/vg09" has
been successfully created.
Volume Group configuration for /dev/vg09
has been saved in /etc/lvmconf/vg09.conf
#vgextend -g
PVGNAME01 /dev/vg09 /dev/disk/disk212 /dev/disk/disk173 /dev/disk/disk215
/dev/disk/disk225
vgextend: The physical volume
"/dev/disk/disk212" is already recorded in the
"/etc/lvmtab_p" file.
vgextend: The physical volume
"/dev/disk/disk173" is already recorded in the
"/etc/lvmtab_p" file.
Physical volume group
"PVGNAME01" has been successfully extended.
Volume Group configuration for /dev/vg09
has been saved in /etc/lvmconf/vg09.conf
# vgextend -g PVGNAME02 /dev/vg09 /dev/disk/disk763
/dev/disk/disk764 /dev/disk/disk766 /dev/disk/disk770
Volume group "/dev/vg09" has
been successfully extended.
Physical volume group
"PVGNAME02" has been successfully extended.
Volume Group configuration for /dev/vg09
has been saved in /etc/lvmconf/vg09.conf
#
#vgdisplay -v /dev/vg09
--- Volume groups ---
VG Name /dev/vg09
VG Write Access read/write
VG Status available
Max LV 511
Cur LV 0
Open LV 0
Max PV 511
Cur PV 8
Act PV 8
Max PE per PV 65536
VGDA 16
PE Size (Mbytes) 256
Total PE 2840
Alloc PE 0
Free PE 2840
Total PVG 2
Total Spare PVs 0
Total Spare PVs in use 0
VG Version 2.0
VG Max Size 1p
VG Max Extents 4194304
--- Physical volumes ---
PV Name
/dev/disk/disk212
PV Status
available
Total PE
499
Free PE
499
Autoswitch On
Proactive Polling
On
PV Name
/dev/disk/disk173
PV Status
available
Total PE
499
Free PE
499
Autoswitch
On
Proactive Polling
On
PV Name
/dev/disk/disk215
PV Status available
Total PE 499
Free PE 499
Autoswitch
On
Proactive Polling On
PV Name
/dev/disk/disk225
PV Status available
Total PE
499
Free PE
499
Autoswitch
On
Proactive Polling
On
PV Name
/dev/disk/disk763
PV Status
available
Total PE
211
Free PE
211
Autoswitch
On
Proactive Polling
On
PV Name
/dev/disk/disk764
PV Status
available
Total PE
211
Free PE
211
Autoswitch
On
Proactive Polling
On
PV Name
/dev/disk/disk766
PV Status
available
Total PE
211
Free PE
211
Autoswitch
On
Proactive Polling
On
PV Name
/dev/disk/disk770
PV Status
available
Total PE
211
Free PE 211
Autoswitch
On
Proactive Polling
On
--- Physical volume groups ---
PVG Name
PVGNAME01
PV Name
/dev/disk/disk212
PV Name
/dev/disk/disk173
PV Name
/dev/disk/disk215
PV Name
/dev/disk/disk225
PVG Name
PVGNAME02
PV Name
/dev/disk/disk763
PV Name /dev/disk/disk764
PV Name
/dev/disk/disk766
PV Name
/dev/disk/disk770
#Create LV ---as per requirement
#lvcreate -n lv_Data /dev/vg09 #lvextend -L 101024 /dev/vg09/lv_Data PVGNAME01 #newfs -F vxfs -o largefiles -b 8192 /dev/vg09/rlv_Data #mkdir /oracle/SAP/sapdata1 #mount /dev/vg09/lv_Data /oracle/SAP/sapdata1 #bdf /oracle/SAP/sapdata1
#strings /etc/lvmtab_p
/dev/vg09
A0000000000000001Thu Mar 27 16:27:27
20148bcaad08-1ae4-11e1-be63-8775a8ebba59
/dev/disk/disk212
/dev/disk/disk173
/dev/disk/disk215
/dev/disk/disk225
/dev/disk/disk763
/dev/disk/disk764
/dev/disk/disk766
/dev/disk/disk770
How to Decom the VG if it is not in Use :
#vgchange -a n /dev/vg09
Volume group "/dev/vg09" has
been successfully changed.
#vgexport /dev/vg09
Physical volume
"/dev/disk/disk212" has been successfully deleted from
physical volume group
"PVGNAME01".
Physical volume "/dev/disk/disk173"
has been successfully deleted from
physical volume group
"PVGNAME01".
Physical volume
"/dev/disk/disk215" has been successfully deleted from
physical volume group
"PVGNAME01".
Physical volume
"/dev/disk/disk225" has been successfully deleted from
physical volume group
"PVGNAME01".
Physical volume
"/dev/disk/disk763" has been successfully deleted from
physical volume group
"PVGNAME02".
Physical volume
"/dev/disk/disk764" has been successfully deleted from
physical volume group
"PVGNAME02".
Physical volume
"/dev/disk/disk766" has been successfully deleted from
physical volume group
"PVGNAME02".
Physical volume
"/dev/disk/disk770" has been successfully deleted from
physical volume group
"PVGNAME02".
vgexport: Volume group
"/dev/vg09" has been successfully removed.
#
Create a volume group version 2.0 of size comparable to a volume
group version 1.0 created with pe_size=64, max_pe=4096, and
max_pv=16 on an already initialized disk.
First calculate the appropriate vg_size parameter as follows:
max_pe x max_pv x pe_size=vg_size (in megabytes) 4096 x 16 x 64 =
4194304m = 4t. Now create the
volume group version 2.0.
vgcreate -V 2.0 -s 64 -S 4t vg10 /dev/disk/disk04
Display the minimum extent size required to create a 512 terabyte
volume group version 2.0.
vgcreate -V 2.0 -E -S 512t
|
Keywords
|
Vgextend ,
|
No comments:
Post a Comment