Organizational Research By

Surprising Reserch Topic

Question:how to Extend a AIX LVM Volume?


The customer couldn't tell me if there is space available for extending the volume. So I had to check by my self again. After logging into the customers machine the first I ran was df to get the current size and usage of the volume:

# df -k /oradata
Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
/dev/oravol01    47185920   5880024   88%       50     1% /oradata


A closer look at the attributes gave me the following information:

# lslv oravol01
LOGICAL VOLUME:     oravol01               VOLUME GROUP:   oravg
LV IDENTIFIER:      000cc8480000d7000000011d4379fef4.1 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            512                    PP SIZE:        1024 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                45                     PPs:            45
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    2
MOUNT POINT:        /oradata               LABEL:          /oradata
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?:     NO


 


asked Sep 13, 2013 in LINUX by rajesh
edited Sep 12, 2013
0 votes
50 views



Related Hot Questions

4 Answers

0 votes

hdisk4 was the only disk with some free PPs available. So the customer was lucky and the volume can be increased by 44G. For extending a volume and resizing the filesystem IBM provides the command chfs which can do both:

# chfs -a size=89G /oradata
... 


After the volume and the filesystem was resized a final check with df and lslv again:

# df -k /oradata
Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
/dev/oravol01    93323264  51830128   45%       50     1% /oradata
# lslv oravol01
LOGICAL VOLUME:     oravol01               VOLUME GROUP:   oravg
LV IDENTIFIER:      000cc8480000d7000000011d4379fef4.1 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            512                    PP SIZE:        1024 megabyte(s)
COPIES:             2                      SCHED POLICY:   parallel
LPs:                89                     PPs:            89
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    2
MOUNT POINT:        /oradata               LABEL:          /oradata
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?:     NO


And the volume oravol01 was successfully resized from 45GB to 89GB.

answered Sep 13, 2013 by rajesh
edited Sep 12, 2013
0 votes

Important information for extending the volume are:

VOLUME GROUP:   oravg
COPIES:         1
PP SIZE:        1024 megabyte(s)
TYPE:           jfs2
PPs:            45
MOUNT POINT:    /oradata


45 physical partitions (PP) multiplied by 1GB/PP equals 45GB which is also represented by the df command above. There is only 1 copy which means that the volume is not mirrored (otherwise the PPs would be 90 while the LP's would be 45).
The next thing I needed to know where the free PP's inside the oravg volume group:

# lsvg -p oravg
oravg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
...
hdisk4            active            279         44          00..00..00..00..44
...


 

answered Sep 13, 2013 by rajesh
edited Sep 12, 2013
0 votes

hdisk4 was the only disk with some free PPs available. So the customer was lucky and the volume can be increased by 44G. For extending a volume and resizing the filesystem IBM provides the command chfs which can do both:

# chfs -a size=89G /oradata
... 


After the volume and the filesystem was resized a final check with df and lslv again:

# df -k /oradata
Filesystem    1024-blocks      Free %Used    Iused %Iused Mounted on
/dev/oravol01    93323264  51830128   45%       50     1% /oradata
# lslv oravol01
LOGICAL VOLUME:     oravol01               VOLUME GROUP:   oravg
LV IDENTIFIER:      000cc8480000d7000000011d4379fef4.1 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       opened/syncd
TYPE:               jfs2                   WRITE VERIFY:   off
MAX LPs:            512                    PP SIZE:        1024 megabyte(s)
COPIES:             2                      SCHED POLICY:   parallel
LPs:                89                     PPs:            89
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    2
MOUNT POINT:        /oradata               LABEL:          /oradata
MIRROR WRITE CONSISTENCY: on/ACTIVE
EACH LP COPY ON A SEPARATE PV ?: yes
Serialize IO ?:     NO


And the volume oravol01 was successfully resized from 45GB to 89GB.

answered Sep 13, 2013 by rajesh
edited Sep 12, 2013
0 votes

Important information for extending the volume are:

VOLUME GROUP:   oravg
COPIES:         1
PP SIZE:        1024 megabyte(s)
TYPE:           jfs2
PPs:            45
MOUNT POINT:    /oradata


45 physical partitions (PP) multiplied by 1GB/PP equals 45GB which is also represented by the df command above. There is only 1 copy which means that the volume is not mirrored (otherwise the PPs would be 90 while the LP's would be 45).
The next thing I needed to know where the free PP's inside the oravg volume group:

# lsvg -p oravg
oravg:
PV_NAME           PV STATE          TOTAL PPs   FREE PPs    FREE DISTRIBUTION
...
hdisk4            active            279         44          00..00..00..00..44
...


 

answered Sep 13, 2013 by rajesh
edited Sep 12, 2013

...