• Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 2456
  • Last Modified:

How to create RAW LV with zero byte offset in AIX

How can i create RAW LV with zero byte offset in AIX 5.3
  • 6
  • 3
5 Solutions
Hi again,

to be able to do this the VG where the LV is to be created in must be of "Big VG" format.

Once such a VG is present you can use the flag "-T O" of "mklv" to indicate that the logical volume control block will not occupy the first block of the logical volume, to make the space available for application data.

You can't use smitty for this, and you can't change an existing LV to zero offset format.

To change an existing VG to BIG format use the "-B" flag of "chvg".

Please note that there must be enough free partitions available on each physical volume for the VGDA expansion for this operation to be successful!

If you need further assistance with mklv or chvg please let me know!

assistunixAuthor Commented:
Hello wmp.

Can normal regular rootvg be converted into bigvg ?

Also, can a normal regular vg that is active and operating right now with plenty of lv's in it, including some raw lv's be converted to big vg on the go, without any issues or outage to the lv's in that vg?

what would happen if i use the following on normal regular vg, will the zero offset setting still take affect?
mklv -t raw -y myraw -T O appvg 8

assistunixAuthor Commented:
This is the vg in question. and it already has plenty of raw lv's in it.

# lsvg appvg
VOLUME GROUP:       appvg                VG IDENTIFIER:  00cc7d0100004c000000012658097387
VG STATE:           active                   PP SIZE:        128 megabyte(s)
VG PERMISSION:      read/write               TOTAL PPs:      4956 (634368 megabytes)
MAX LVs:            256                      FREE PPs:       3778 (483584 megabytes)
LVs:                50                       USED PPs:       1178 (150784 megabytes)
OPEN LVs:           28                       QUORUM:         8 (Enabled)
TOTAL PVs:          14                       VG DESCRIPTORS: 14
STALE PVs:          0                        STALE PPs:      0
ACTIVE PVs:         14                       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

This is one of the raw lv's from that vg

LOGICAL VOLUME:     rawlv          VOLUME GROUP:   appvg
LV IDENTIFIER:      00cc7d0100004c000000012658097387.43 PERMISSION:     read/write
VG STATE:           active/complete        LV STATE:       closed/syncd
TYPE:               raw                    WRITE VERIFY:   off
MAX LPs:            512                    PP SIZE:        128 megabyte(s)
COPIES:             1                      SCHED POLICY:   parallel
LPs:                64                     PPs:            64
STALE PPs:          0                      BB POLICY:      relocatable
INTER-POLICY:       minimum                RELOCATABLE:    yes
INTRA-POLICY:       middle                 UPPER BOUND:    1024
MOUNT POINT:        N/A                    LABEL:          None
Serialize IO ?:     NO

The device subtype is DS_LVZ for that rawlv, which means T O flags were used when creating this LV and the from the output above of lsvg appvg, it seems like the appvg is normal regular vg.

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

1) Yes, you can convert rootvg.

2) Yes,  chvg -B can (No: must be!) run on a VG that is varied on and active.

3) The command will succeed, but the LVCB will be created in the first 512 byte block nevertheless!
No. appvg is a big VG.

MAX PVs:        1024
OK, sorry, what I forgot to say for rootvg:

Your rootvg will most probably contain an active paging device, and chvg -B is not supported for VGs with such devices.

assistunixAuthor Commented:
Ok great thank you. I did not know that MAX PVs: 1024 meant Big VG. I was looking for the word BIG VG somewhere in the lsvg output.

So similarly for scalable vg, there would be a MAX PV number that i would have to look for, to determine if it's Scalable VG? Do you know that MAX PV number?

Although i don't have to convert VG to BIG VG in this case, but if i were to convert it than,
would i have to unmount all fs and close all raw devices before running chvg -B command?
Also, i only have one vg in my test server, which is rootvg, can i deactivate remove paging space from rootvg in order to perform chvg -B command, or would removing one and only paging space from the system cause system issues?
1) -T O is only supported on BIG VGs, not on old VGs and not on scalable VGs!

2) Scalable VGs have

MAX PPs per VG:     32768 (default) up to 2097152
MAX LVs:                 512 (default) up to 4096
MAX PVs:                                       up to 1024

3) You can leave everything as is, no umounts or the like.

4) You cannot deactivate the only paging space. AIX will not allow this, and if it did the system would crash.
OK, it's late here, so I again forgot an important thing on scalable VGs:

-T O is not needed for LVs in scalable VGs, because these volume groups never use the first block of the logical volume to store the logical volume control block!

I think I'll go to bed now, before I start writing even more nonsense!

Good night!

There is no danger rewriting first 4k of created PV
System can get information that volume is RAW or DB from odm.
BUT it is still better to offset one page on raw volumes.
Take care to make backups from oracle
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

Join & Write a Comment

Featured Post

Get expert help—faster!

Need expert help—fast? Use the Help Bell for personalized assistance getting answers to your important questions.

  • 6
  • 3
Tackle projects and never again get stuck behind a technical roadblock.
Join Now