Operating System - HP-UX
1753884 Members
7736 Online
108809 Solutions
New Discussion юеВ

Re: mount a mirror disk in a new installed enviroment

 
SOLVED
Go to solution
diego delgado
Advisor

mount a mirror disk in a new installed enviroment

hi all,
a technician installed a new hp os on a server and fortunately not did it in the mirror copy because i need the old data.
now i got in a disk a new hp os and in the other disk the old enviroment and os and data..
how can i mount the old disk and enviroment on the new for restore data ?

p.s= i can't boot the system from the other disk

thanks in advance

diego
15 REPLIES 15
Pete Randall
Outstanding Contributor

Re: mount a mirror disk in a new installed enviroment

vgimport it and then mount the lvols you need.


Pete

Pete
Robert-Jan Goossens
Honored Contributor

Re: mount a mirror disk in a new installed enviroment

sujit kumar singh
Honored Contributor
Solution

Re: mount a mirror disk in a new installed enviroment

hi say for example the New OS Disk si /dev/dsk/c0t0d0 from which the OS has now booted and the OLD OS Disk is /dev/dsk/c0t1d0.


from the new booted OS do the following
#ioscan -fnCdisk
#insf
#mkdir /dev/oldroot
#mknod /dev/oldroot/group c 64 0x110000
#vgimport -v /dev/oldroot /dev/dsk/c0t1d0
#vgchange -a y -q n /dev/oldroot
#vgcfgbackup /dev/oldroot
#vgdisplay -v /dev/oldroot

you shall be able to see all the LVs of that VG

now make the directories to mount the LVs of that VG(oldroot)
#mkdir /oldroot

#mkdir /oldroot/test1
you can mount the LV in here

#fsck /dev/oldroot/lvol1
#cd /
#mount /dev/oldroot/lvol1 /oldroot/test1

and so on.


i understood that you want to wish the LVs of the other disk which had the OLD OS to be mounted.

Please correct me if i am wrong in assuming.

regards
sujit

diego delgado
Advisor

Re: mount a mirror disk in a new installed enviroment

thanks to all
but when i'll do vgimport can i see the original LV ?
sujit kumar singh
Honored Contributor

Re: mount a mirror disk in a new installed enviroment

Yes Sir,

if you had earlier made the LVs with the non-default LV names that is you had not the LVs as named as lvol1, lvol2, lvol3 and all , all you need to do the vgimport with a previusly created map file if you have a copy of that with you now.


the mapfiles get created for a VG using the -m option of the vgexport.
this mapfile is used at the time of amking the vgimport of that VG.

The vgimport with a valid map file for that VG shall help you get the LVs after the vgimport on the original name.

regards
sujit
Ganesan R
Honored Contributor

Re: mount a mirror disk in a new installed enviroment

Hi,

Unfortunately the answer is no. It will import with default lvnames like lvol1, lvol2...unless you have map file.

But you can change the lvol names once you imported. But that doesn't going help much.
Best wishes,

Ganesh.
Pete Randall
Outstanding Contributor

Re: mount a mirror disk in a new installed enviroment

> but when i'll do vgimport can i see the original LV ?

If you mount them, yes. Run your vgimport and call it vg01, then mount the logical volumes:

mount /dev/vg01/lvol3 /oldroot
mount /dev/vg01/lvol1 /oldstand

and so on. You can then look at /oldroot or /oldvar or /oldopt or whatever you need.


Pete

Pete
diego delgado
Advisor

Re: mount a mirror disk in a new installed enviroment

very very thanks sujit,
but i have not the mapfile ..
how i can do ?
sujit kumar singh
Honored Contributor

Re: mount a mirror disk in a new installed enviroment

Hi


If you do not have the copy of the map file, a helping way might be to boot the system using the Old disk and do a vgexport of the vg00 in preview mode to create the map file.


1) boot the system using the old disk and once system is booted.
2)
#vgexport -p -v -s -m /tmp/vg00.map /dev/vg00

ftp this map file /tmp/vg00.map to your laptop/PC in Binary mode.


3) boot the system with the new disk and when the system boots do
FTP upload the file from your laptop/PC to the server in say /tmp dirctory in the binary mode.


#ioscan
#insf
#mkdir /dev/oldroot
#mknod /dev/oldroot/group c 64 0xYY0000
make sure that minor no 0xYY0000 is unique on the system.
#vgimport -v -s -m /tmp/vg00.map /dev/oldroot
#vgchange -a y -q n /dev/oldroot
#vgcfgbackup /dev/oldroot


regards
sujit