Operating System - HP-UX
1845222 Members
2775 Online
110243 Solutions
New Discussion

Unmounting mirrors for restore later

 
SOLVED
Go to solution
Mike Duffy
Frequent Advisor

Unmounting mirrors for restore later

Good morning,

This could be a tricky one.
We are in the process of planning a OVO upgrade and I would like some protection against it all going wrong!
I have the whole of OVO on one volume group (vgopc)which contains two physical disks (main and mirror).
I would like to split the disks leaving the mirror volume safe from the upgrade. Is there a away of mounting the mirror somewhere else and using it to restore from in the unlikely event of a problem?

6 REPLIES 6
Sunil Sharma_1
Honored Contributor
Solution

Re: Unmounting mirrors for restore later

Hi,

Yes it is very much possible but it has to be done logical volume level not on Disk level.

You can split volumes using lvsplit command and then you can mount bot volumes seperately.


Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Rajeev  Shukla
Honored Contributor

Re: Unmounting mirrors for restore later

yes you can split the mirrors and mount it at different mount points, have a look at the man pages of lvsplit command, you can give a suffix which will be followed in the split lv name and then you can mount them to another directory.
Sunil Sharma_1
Honored Contributor

Re: Unmounting mirrors for restore later

just one more line

One more addition you can merge these voulmes again using lvmerge command.

Sunil
*** Dream as if you'll live forever. Live as if you'll die today ***
Rajeev  Shukla
Honored Contributor

Re: Unmounting mirrors for restore later

But be carefull with the merging of mirrors back because merging happens from primary to secondary only, say you split and then make changes on primary and then feel you need to revert back and then merge the mirrors then the primary is mergerd so the changes u made on primary are also reflected on secondary.
Mike Duffy
Frequent Advisor

Re: Unmounting mirrors for restore later

Thanks for the quick and informative responses. I will check out the man pages and come back eith any more questions.
Todd McDaniel_1
Honored Contributor

Re: Unmounting mirrors for restore later

I might suggest doing a vgexport -p -s options to save your VG information. BOTH before and after the lvsplit make sure to change the name of the mapfiles on the second vgexport.

vgexport -p -s -m /path/to/mapfile.1 /dev/vgXX
lvsplit ... ... ... ## one for each LVol in vgXX
lvsplit ... ... ...
vgexport -p -s -m /path/to/mapfile.2 /dev/vgXX

Also, after you lvsplit and remove the -m 0, You might consider reducing out those disks. I believe you can then recreate the Lvols with only the m1 mirror disks.

This will then be a workaround for hte problem of having the m0 overwrite the m1 disk upon a resync of the mirrors.

I have not used this method before, but it seems to be sound logic. As long as the disks are still defined in the lvmtab, I see no problems.
Unix, the other white meat.