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!

breaking a mirror and backing up rootvg 1

Status
Not open for further replies.

canes

Instructor
Jan 27, 2000
23
US
I need to know the specifics on how to &quot;break&quot; a mirrored rootvg and then perform mksysb on the broken copy. This is needed in a 7/24 shop where they can't have user's &quot;get out&quot; of rootvg. Does anyone know?<br>
<p>Doug Tyre<br><a href=mailto:dtyre@miami.edu>dtyre@miami.edu</a><br><a href= Information Systems Institute (at UM)</a><br>
 
Use the splitlvcopy command:<br>
<br>
<b>splitlvcopy</b> [-f] [-y NewLogicalVolumeName] [-Y Prefix] <i>LogicalVolume Copies</i> [PhysicalVolume...]<br>
<br>
Attention: Although the splitlvcopy command can split logical volumes that are open, inlcuding logical volumes containing mounted filesystems, this isnot recommended. You may lose consistency between LogicalVolume and NewLogicalVolume if the logical volume is accessed by multiple processes simultaneously.<br>
<br>
Copies says how many partitions copies will remain in the original LogicalVolume.<br>
<br>
-f No confirmation<br>
-y Name for new logical volume<br>
-Y prefix for a system generated name<br>
<br>
Search for in the online help system for the details<br>
<br>
I hope it works
 
Both answer above are right on....splitlvcopy will work... and
the redbook is also a good piece of info....
Here are my two cents...

Split Mirroring or Online JFS Backup 4.3.3

Making an online backup of a mounted JFS file system. Usually three way
mirroring is suggested. That way the system is still mirrored while one copy is
split off, backed up and then reintegrated.

Making an online backup of a mounted JFS file system creates a
snapshot of the logical volume that contains the file system. Logical
volumes and its JFS log logical volume must be mirrored. File system activity
should be minimal (quiescing) while the split is taking place.
Recently, another use for mirroring has gained interest. Splitting mirrors, or
split mirroring, allowing multiple copies of data to be maintained and later
logically split apart and accessed independently. For example, the first copy
could continue to be used by production applications while the second copy
could be accessed by backup processes. Having three copies of a logical
volume allows the protection of two copies to be retained for production after
one copy has been split off.

One scenario using split mirroring to back up data on mirrored
volumes:
1) Production applications using the data to be backed up are quiesced to
ensure data is in a desirable state.
2) One copy is split off. This step completes quickly.
3) Production applications are resumed and can access the remaining copy.
4) A backup program is started to back up the split copy to tape.
5) When backup processing has completed, either the split copy is returned
to production and (re)-synchronized with production data.

Making an online backup on a mounted JFS file system creates a snapshot of
the logical volume that contains the file system. Note that the logical volume
that the file system resided on must be mirrored and the JFS log logical
volume for the file system must also be mirrored. Because the file writes are
asynchronous, the snapshot may not contain all data that was written
immediately before the snapshot is taken. Modifications that start, after the
snapshot begins may not be present in the backup copy. Therefore, it is
recommended that file system activity be minimal while the split is taking
place.

How to split off a mirrored copy of the file?
use chfs command with the splitcopy attribute.
#chfs -a splitcopy=/backup -a copy=3 /testfs
Use of the chfs command with the splitcopy attribute to split off a mirrored
copy of the filesystem will allow the user to control which copy is used as the
backup by using the copy attribute. The second copy is the default if a copy
is not specified by the user. Once the chfs command completes successfully,
a copy of the file system is available as read-only in /backup. Note that
additional changes made to the original filesystem after the copy is split off
are not reflected in the backup copy.

NOTE: You will get an error in your errpt -a that says that the logical volume
is out of sync. This is normal, After you complete your backup and the volume
is resyncd, remove the entry from the errpt and see if you continue to get the
messages.

Integrate a mirrored copy
To put it back simply remove the backup file system by using the rmfs
command
# umount /backup
# rmfs /backup
Once the backup has been made, the copy can be reintegrated as a mirrored
copy using the rmfs command...The rmfs command removes the files system
copy from its split off state and allows it to be reintegrated as a mirrored copy.

Example:
#lsvg -l testvg
testvg:
LV NAME TYPE LPS PPS PV LVSTATE MOUNT
loglv00 jfslog 1 3 3 open/syncd N/A
lv00 jfs 1 3 3 open/syncd /testfs

#chfs -a splitcopy=/backup -a copy-3 /testfs
lv00copy00
backup requested (0x100000)...
log redo processing for /dev/lv00copy00
syncpt record at 2028
end of log 2028
syncpt record at 2028
syncpt address 2029
number of log records = 1
number of do blocks = 0
number of nodo block = 0

After backup....
#lsvg -l testvg
LV NAME TYPE LPS PPS PVS LV STATE MOUNT
loglv00 jfslog 1 3 3 open/syncd N/A
loglv00 jfs 1 3 3 open/stale /testfs
lv00copy00 jfs 0 0 0 open?????? /backup
#
#umount /backup
#rmfs /backup
rmlv: Logical volume lv00copy00 is removed.

Remember that databases that require a timestamp, may not work
correctly if trying to restore data...........since the database is not really shut
down to accomplish this procedure.

NOTE:
When a copy of a files system is split off, some activity is made on the jfslog
in order to keep the structure of the original file system and the read-only
copy consistent. During such an operation, no splitting must be done on the
file system that uses the same jfslog. They must be delayed until the previous
split is finished.

Remember that splitting a mirrored copy of a file system means that
one copy is temporarily dedicated to backup activities and is not
available to provide data availability. It is recommended that you have three
mirrored copies of the file system so you can recover a disk problem before
the backup copy has been reintegrated on a file system.

A still unresolved problem is metadata on a jfs. Think of metadata as
controls for file actions and locations. Some of this data may exist in limbo
when the mirror is split off. The metadata has not been completely written to
the mirrored logical volume. Even if you do syncs, there is no guarantee that
some metadata didnit change between the time of the split. The only way to
guarantee that metadata is flushed to the disk and remains unchanged is to
close the file system. In order words, you must unmount the file system.
However, this is contrary to the need for online backup. Therefore IBM issues
a warning. &quot;Although the splitlvcopy command can split logical volumes that
are open, including logical volumes containing mounted file systems, this is
not recommended. You may lose consistency between LogicalVolume and
NewLogicalVolume if the logical volume is accessed by multiple processes
simultaneously. When splitting an open logical volume, you explicitly accept
the risk of potential data loss and data corruption associated with this action.
To avoid the potential corruption window, close logical volumes before
splitting, and unmount file systems before splitting. &quot;

The option for splitlvcopy was available in 4.2.1, but very few of the protections
were in effect. Even IBM says, using 4.3.3 for online backups still has
problems, but it is at least improved over the previous hacks that existed.

CAUTION....if you are running a database with redo logs you should be sure that the dates and times on the redo logs are the same..I have never done a split backup on Oracle to know if you have to shut the database down, then split the copy, then bring it back up on the working copy......you should talk with your DBA or be sure you can restore all files and get the database back up....The data may be a snapshot, but if you cannot get the database restarted after a restore, it is of little value....
Sysback (IBM sells) is software that has the split already built in and can be done by menu....
Good luck...
#-)
 
Although splitlvcopy will work in many cases, you can't use it for a full mksysb backup because it only works with filesystems, not raw logical volumes, and it requires that every filesystem split off simultaneously use a different JFS log. It also does not support JFS2 in AIX 5L.

Try Storix Backup Administrator for AIX instead. It does split-mirror backups transparently - splits either concurrently or sequentially, backs up, rejoins mirrors and resyncs automatically. It also works on both JFS and JFS2, mounted filesystems, etc.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top