Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

mirror hard drives need help

Status
Not open for further replies.

call

Technical User
Oct 31, 2000
127
US
This is the first time im playing with mirror hard drives my problem is
when I have to add space to filesystem do i add space to all the mirror drives.
here is what i have can you tell me the best way to add more space or do i need to add to all to make it the same. THIS IS ON AN SP FRAME.

mediware:/etc#lsvg -p worxmvg
worxmvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk7 active 268 196 54..00..35..53..54
hdisk8 active 268 121 54..00..00..13..54
hdisk9 active 268 127 54..00..00..19..54
mediware:/etc#lsvg -p worxvg
worxvg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk4 active 268 196 54..00..35..53..54
hdisk5 active 268 121 54..00..00..13..54
hdisk6 active 268 127 54..00..00..19..54
mediware:/etc#lsvg -l worxvg
worxvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
root_chunk jfs 2 2 1 open/syncd N/A
log_chunk1 jfs 22 22 1 open/syncd N/A
temp_chunk1 jfs 16 16 1 open/syncd N/A
phys_chunk1 jfs 7 7 1 open/syncd N/A
test_chunk1 jfs 63 63 1 open/syncd N/A
prod_chunk1 jfs 125 125 1 open/syncd N/A
prod_chunk2 jfs 125 125 1 open/syncd N/A

mediware:/etc#lsvg -l worxmvg
worxmvg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
root_mchunk jfs 2 2 1 open/syncd N/A
log_mchunk1 jfs 22 22 1 open/syncd N/A
temp_mchunk1 jfs 16 16 1 closed/syncd N/A
phys_mchunk1 jfs 7 7 1 open/syncd N/A
test_mchunk1 jfs 63 63 1 open/syncd N/A
prod_mchunk1 jfs 125 125 1 open/syncd N/A
prod_mchunk2 jfs 125 125 1 open/syncd N/A

Filesystem 512-blocks Free %Used Iused %Iused Mounted on
/dev/hd4 49152 19280 61% 1569 13% /
/dev/hd2 1622016 150824 91% 30175 15% /usr
/dev/hd9var 311296 276664 12% 655 2% /var
/dev/hd3 262144 224016 15% 208 1% /tmp
/dev/hd1 81920 63496 23% 818 8% /home
/dev/lv01 212992 164728 23% 310 2% /digi
/dev/lv02 704512 171064 76% 3198 4% /digi/informix
/dev/lv03 212992 106432 51% 212 1% /digi/worx_prod
/dev/lv04 212992 84248 61% 256 1% /digi/worx_test
/dev/lv05 2015232 257328 88% 551 1% /digi/exports

mediware:/etc#lspv
hdisk0 000034147e85ace2 rootvg
hdisk1 none None
hdisk2 00003931d63e829b digivg
hdisk3 00003931c48a5e73 digivg
hdisk4 00003931c48a6641 worxvg
hdisk5 00003931c48c6283 worxvg
hdisk6 00003931c48cbb45 worxvg
hdisk7 00003931c48d69f3 worxmvg
hdisk8 00003931c48dc92c worxmvg
hdisk9 00003931713224db worxmvg
hdisk10 none None
hdisk11 none None
hdisk12 none None
hdisk13 none None
hdisk14 none None
hdisk15 0000393171eac501 None
hdisk16 none None
hdisk17 none None
hdisk18 none None
 
here more info.

mediware:/#lsvg -l digivg
digivg:
LV NAME TYPE LPs PPs PVs LV STATE MOUNT POINT
loglv00 jfslog 1 1 1 open/syncd N/A
lv01 jfs 13 13 1 open/syncd /digi
lv02 jfs 43 43 1 open/syncd /digi/informix
lv03 jfs 13 13 1 open/syncd /digi/worx_prod
lv04 jfs 13 13 1 open/syncd /digi/worx_test
lv05 jfs 123 123 1 open/syncd /digi/exports
mediware:/#lsvg -p digivg
digivg:
PV_NAME PV STATE TOTAL PPs FREE PPs FREE DISTRIBUTION
hdisk2 active 537 493 108..63..107..107..108
hdisk3 active 537 375 108..00..52..107..108
 
Have a look at the mirrovg command and the following info on mirroring...
When you mirror if you increase the pps for one copy the mirrored also grows....
Not sure if that answers your question. What you have above is not mirrored....
I assume you are looking to mirror your rootvg and your data?

There is also a good redbook
on Logical volumes A - Z that discusses mirrorning,
you can download a copy off the web.....AIX Logical Volume Manager from A to Z:
Troubleshooting and Commands, SG24-5433-00 and
AIX Logical Volume Manager, From A to Z:
Introduction and Concepts, SG24-5432-00

Mirroring the root volume group:
-------------------------
mirrorvg Command

Purpose

Mirrors all the logical volumes that exist on a given volume group. This command only applies to AIX Version 4.2.1 or later.

Syntax

mirrorvg [ -S | -s ] [ -Q ] [ -c Copies] [ -m ] VolumeGroup [ PhysicalVolume ... ]

Description

The mirrorvg command takes all the logical volumes on a given volume group and mirrors those logical volumes. This same functionality may also be accomplished manually if you execute the mklvcopy command for each individual logical volume in a volume group. As with mklvcopy, the target physical drives to be mirrored with data must already be members of the volume group. To add disks to a volume group, run the extendvg command.

By default, mirrorvg attempts to mirror the logical volumes onto any of the disks in a volume group. If you wish to control which drives are used for mirroring, you must include the list of disks in the input parameters, PhysicalVolume. Mirror strictness is enforced. Additionally, mirrorvg mirrors the logical volumes, using the default settings of the logical volume being mirrored. If you wish to violate mirror strictness or affect the policy by which the mirror is created, you must execute the mirroring of all logical volumes manually with the mklvcopy command.

When mirrorvg is executed, the default behavior of the command requires that the synchronization of the mirrors must complete before the command returns to the user. If you wish to avoid the delay, use the -S or -s option. Additionally, the default value of 2 copies is always used. To specify a value other than 2, use the -c option.

Notes:

1.This command ignores striped logical volumes. Mirroring striped logical volumes is not possible.
2.To use this command, you must either have root user authority or be a member of the system group.
Attention: The mirrorvg command may take a significant amount of time before completing because of complex error checking, the amount of logical volumes to mirror in a volume group, and the time is takes to synchronize the new mirrored logical volumes.

You can use the Web-based System Manager Volumes application (wsm lvm fast path) to run this command. You could also use the System Management Interface Tool (SMIT) smit mirrorvg fast path to run this command.

Flags

-c Copies
Specifies the minimum number of copies that each logical volume must have after the
mirrorvg command has finished executing. It may be possible, through the
independent use of mklvcopy, that some logical volumes may have more than the
minimum number specified after the mirrorvg command has executed. Minimum value
is 2 and 3 is the maximum value. A value of 1 is ignored.

-m exact map
Allows mirroring of logical volumes in the exact physical partition order that the original copy is ordered. This option requires you to specify a PhysicalVolume(s)
where the exact map copy should be placed. If the space is insufficient for an exact
mapping, then the command will fail. You should add new drives or pick a different set
of drives that will satisfy an exact logical volume mapping of the entire volume group.
The designated disks must be equal to or exceed the size of the drives which are to be
exactly mirrored, regardless of if the entire disk is used. Also, if any logical volume to
be mirrored is already mirrored, this command will fail.

-Q Quorum Keep
By default in mirrorvg, when a volume group's contents becomes mirrored, volume
group quorum is disabled. If the user wishes to keep the volume group quorum
requirement after mirroring is complete, this option should be used in the command.
For later quorum changes, refer to the chvg command.

-S Background Sync
Returns the mirrorvg command immediately and starts a background syncvg of the
volume group. With this option, it is not obvious when the mirrors have completely
finished their synchronization. However, as portions of the mirrors become
synchronized, they are immediately used by the operating system in mirror usage.

-s Disable Sync
Returns the mirrorvg command immediately without performing any type of mirror
synchronization. If this option is used, the mirror may exist for a logical volume but is
not used by the operating system until it has been synchronized with the syncvg
command.

The following is a description of rootvg:

rootvg mirroring
When the rootvg mirroring has completed, you must perform three
additional tasks: bosboot, bootlist, and reboot.

The bosboot command is required to customize the bootrec of the
newly mirrored drive. The bootlist command needs to be performed to
instruct the system which disk and order you prefer the mirrored boot
process to start.

Fiinally, the default of this command is for Quorum to be turned off. For
this to take effect on a rootvg volume group, the system must be rebooted.


non-rootvg mirroring
When this volume group has been mirrored, the default command
causes Quorum to deactivated. The user must close all open logical
volumes, execute varyoffvg and then varyonvg on the volume group
for the system to understand that quorum is or is not needed for the
volume group. If you do not revaryon the volume group, mirror will still
work correctly. However, any quorum changes will not have taken
effect.

rootvg and non-rootvg mirroring
The system dump devices, primary and secondary, should not be
mirrored. In some systems, the paging device and the dump device are
the same device. However, most users want the paging device mirrored.
When mirrorvg detects that a dump device and the paging device are
the same, the logical volume will be mirrored automatically.
If mirrorvg detects that the dump and paging device are different logical
volumes, the paging device is automatically mirrored, but the dump
logical volume is not. The dump device can be queried and modified
with the sysdumpdev command.


Examples

1.To triply mirror a volume group, enter:

mirrorvg -c 3 workvg

The logical partitions in the logical volumes held on workvg now have three copies.
2.To get default mirroring of rootvg, enter:

mirrorvg rootvg

rootvg now has two copies.
3.To replace a bad disk drive in a mirrored volume group, enter

unmirrorvg workvg hdisk7
reducevg workvg hdisk7
rmdev -l hdisk7 -d
replace the disk drive, let the drive be renamed hdisk7
extendvg workvg hdisk7
mirrorvg workvg

Note: By default in this example, mirrorvg will try to create 2 copies for logical volumes in workvg. It will try to create the new mirrors onto the replaced disk drive. However, if the original system had been triply mirrored, there may be no new mirrors created onto hdisk7, as other copies may already exist for the logical volumes.

4.To sync the newly created mirrors in the background, enter:

mirrorvg -S -c 3 workvg

5.To create an exact mapped volume group, enter:

mirrorvg -m datavg hdisk2 hdisk3
 
Hello, if you do a [tt]chfs -a size=[red]+number[/red] /filesystem[/tt], with number the number of blocks to add to a file system, AIX will grow the needed number of partitions on all copies of the volume containing the file system, and then will grow the file system to fully occupy that additional partitions, then I guess that's what you want to do.

I hope it works...
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top