1. Types of Volume Groups
VG type | Maximum PVs | Maximum LVs | Maximum PPs per VG | Maximum PP size |
Normal VG | 32 | 256 | 32,512 (1016 * 32) | 1 GB |
Big VG | 128 | 512 | 130,048 (1016 * 128) | 1 GB |
Scalable VG | 1024 | 4096 | 2,097,152 | 128 GB |
2. How to determine the type of volume Group
You can use the readvgda command to check a VG’s type:
# readvgda hdisk30 | grep type ..... readvgda_type: smallvg
3. Convert to Big VG or Scalable
To convert a standard VG to big VG format every physical volume in the volume group needs at least one free physical partition. The volume group
oraclevg
contains 13 physical volumes with no free partitons left:
So the first physical partition of hdisk31, hdisk32, hdisk33.. till hdisk42 and hdisk44 have to be moved to hdisk30. To find the affected logical volumes we check disk by disk for the logical volume residing on the first PP:
# lspv -l hdisk31 hdisk31: LV NAME LPs PPs DISTRIBUTION MOUNT POINT orp32101lv 799 799 160..160..159..160..160 /orp321am01 # lspv -l hdisk32 hdisk32: LV NAME LPs PPs DISTRIBUTION MOUNT POINT orp32101lv 799 799 160..160..159..160..160 /orp321am01 .....so on till last physical disk......
Affected LV is orp32101lv . To find the logical partitions to be migrated we look for physical partiton ’0001′ on each disk..
# lslv -m orp32101lv| grep -w 0001|egrep '(hdisk31|32|33|34|35|36|37|38|39|40|41|42|44)'
0001 0161 hdisk31
0320 0001 hdisk31
1119 0001 hdisk32
1918 0001 hdisk33
2717 0001 hdisk34
3516 0001 hdisk35
4315 0001 hdisk36
5114 0001 hdisk37
5913 0001 hdisk38
6712 0001 hdisk39
7511 0001 hdisk40
8310 0001 hdisk41
9109 0001 hdisk42
0001 0161 hdisk44
0320 0001 hdisk44
start the migration using migratelp:
# migratelp orp32101lv/0320 hdisk30 0516-1291 migratelp: Mirror copy 1 of logical partition 320 of logical volume orp32101lv migrated to physical partition 160 of hdisk30. # migratelp orp32101lv/1119 hdisk30 0516-1291 migratelp: Mirror copy 1 of logical partition 1119 of logical volume orp32101lv migrated to physical partition 159 of hdisk30. # migratelp orp32101lv/1918 hdisk30 0516-1291 migratelp: Mirror copy 1 of logical partition 1918 of logical volume orp32101lv migrated to physical partition 158 of hdisk30. # migratelp orp32101lv/2717 hdisk30 0516-1291 migratelp: Mirror copy 1 of logical partition 2717 of logical volume orp32101lv migrated to physical partition 157 of hdisk30. # migratelp orp32101lv/3516 hdisk30 0516-1291 migratelp: Mirror copy 1 of logical partition 3516 of logical volume orp32101lv migrated to physical partition 156 of hdisk30. # migratelp orp32101lv/4315 hdisk30 0516-1291 migratelp: Mirror copy 1 of logical partition 4315 of logical volume orp32101lv migrated to physical partition 155 of hdisk30. # migratelp orp32101lv/5114 hdisk30 0516-1291 migratelp: Mirror copy 1 of logical partition 5114 of logical volume orp32101lv migrated to physical partition 154 of hdisk30. # migratelp orp32101lv/5913 hdisk30 0516-1291 migratelp: Mirror copy 1 of logical partition 5913 of logical volume orp32101lv migrated to physical partition 153 of hdisk30. # migratelp orp32101lv/6712 hdisk30 0516-1291 migratelp: Mirror copy 1 of logical partition 6712 of logical volume orp32101lv migrated to physical partition 152 of hdisk30. # migratelp orp32101lv/7511 hdisk30 0516-1291 migratelp: Mirror copy 1 of logical partition 7511 of logical volume orp32101lv migrated to physical partition 151 of hdisk30. # migratelp orp32101lv/ 8310 hdisk30 0516-1291 migratelp: Mirror copy 1 of logical partition 8310 of logical volume orp32101lv migrated to physical partition 150 of hdisk30. # migratelp orp32101lv/ 9109 hdisk30 0516-1291 migratelp: Mirror copy 1 of logical partition 9109 of logical volume orp32101lv migrated to physical partition 149 of hdisk30. # migratelp orp32102lv/320 hdisk30 0516-1291 migratelp: Mirror copy 1 of logical partition 320 of logical volume orp32102lv migrated to physical partition 148 of hdisk30.
Checking…..
# lsvg -p oraclevg
oraclevg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk30 active 799 438 131..00..00..147..160
hdisk31 active 799 1 01..00..00..00..00
hdisk32 active 799 1 01..00..00..00..00
hdisk33 active 799 1 01..00..00..00..00
hdisk34 active 799 1 01..00..00..00..00
hdisk35 active 799 1 01..00..00..00..00
hdisk36 active 799 1 01..00..00..00..00
hdisk37 active 799 1 01..00..00..00..00
hdisk38 active 799 1 01..00..00..00..00
hdisk39 active 799 1 01..00..00..00..00
hdisk40 active 799 1 01..00..00..00..00
hdisk41 active 799 1 01..00..00..00..00
hdisk42 active 799 1 01..00..00..00..00
hdisk43 active 799 12 00..12..00..00..00
hdisk44 active 799 1 01..00..00..00..00
hdisk45 active 799 1 00..01..00..00..00
Finally we are ready to migrate the volume group to big VG format.
# chvg -B oraclevg
0516-1216 chvg: Physical partitions are being migrated for volume group descriptor area expansion. Please wait.
0516-1164 chvg: Volume group oraclevg changed. With given characteristics oraclevg can include up to 128 physical volumes with 1016 physical partitions each.
To be able to integrate physical volumes with more than 1016 partitions we need to increase the limit of the number of physical partitions per physical volume:
# chvg -t 2 oraclevg 0516-1164 chvg: Volume group oraclevg changed. With given characteristics oraclevg can include up to 64 physical volumes with 2032 physical partitions each.
As we see we have one physical partiton less per disk. This is due to a larger VGDA with big VGs:
# lsvg -p oraclevg oraclevg: PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION hdisk30 active 798 437 130..00..00..147..160 hdisk31 active 798 0 00..00..00..00..00 hdisk32 active 798 0 00..00..00..00..00 hdisk33 active 798 0 00..00..00..00..00 hdisk34 active 798 0 00..00..00..00..00 hdisk35 active 798 0 00..00..00..00..00 .................
No comments:
Post a Comment