1833790 Members
2725 Online
110063 Solutions
New Discussion

Backup - Mirrored Drives

 
Howard Frazier
Occasional Contributor

Backup - Mirrored Drives

I am looking for a script that will:
-Break the mirrored drives set
-Backup and Verify
-Resync the mirrored drives

Several large files on our system are accessed for writing frequently and
therefore do not get backed up even after several attempts. By breaking the
mirror and then backing up the detached part of the set, I hope to resolve this
problem. I know that if the file is open for writing at the time the mirror is
broken, some records may be incompleted. Our application is tolerant of this
condition.

Thanks for any suggestions.
3 REPLIES 3
Jason Luginbuhl_1
Frequent Advisor

Re: Backup - Mirrored Drives

Howard,

I know of no such script published from HP, but perhaps another user of this
site will have something for you. If not, it should be easy enough to write
yourself. The commands involved would be:

1) lvsplit : to split the mirrored lvols
2) fbackup : to backup the data on the "broken mirrors"
3) frecover -N : to verify backup integrity.
4) lvmerge : to re-merge the split lvols

Consult the man pages for exact format of these commands.

NOTE: Be very careful with the lvmerge command. If specified in the incorrect
order, the stale data on the mirrored lvol will be written over the up to date
data on the active lvol.
Alan Riggs_1
Regular Advisor

Re: Backup - Mirrored Drives

To some extent this depends upon the backup utility that you are using. In its
simplest form:
lvsplit
"backup rb"
lvmerge b
will work, so long as your backup utility will handle a raw device. However,
while raw devices backup more quickly (In general -- varies with percentage of
volume being used by live data) they do not allow file specific recovery. Make
sure you can live with this.

Alternatively, you could create a secondary mount point and do:
lvsplit
mount b /mountpoint
"backup /mountpoint"
umount /mountpoint
lvmerge b
This will allow file secific recovery, though you will still need to exercise
care in specifying your recovery path, since the base mountpoint will be
different. (Or you can simply restore the files normally then copy them over
to the desired location.)

If we are talking about database files, you might also want to investigate a
hotbackup utility.
John Bean_3
New Member

Re: Backup - Mirrored Drives

If you are backing up a database, put the database in online backup mode before
breaking the mirrors and then return it to normal after the mirrors have been
broken. This will cause no interruptions to any users while ensuring all the
database files are in sync.