Operating System - HP-UX
1832314 Members
2255 Online
110041 Solutions
New Discussion

moving root disk to new address

 
SOLVED
Go to solution
Curtis Larson_2
Advisor

moving root disk to new address

i've attached some old discs to attach to my workstation. one of these disks has an os installed. Ive imported the disc and can see it has all the lvols needed and is version 11.0.

now the original root (root1) is on /dev/dsk/c0t6d0. the imported, 2nd root (root2)is on /dev/dsk/c1t6d0.

i've changed all the lvlnboot parms to reflect the new location of the discs. and the kernel loads, well sort of. root2 cant find it's file systems.

root2 was installed at c0t6d0 before i got the disc. So, all the device files (/dev/dsk, /dev/rdsk) point to devices on c0 and now the disk is actually on c1.

and root2's vg information also points to wrong devices.
lvmtab: vg00, c0t6d0
and the same for lvmconf/vg00

so is there a way to modify this info such that I'm able to boot root2.

So is there a way to
7 REPLIES 7
Dietmar Konermann
Honored Contributor
Solution

Re: moving root disk to new address

Hi, Curtis!

You should boot the root2 disk using the LVM maintenance mode (hpux -lm).

From there export the root2's root VG and import it again. The following assumes that the disk is on c1t6d0.

# vgexport -m /tmp/vg00.map vg00
# mkdir /dev/vg00
# mknod /dev/vg00/group c 64 0
# vgimport -m /tmp/vg00.map vg00 /dev/c1t6d0

Now try to activate the VG... if it works, perform vgcfgbackup and check the label using lvlnboot. Reboot finally. :)

Good luck...
Dietmar.
"Logic is the beginning of wisdom; not the end." -- Spock (Star Trek VI: The Undiscovered Country)
James R. Ferguson
Acclaimed Contributor

Re: moving root disk to new address

Hi Curtis:

See the procedure in the section entitled "Changing the HW Address of a Disk" in chapter 16 (LVM) of the "HP-UX Software Recovery Handbook":

http://www2.itrc.hp.com/service/iv/docDisplay.do?docId=/DE_SW_UX_swrec_EN_01_E/LVM.pdf

Regards!

...JRF...
Curtis Larson_2
Advisor

Re: moving root disk to new address

Dietmar:

when root2 boots it only has c0 disc devices. doing a insf -e creates c2 and c3 disc device files. I would like for the device files to start with c1. How would I create them to be that way?

James:
unfortunately, I don't have access to the knowledge base.
S.K. Chan
Honored Contributor

Re: moving root disk to new address

This should take you straight to the Recovery Handbook ..
http://us-support3.external.hp.com/iv/data/documents/DE_SW_UX_swrec_EN_01_E/Introduction.pdf
.. goto page 5, click on "chap 16 - LVM". Once you're there, goto pg 23.
KapilRaj
Honored Contributor

Re: moving root disk to new address

If possible remove the root disk which is working .....

-- Boot through the root2 disk
-- hpux -lm # Enter the LVM maintanance mode
-- vgexport vg00
-- mkdir /dev/vg00
-- mknod /dev/vg00/group c 64 0x000000
-- vgimport /dev/vg00 /dev/dsk/cXtXd0
-- vgchange -a y /dev/vg00
-- Try to mount all the filsystems
-- Perform fsck wherever needed
-- lvlnboot -v
-- If any errors fix it by lvlnboot
-- reboot -r

All the best

kaps
Nothing is impossible
Curtis Larson_2
Advisor

Re: moving root disk to new address

Thanks for everyones responses. Unfortunately, I'm not able to test them at the moment. my root2 has a mirror and one of the disc's isn't responding. just one more thing i'll have to work through. But, from the consistancy of the responses from such experienced people, I have no doubt it will work

thanks again
vinodan
Advisor

Re: moving root disk to new address

Hi

You can try this .I too have faced the sama scenario.

# ISL >hpux -lm

Now it will boot and gives you prompt.Now follow the following commands

# mv /etc/lvmtab /etc/lvmtab.org
#vgimport /dev/vg00 /dev/dsk/c1t6d0
now the lvmtab will be modified
===================================
#strings /etc/lvmtab

/dev/vg00
/dev/dsk/c1t6d0

followin commands installs boot programs in specified disk

# mkboot -l /dev/dsk/c1t6d0

#mkboot -a "hpux(;0)/stand/vmunix" /dev/dsk/c1t6d0

gives back prompt with no errors provided there is no other obstackles.............

SEE THE LIF information

#lifls -l /dev/dsk/c1t6d0

Refer the following output for example....

volume ISL10 data size 7984 directory size 8 96/05/28 03:45:19
filename type start size implement created
================================================================
ISL -12800 584 240 0 96/05/28 04:10:13
AUTO -12289 824 1 0 96/05/28 04:10:13
HPUX -12928 832 848 0 96/05/28 04:10:13
PAD -12290 1680 1652 0 96/05/28 04:10:14
LABEL BIN 3336 8 0 96/06/10 07:58:10
================================================================
#vgchange -a y /dev/vg00
now the vg00 is activated....

We have to prepare th elogical volumes in the disk as root,boot,swap,dump.

#lvlnboot -b /dev/vg00/lvol1 ===== > for boot partition
#lvlnboot -r /dev/vg00/lvol3 ===== > for root partition
#lvlnboot -s /dev/vg00/lvol2 ===== > for swap partition
#lvlnboot -d /dev/vg00/lvol2 ===== > for dump partition


Now we can see its status as almost as followos .....
#lvlnboot -v /dev/vg00

==========================================================
= Boot Definitions for Volume Group /dev/vg00: =
= Physical Volumes belonging in Root Volume Group: =
= /dev/dsk/c1t6d0 (56/52.6.0) -- Boot Disk =
= Boot: lvol1 on: /dev/dsk/c1t6d0 =
= Root: lvol3 on: /dev/dsk/c1t6d0 =
= Swap: lvol2 on: /dev/dsk/c1t6d0 =
= Dump: lvol2 on: /dev/dsk/c1t6d0, 0 =
==========================================================

perhaps you may have to do fsck in all file systems do it .........

reboot the system and now it is ready for booting in single user mode

in next booting boot it in singlr user mode

ISL > hpux -is


confirm whether our mission has been sucessfully finished or not .....


vinod