如何快速区分VG类型 Original VG,Big VG,Scalable VG

传统行业仍然是很传统的在使用 raw device,所以 4K offset 问题仍然不可避免。
老早研究过,没有笔记,结果现在又要花时间搞。

目的:还是快速确认老生长谈的4K offset 问题。

Original VG

root @ rmdb1 : / # lsvg testvg
VOLUME GROUP:       testvg                   VG IDENTIFIER: 00c59a5200004c00000001245b281266
VG STATE:           active                   PP SIZE:        64 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      799 (51136 megabytes)
MAX LVs:            256                      FREE PPs:       799 (51136 megabytes)
LVs:                0                        USED PPs:       0 (0 megabytes)
OPEN LVs:           0                        QUORUM:         2 (Enabled)
TOTAL PVs:          1                        VG DESCRIPTORS: 2
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         1                        AUTO ON:        yes
MAX PPs per VG:     32512
MAX PPs per PV:     1016                     MAX PVs:        32
LTG size (Dynamic): 256 kilobyte(s)          AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable

Big VG
root @ rmdb1 : / # lsvg testvg2
VOLUME GROUP:       testvg2                  VG IDENTIFIER: 00c59a5200004c00000001245b291487
VG STATE:           active                   PP SIZE:        64 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      799 (51136 megabytes)
MAX LVs:            512                      FREE PPs:       799 (51136 megabytes)
LVs:                0                        USED PPs:       0 (0 megabytes)
OPEN LVs:           0                        QUORUM:         2 (Enabled)
TOTAL PVs:          1                        VG DESCRIPTORS: 2
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         1                        AUTO ON:        yes
MAX PPs per VG:     130048
MAX PPs per PV:     1016                     MAX PVs:        128
LTG size (Dynamic): 256 kilobyte(s)          AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable

Scalable VG
root @ rmdb1 : / # lsvg testvg3
VOLUME GROUP:       testvg3                  VG IDENTIFIER: 00c59a5200004c00000001245b29a688
VG STATE:           active                   PP SIZE:        32 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      1597 (51104 megabytes)
MAX LVs:            256                      FREE PPs:       1597 (51104 megabytes)
LVs:                0                        USED PPs:       0 (0 megabytes)
OPEN LVs:           0                        QUORUM:         2 (Enabled)
TOTAL PVs:          1                        VG DESCRIPTORS: 2
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         1                        AUTO ON:        yes
MAX PPs per VG:     32768                    MAX PVs:        1024
LTG size (Dynamic): 256 kilobyte(s)          AUTO SYNC:      no
HOT SPARE:          no                       BB POLICY:      relocatable

附录: 只有 Scalable VG 可以更改 MAX PPs per VG
/usr/sbin/chvg -a'y' -Q'y' -P'64' testvg3

-P PhysicalPartitions
Increases the number of physical partitions a volume group can accommodate. Where the PhysicalPartitions
variable is represented in units of 1024 partitions. Valid values are 64, 128, 256, 512 768, 1024 and 2048. The
value should be larger than the current value or no action is taken. This option is only valid with Scalable-type volume groups.

三种VG里的四种LV:

Original VG
root @ rmdb1 : / # lslv testlv1
LOGICAL VOLUME:     testlv1                VOLUME GROUP:   testvg
LV IDENTIFIER:      00c59a5200004c00000001245b281266.1 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       closed/syncd
TYPE:               jfs                    WRITE VERIFY:   off
MAX LPs:            512                    PP SIZE:        64 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                10                     PPs:            10
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    32
MOUNT POINT:        N/A                    LABEL:          None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?:     NO

Big VG
root @ rmdb1 : / # lslv testlv2
LOGICAL VOLUME:     testlv2                VOLUME GROUP:   testvg2
LV IDENTIFIER:      00c59a5200004c00000001245b291487.1 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       closed/syncd
TYPE:               jfs                    WRITE VERIFY:   off
MAX LPs:            512                    PP SIZE:        64 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                10                     PPs:            10
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    128
MOUNT POINT:        N/A                    LABEL:          None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?:     NO
Big VG with -TO
/usr/sbin/mklv -TO -y'testlv22' testvg2 10

root @ rmdb1 : / # lslv testlv22
LOGICAL VOLUME:     testlv22               VOLUME GROUP:   testvg2
LV IDENTIFIER:      00c59a5200004c00000001245b291487.2 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       closed/syncd
TYPE:               jfs                    WRITE VERIFY:   off
MAX LPs:            512                    PP SIZE:        64 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                10                     PPs:            10
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    128
MOUNT POINT:        N/A                    LABEL:          None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?:     NO
DEVICESUBTYPE : DS_LVZ

Scalable VG
root @ rmdb1 : / # lslv testlv3
LOGICAL VOLUME:     testlv3                VOLUME GROUP:   testvg3
LV IDENTIFIER:      00c59a5200004c00000001245b29a688.1 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       closed/syncd
TYPE:               jfs                    WRITE VERIFY:   off
MAX LPs:            512                    PP SIZE:        32 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                10                     PPs:            10
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    1024
MOUNT POINT:        N/A                    LABEL:          None
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?:     NO
DEVICESUBTYPE : DS_LVZ

一个正确的样例(BVG's LV with -TO or SVG's LV)
oracle @ rmdb1 : /oracle $ dbfsize /dev/rlvrm_03_8g_000
Database file: /dev/rlvrm_03_8g_000
Database file type: raw device without 4K starting offset
Database file size: 1047040 8192 byte blocks

你可能感兴趣的:(oracle,职场,offset,休闲,4k)