Operating System - HP-UX
1834038 Members
3021 Online
110063 Solutions
New Discussion

Re: Mirror split and fbackup

 
SOLVED
Go to solution
karis
Occasional Contributor

Mirror split and fbackup

Happy New In Advance!
I need to do a system backup of my production server while online. How do I go about split the mirror and doing a backup?

Thanks All!
IT resource and peers are here to give online F1 to you as you need it.
6 REPLIES 6
CHRIS_ANORUO
Honored Contributor

Re: Mirror split and fbackup

You can use SAM to split and merge logical volumes, or use lvsplit and lvmerge.
After splitting a logical volume that contains a filesystem using line command, you must do the following:
1) Perform a file system consistency check on the logical volume to be backed up using the fsck command.
2) Mount the file system.
3) Do your backup of the split copy.
4) Umount it.
5) Merge it back with the online copy.
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
karis
Occasional Contributor

Re: Mirror split and fbackup

Thanks Chris, and have a lovely New Year celebration! I think using SAM is better? Should I give SAM a try too?
IT resource and peers are here to give online F1 to you as you need it.
CHRIS_ANORUO
Honored Contributor
Solution

Re: Mirror split and fbackup

Hi Karis,

I am comfrtable with SAM, for you it will be a better/safer as it guides through the steps of splitting, it runs fsck on the filesystem and you can mount the filesystem through SAM(Disks and FileSystems)->File Systems.
Steps are:
1) Split the mirrored filesystem through Logical volumes (It runs fsck, when you answer yes, it then tells you to go to Filesystems sub area to mount the existing filesystem (i.e. the split filesystem copy e.g var.copy)
2) From Filesystems subarea, use Add local File System(mount pt /var1 and FS type as the original FS type e.g vxfs)
3) Do your backup and from line command, umount the copies.
4) From Filesystem subarea, highlight and remove the split copy.
5) From Logical Volumes subarea highlight /var and from Action menu merge offline copy.

Happy New Year In Advance!
When We Seek To Discover The Best In Others, We Somehow Bring Out The Best In Ourselves.
karis
Occasional Contributor

Re: Mirror split and fbackup

Thanks Chris, using SAM is the best.
You are a King!
Thanks, Have a beautiful new Year!
IT resource and peers are here to give online F1 to you as you need it.
Bruce Regittko_1
Esteemed Contributor

Re: Mirror split and fbackup

Hi,

I agree that SAM is probably best for you but if you ever use lvmerge, read the man page and then read it again. If you reverse the "original" and the split volumes in the command, you will lose any changes in the original that have occurred since the mirror was split off. That really seems to annoy the users :).

--Bruce
www.stratech.com/training
Bill Hassell
Honored Contributor

Re: Mirror split and fbackup

Missing from these steps:

- before you split the mirror, quiesce the processes if possible (ie, put the database or apps in a read-only mode or simply stop them). Then run the sync command 4 times as in:

sync;sync;sync;sync

This effectively flushes all unwritten data to the disks (and make fsck much happier).

- After splitting the volume(s), you can reenable or restart your applications. Then run fsck on all of the split-off volumes. Remember, they were taken out of serevice on a live system so they were mot (and cannot be) unmounted properly. For HFS, this will take a while based on the size of the volumes. For vxfs, it is very quick.

- Now you can mount the split volumes to temporary mount points and backup.


Bill Hassell, sysadmin