Operating System - HP-UX
1830624 Members
2308 Online
110015 Solutions
New Discussion

Re: Splitt lvm mirror, to make a shadow image.

 
Tingli
Esteemed Contributor

Splitt lvm mirror, to make a shadow image.

Is it possible to split an lvm mirror and create a shadow image, such that the disk can produce a workable tape backup?
5 REPLIES 5
Pete Randall
Outstanding Contributor

Re: Splitt lvm mirror, to make a shadow image.

Have a look at the man pages for lvsplit and lvmerge.


Pete

Pete
Ivan Krastev
Honored Contributor

Re: Splitt lvm mirror, to make a shadow image.

If you want to make an exact disk copy use dd command. I have tried it before - clone a HP-UX disk on Linux system and everything was ok.

For a backup better solution is to use Ignite.


regards,
ivan
Torsten.
Acclaimed Contributor

Re: Splitt lvm mirror, to make a shadow image.

Could this be a solution for you:

http://h20293.www2.hp.com/portal/swdepot/displayProductInfo.do?productNumber=DynRootDisk

Dynamic Root Disk

Hope this helps!
Regards
Torsten.

__________________________________________________
There are only 10 types of people in the world -
those who understand binary, and those who don't.

__________________________________________________
No support by private messages. Please ask the forum!

If you feel this was helpful please click the KUDOS! thumb below!   
A. Clay Stephenson
Acclaimed Contributor

Re: Splitt lvm mirror, to make a shadow image.

A workable tape backup for what? For example if you lvsplit LVOL's that house a running database and dd those LVOL's to tape, you have an exact backup at the moment of the lvsplit. So it's a perfect copy. It's also almost perfectly useless because the database was not first shutdown or put in backup mode.
If it ain't broke, I can fix that.
skt_skt
Honored Contributor

Re: Splitt lvm mirror, to make a shadow image.

Just a useful tip â ¦. If we need to preserve a backup of a file system which is subject to a major change and a BCV option is not available, the following procedure can be followed. This uses LVM mirroring for the same.

Pre-requisites : MirrorDisk/UX software installed in the server.
Sufficient space in a different group of disks for mirroring.

=> Create a spare lv ( temporary one ) to fill up the existing free space of the VG.
=> Add adequate spare disks to the VG.
=> lvextend -m 1 /dev/vgname/lvname
=> lvdisplay -v /dev/vgname/lvname |grep -I stale
To make sure there is no stale LVs.
=> Make sure that there is no data modification happening
In case of a db file system halt the database.
=> lvsplit /dev/vgname/lvname
This will create two lvs as /dev/vgname/lvname and /dev/vgname/lvnameb

=> /dev/vgname/lvnameb can be used as a preserved backup LV.
Can be mounted if require.

=> If require to retrieve data

/usr/sbin/lvmerge dest_lv_path src_lv_path

eg:- to copy data from /dev/vgname/lvnameb back to /dev/vgname/lvname

/usr/sbin/lvmerge /dev/vgname/lvname /dev/vgname/lvnameb

This will result in a single LV /dev/vgname/lvnameb with the old data.

=> lvmerge can be used even if the lvs are not created by a previous lvsplit command also. But the lvs should be of the same size.

Please refer to man page of lvsplit and lvmerge before any such activity.