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 Westi on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Disk Mirroring

Status
Not open for further replies.

Midrange

Vendor
Aug 28, 2002
135
SG
Hi All, I have a machine model S70 with an internal disks of 2 x 9.1Gb. All PP's was already consumed and we are increasing in users (/home) and adding more filesets (/usr). Is it possible to extend a volume group and I also want the additional disk to be mirrored to another disk. So 4 disk in total will be on the rootvg? If possible how an I do it?

 
Hi Midrange,
it is possible using smit(ty) for example. The problem can
appear if the PP size (Phisical Partition Size) is not
enough big to add more volume(s) because PP size cannot be
increased on the existed VG.
Boris
 
Hi Boria, let me summariza my question..Is it possisble to mirror a rootvg volume group with two disks on one set..A total of 4 disks..2 disks is mirrored on another two disks and all 4 are member of rootvg vg..

thanks
 
Hi Midrange,
It is possible. First add new drives to rootvg VG. And then
use command mirrorvg. If new disks are hdisk2, hdisk3 command can seem like
# mirrorvg rootvg hdisk2 hdisk3
For rootvg VG after command end you must permorm three
additional tasks: boosboot, bootlist and reboot.
I strongly recommend you to read man mirrorvg for details.
Boris
 

Hi,
# extendvg -f hdisk2 rootvg
# extendvg -f hdisk3 rootvg
# mirrorvg rootvg
# bosboot -ad hdisk2 (If that's where hd5 went)

If you want sysdump devices to work there's a procedure for that as well.

Then

# bootlist -m normal hdis0 hdisk2 Henrik Morsing
IBM Certified AIX 4.3 Systems Administration
 
Restrictions that apply to this procedure
The following restrictions apply to the mirroring procedure:

APAR IX56564 (AIX 4.1 only) must be applied on the system for mksysb to correctly restore a mirrored volume group back into a system in mirrored format. If this APAR fix is not applied, then the mksysb will still restore the rootvg onto a system; however, the base mirrors of the logical volumes will not be automatically created and must be recreated by the user. To determine if this fix is installed on a machine, enter the following command:
instfix -i -k IX56564
Consult the table at the end of this document to determine if the level of AIX you are running already contains this fix.
If the dump device is mirrored, the user may not be able to capture the dump image from a crash, or the dump image may be corrupted. The design of LVM prevents mirrored writes of the dump device. Only one of the mirrors will receive the dump image. Depending on the boot sequence and disk availability after a crash, the dump will be in one of the following three states:
not available
available and not corrupted
available and corrupted
State (a) will always be a possibility. If the user prefers to prevent the risk of encountering state (c), then the user must create a non-mirrored logical volume (that is not hd6) and set the dump device to this non-mirrored logical volume. Refer to the section "Paging and dump devices" for further details.
Parallel mirroring policy (the default) must be the policy used on the base logical volumes that constitute AIX (hd1, hd2, ... hd9var). This restriction is for performance reasons only.
Mirror strictness (the default) must be maintained on all the base logical volumes that constitute AIX (hd1, hd2, ... hd9var). If two copies of a logical volume reside on the same disk, it would defeat and invalidate the original goal of mirroring a rootvg volume group against possible disk failure.
The boot logical volume, hd5 and all its mirrors, must be made up of consecutive physical partitions. Most standard AIX systems have an hd5 made up of just one physical partition. But if the user ever expands hd5, the growth of hd5 and its mirrors must be made up of the next consecutive physical partitions of each mirror's location on the disk. This may be determined with the following command:
lslv -m hd5
The hd6 logical volume must exist in rootvg and must be an active paging device. Other paging devices on other volume groups are permitted, but hd6 (and its mirror) must exist on the disks that make up rootvg. For more details see the section "Paging and dump devices."
The disks that constitute the boot drives for AIX must be disks that are supported to boot on pSeries or RS/6000 platforms. Any disk that contains hd5 and its mirrors is considered a boot drive for AIX. A machine and disk configuration may be queried to determine if that combination of machine and disk supports booting from disk. Use the following command to query:
bootinfo -B hdiskX
If the command returns a 1 then it will be bootable by AIX. Any other value indicates that this disk is not a candidate for rootvg mirroring.
In case of disk failure and then replacement, users should consult the AIX System Management Guide appropriate to the level of AIX they are running. When replacing a mirrored volume group, the steps are identical (with the exception of Restriction 10) for rootvg and non-rootvg volume groups:
Mirror copies referenced on the bad disk are removed.
The "bad disk" reference is removed from the volume group using the reducevg command.
Follow the procedures to re-mirror a volume group.
Physical and design limitations (see step 1 of the "Procedure" section) may exist that prevent the mirroring of the rootvg.
When the user executes the following commands:
migratepv
reorgvg
reducevg
and the logical volume that constitutes the dump device (typically hd6) OR its mirror resides on the disk, the user must first set the dump device to /dev/sysdumpnull before executing the command. After the command is complete, the user may reset the dump device to the original dump logical volume.
Some systems do not support the bootlist command (see "Procedure"). The rootvg can still be mirrored on these systems, but the possible reboot following a failure of the original boot disk will require user intervention to re-select alternate boot disks for subsequent boots.
The syncvg command is not available to rootvg at the time the rootvg volume group is activated. If after a mirrored rootvg has booted there exist stale logical volumes in rootvg, then the user must run the syncvg command on rootvg to synchronize any stale logical volumes.
APAR IX61186 is required for bosboot to work correctly in some cases.
APAR IX68483 is required for booting to work correctly on 4.2 systems. To determine if either fix is installed on a machine, execute the following:
instfix -i -k <apar number>
The equivalent AIX 4.2 APAR fixes are listed in the table at the end of this document.
In this document's table of APAR fixes for AIX 4.1, AIX 4.2, and AIX 4.3, in addition to the mandatory fixes listed in Restrictions 1 and 17, APARS relevant to LVM mirroring are listed as REQUIRED rootvg mirroring fixes a user should place on their system. Please note that the most recent mirroring fix was chosen. Older mirroring fixes, by default, are included with these latest fileset fixes. These fixes are very strongly recommended for those people using any type of logical volume mirroring on their AIX systems. Please note that the fix list may change as problems are discovered and fixed.
In AIX 4.1, the simultaneous creation of mirrored logical volumes greater than 2GB might fail and should not be attempted. This is documented in the AIX 4.1 release notes. Instead, the user should create a logical volume with the mklv command. Then, the user should create a mirror for the logical volume with the mklvcopy command. This restriction also applies to the restoration of a mirrored rootvg from a mksysb image, if the mirrored rootvg contains a logical volume greater than 2GB. To work around this, the user should set the Create Map Files option in mksysb to YES. This restriction does not apply to AIX 4.2 and AIX 4.3 systems.
APAR IX58121 is required to be applied on UP and SMP systems before mirroring of rootvg can be initiated. APAR IX58267 is only required on SMP systems, for performance reasons. To determine if either fix is installed on a machine, enter:
instfix -i -k <apar number>

--------------------------------------------------------------------------------

Alternative
In AIX 4.2.1, two new LVM commands were introduced: mirrorvg and unmirrorvg. These two commands where introduced to simplify mirroring or unmirroring of the entire contents of a volume group. The commands detect if the entity to be mirrored or unmirrored is rootvg, and will give slightly different completion messages based on the type of the volume group.

Assuming that hdisk1 is the physical volume to mirror to, use the following syntax:

mirrorvg rootvg hdisk1

NOTE: The mirrorvg command does the equivalent of steps 2-4 in the &quot;Procedure&quot; section.


--------------------------------------------------------------------------------

Paging and dump devices
When the paging device is mirrored, there will be extra write cycles as the mirrored image of the paged memory is written to disk. This will affect the performance to a slight degree. The user can choose not to mirror the paging device, but this would defeat the original purpose of rootvg mirroring, which is to keep a system or program active if a disk were to fail. If the paging device were not mirrored but all the other logical volumes in rootvg were mirrored, then the behavior of the system would be equal to that of a non-mirrored rootvg that experiences a paging disk fail in the middle of operation.

As discussed previously, when a system dump is occurring, the dump image is not written to disk in mirrored form. The logic behind this fact is that if the mirroring code itself were the cause of the system crash, then trusting the same code to handle the mirrored write would be pointless. Thus, mirroring a dump device is a waste of resources and is not recommended.

There is an alternative. In AIX 4.2.1, the secondary dump device was fixed. If a valid secondary dump device exists and the primary dump device cannot be reached, the secondary dump device will accept the dump information intended for the primary dump device.

In AIX 4.1 and subsequent releases, the dump device and the paging device are installed as the same initial device, hd6. However, in rootvg mirroring the desired behavior is to have paging mirrored, but not the dump device. Therefore, the user should create a non-paging dump device and NOT have that dump device mirrored.


--------------------------------------------------------------------------------

Procedure
The following steps assume the user has rootvg contained on hdisk0 and is attempting to mirror the rootvg to a new disk: hdisk1.

Extend rootvg to hdisk1 by executing the following:
extendvg rootvg hdisk1
The user may encounter the following error message:
0516-050 Not enough descriptor space left in this volume group.
Either try adding a smaller PV or use another volume group.
In this case, the user may not add hdisk1 to rootvg for mirroring. The user may attempt to mirror rootvg's logical volumes to another disk that already exists in rootvg and meets the criteria and restrictions listed in the &quot;Restrictions&quot; section above. Or, the user may attempt to add a smaller disk to the rootvg. If neither option is possible, then mirroring rootvg cannot be performed on this system.
Disable QUORUM by executing the following:
chvg -Qn rootvg
Mirror the logical volumes that make up the AIX operating system by executing the following:
mklvcopy hd1 2 hdisk1 # /home file system
mklvcopy hd2 2 hdisk1 # /usr file system
mklvcopy hd3 2 hdisk1 # /tmp file system
mklvcopy hd4 2 hdisk1 # / (root) file system
mklvcopy hd5 2 hdisk1 # blv, boot logical volume
mklvcopy hd6 2 hdisk1 # paging space
This command should also be run against any user-created logical volumes in rootvg that you would like to have mirrored.

If users have other paging devices, rootvg and non-rootvg, it is recommended that they also mirror those logical volumes in addition to hd6. Refer to the section &quot;Paging and dump devices&quot;.
mklvcopy hd8 2 hdisk1 # file system log
mklvcopy hd9var 2 hdisk1 # /var file system
If hd5 consists of more than one logical partition, then, after mirroring hd5, the user must verify that the mirrored copy of hd5 resides on contiguous physical partitions. This can be verified with the following command:
lslv -m hd5
If the mirrored hd5 partitions are not contiguous, the user must delete the mirror copy of hd5 (on hdisk1) and rerun the mklvcopy command for hd5, using the -m option. The user should consult documentation on the usage of the -m option for the mklvcopy command.
Synchronize the newly created mirrors with the following command:
syncvg -v rootvg
Run bosboot to initialize all boot records and devices by executing the following command:
bosboot -a -d /dev/hdisk?
hdisk? is the first hdisk listed under the PV heading after the command lslv -l hd5 has executed.
Initialize the boot list by executing the following:
bootlist -m normal hdisk0 hdisk1
WARNING: Even though this command identifies the list of possible boot disks, it does not guarantee that the system will boot from the alternate disk in all cases involving failures of the first disk. In such situations, it may be necessary for the user to boot from the installation or maintenance media: select maintenance, reissue the bootlist command leaving out the failing disk, and then reboot. On some models, firmware provides a utility for selecting the boot device at boot time. This may also be used to force the system to boot from the alternate disk.
Shutdown and reboot the system by executing the following command:
shutdown -Fr
This is so that the Quorum OFF functionality takes effect.

--------------------------------------------------------------------------------

APAR Fixes
Description UP & MP APAR Level
-------------------------------------------------------------
mksysb fix ix56564 4.1
------
In 4.2.0 code 4.2
------
In 4.3.0 code 4.3
-------------------------------------------------------------
bosboot failure
ix61186 4.1
------
ix62417 4.2
------
In 4.3.0 code 4.3
-------------------------------------------------------------
dump device patch
not needed 4.1
------
ix68483 4.2
------
In 4.3.0 code 4.3
--------------------------------------------------------------
latest device driver mirroring fixes
ix60521 4.1
------
ix70884 4.2
------
In 4.3.0 code 4.3
---------------------------------------------------------------
latest mirrorvg/unmirrorvg fixes
not needed 4.1
------
ix72058 4.2
------
ix72550 4.3
---------------------------------------------------------------
You should also ensure the latest level of bos.rte.lvm is installed.

NOTE: The preceding fixes are packaged for the clvm prpq under the cumulative APAR IX58707, except for the bosboot APARs. The clvm prpq fileset ONLY exists on AIX 4.1 systems. To determine if you have the clvm prpq installed, execute the following:

lslpp -h prpq.clvm
--
| Mike Nixon
| Unix Admin
| ----------------------------
 
Hi all, thanks for all of your response. Currently the machine is running at 4.3.3 level. I just want to clarify.
Right now hdisk0 is mirrored to hdisk1. We want increase the size of filesystem /home but the problem we dont have available PPs. Is it possible just to extendvg the additonal disk (hdisk2)to the rootvg volume group? Is the hd5 (boot) will still be at the hdisk0 and hdisk1?

Sorry if i'm still gettting confused..

thanks..

 
If you have 2 PVs in rootvg (e.g. hdisk0 and hdisk1), which are mirrors of each other, and rootvg is full - i.e. hdisk0 full, hdisk1 full - and you have the benefit of two new disks to add (e.g. hdisk3 and hdisk4), then simply:

extendvg rootvg hdisk3 hdisk4

Nothing else is required. The boot logical volumes stay where they are. All existing data in hdisk0 and hdisk1 stays where it is. Any filesystems that are extended will use the new &quot;free&quot; space within rootvg (on the new disks).

And assuming you have added 2 disks, AIX will retain the mirroring characteristics of the extended logical volumes.

Make sense? Hope so. Hope this helps.
 

Midrange,
Just to clarify something: When you mirror a VG in AIX you actually don't mirror the VG but the individual LVs.

Hope that makes a bit sense.

Cheers Henrik Morsing
IBM Certified AIX 4.3 Systems Administration
 

I actually ment disks, not VG in that post :) Henrik Morsing
IBM Certified AIX 4.3 Systems Administration
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top