HPE Community read-only access December 15, 2018
This is a maintenance upgrade. You will be able to read articles and posts, but not post or reply.
Hours:
Dec 15, 4:00 am to 10:00 am UTC
Dec 14, 10:00 pm CST to Dec 15, 4:00 am CST
Dec 14, 8:00 pm PST to Dec 15, 2:00 am PST
System Administration
cancel
Showing results for 
Search instead for 
Did you mean: 

mount a mirror disk in a new installed enviroment

 
SOLVED
Go to solution

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
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

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

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

Re: mount a mirror disk in a new installed enviroment

wonderful..
guys very very thanks to all
i'll close the thread ..
sujit kumar singh
Honored Contributor

Re: mount a mirror disk in a new installed enviroment

Hi Diego,


Sorry but seems that you perhaps forgot to assign the points.

anyway you can reopen the thread by clicking on the "reopen thread>>" to assign the points and then close the same.

assigning points might help you get better responses.


please have a look at the following thread

http://forums1.itrc.hp.com/service/forums/helptips.do?#33


regards
Sujit
Pete Randall
Outstanding Contributor

Re: mount a mirror disk in a new installed enviroment

Since it's a vg00 boot disk, the lvols will more than likely follow standard naming conventions, making a map file unnecessary.


Pete

Pete

Re: mount a mirror disk in a new installed enviroment

QUOTE ="
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/c1t15d0
#vgchange -a y -q n /dev/oldroot
#vgcfgbackup /dev/oldroot
#vgdisplay -v /dev/oldroot"

but when i tried to do
vgimport -v /dev/oldroot /dev/dsk/c1t15d0

i received vgimport -v /dev/oldroot /dev/dsk/c1t15d0
Beginning the import process on Volume Group "/dev/oldroot".
vgimport: Cannot open the control file "/dev/oldroot/group":
No such device


can someone help me ?

thanks a lot
sujit kumar singh
Honored Contributor

Re: mount a mirror disk in a new installed enviroment

Hi , try with some other major no of the group file in /dev/oldroot.

then vgimport

regards
sujit
Steven E. Protter
Exalted Contributor

Re: mount a mirror disk in a new installed enviroment

Shalom,

My take on this:
http://www.hpux.ws/?p=21

You need to test boot after this is done.

SEP
Steven E Protter
Owner of ISN Corporation
http://isnamerica.com
http://hpuxconsulting.com
Sponsor: http://hpux.ws
Twitter: http://twitter.com/hpuxlinux
Founder http://newdatacloud.com