Allocate each logical partition copy on a SEPARATE physical volume?
You can also ignore the
intra-disk
smit option:
POSITION on physical volume.
When you use smit, these fields have default values which can be ignored
because the map file physical partition allocation will have the higher
precedence.
For example, the use of the two map files badmir.map and badmir.map2 to
create the two copies of the perflv1 logical volume later will result in both copies
being placed on hdisk5. Hence, this gives you the same result as you would
obtain if you set
RANGE of physical volumes to minimum. This is why this field must
be ignored. If you try to change this field, youll get an error like
0516-690 mklv: The -a, -e, -u, -s, and -c options cannot be
used with the -m option.
Usage: mklv [-a IntraPolicy] [-b BadBlocks] [-c Copies] [-d Schedule]
[-e InterPolicy] [-i] [-L Label] [-m MapFile] [-r Relocate]
[-s Strict] [-t Type] [ -u UpperBound] [-v Verify&rbr. [-w MWC]
[-x MaxLPs] [-y LVname] [-Y Prefix] [-S StripeSize] VGname NumberOfLPs
[PVname...]
Makes a logical volume.
8.3.3 A Design Example for Improved Availability
This section will show you how to implement a mirrored environment that will
help you minimize the disruption caused by a hardware failure. The example in
this section assumes that you accept the cost of the extra disk capacity required
to implement mirroring.
If you do not have enough physical volumes to do this, then you can still improve
your availability by specifying minimum as the target range of physical volumes
during the creation of your logical volumes. This may be helpful if you know two
physical volumes in a volume group are much more reliable than another,
because if the less reliable physical volume fails, you may be able to access the
logical volumes that exist on one of the good disks.
We have already discussed a mirrored rootvg volume group, so this example
shows you how a non-rootvg volume group can be mirrored to provide higher
availability than in a non-mirrored environment.
Since mirroring requires a minimum of two physical volumes we will also show
how to identify these resources. We will use the name, availvg for our volume
group and and for our logical volume and journaled file system we expect to use
the names, availlv and availjfs respectively.
8.3.3.1 Command Line Summary
1. First check to see what disks are available and that they are not assigned to
an existing volume group:
# lspv
hdisk4 0000020158496d72 none
hdisk6 000002007bb618f5 none
#lsdev -Cc disk
hdisk4 Available 00-07-00-0,0 1.2 GB SCSI Disk Drive (in 2.4 GB Disk Unit)
hdisk6 Available 00-07-00-2,0 1.2 GB SCSI Disk Drive (in 2.4 GB Disk Unit)
208 AIX Storage Management
2. Create original non-rootvg using both physical volumes:
# mkvg -f -yavailvg′ ′hdisk4 hdisk6
3. Add a logical volume to the the volume group availvg creating two copies,
each on a different physical volume. The logical volume will consist of six
logical partitions:
# mklv -yavaillv -ex -c′2′ -vy′ ′availvg′ ′6′
4. Create a journaled file system, /availjfs, using the logical volume created
above:
# crfs -v jfs -davaillv -m′/availjfs -Ayes -prw -tno \
-a frag=′4096′ -a nbpi=′4096′ -a compress= no
5. Mount the journaled file system:
# mount /availjfs
6. Create a copy of the journaled log logical volume:
mklvcopy -ex′ ′-k′ ′loglv00′ ′2′
7. Turn off quorum checking:
# chvg -ay -Qn′ ′availvg
You now have a volume group with mirrored logical volumes and a file system
mounted and ready to be used.
8.3.3.2 Detailed Description
The above summary steps have shown us how to create a mirrored volume
group. In this section we will look at each command separately, showing its
output and also verify that we have successfully created a mirrored volume
group.
How to Create a Mirrored non-rootvg Volume Group:
In order to create a
mirrored volume group we need two or more free physical volumes. In our
example we have chosen
hdisk4
and
hdisk6
, each capable of being powered on
and off separately. This will be useful in simulating a physical volume failure by
switching off one of the active physical volumes. A mirrored logical volume,
availlv, will be created with a size of six logical partitions (24MB), with each copy
on a separate physical volume.
In order to achieve high availability we need to make sure that for each of the
physical volumes selected for the volume group:
They are on different SCSI adapters.
They have their own power supply.
1. First let us look at the availability of the physical volumes for the volume
group. Execute the
lspv command to check which physical volumes are
currently not assigned to a volume group:
Chapter 8. Practical Examples 209

Get AIX Storage Management now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.