Operating System - HP-UX
1833883 Members
1746 Online
110063 Solutions
New Discussion

Replacing a failing root disks

 
Anthony_93
New Member

Replacing a failing root disks

Could someone please help.. this is my situation. I have a root disks in vg00 with the following filesystems:

/
/stand
/var
/usr
/opt
/home/tmp

The disk is getting some disks errors during a patch install that requires to re-build the kernel. A new 4.3gb has been installed into the system and would like to know who I should configure this new disks to replace the existing root disks. I wanted to create another volume group ie. vg01 and build the new disk as a root disk. Then export and import the data from the old to the new. Remove the old disks. Any help on the procedures would be appreciated. thxs..
5 REPLIES 5
Leif Halvarsson_2
Honored Contributor

Re: Replacing a failing root disks

Hi,
Check the man page for lvlnboot. There you fing a step by step description how to create a bootable LVM disk.
Pete Randall
Outstanding Contributor

Re: Replacing a failing root disks

You could also use Ignite to create a make_tape_recovery backup tape, which you could then use to restore your existing system onto the new drive. Ignite is available here:

http://www.software.hp.com/products/IUX/index.html


Pete

Pete
RAC_1
Honored Contributor

Re: Replacing a failing root disks

If your boot disk has problems, you will have problems creating a mirror of root disk. Do you have a ignite_recoverytape prepared for this server?

You can try creating a mirror of root disk. (You need to have mirror disk software installed.) IF that does not work you can try to create a static copy of root disk and boot through it. If it succeeds, you can try getting your data from old disk.
There is no substitute to HARDWORK
Steven E. Protter
Exalted Contributor

Re: Replacing a failing root disks

If it still works:

make_tape_recovery

shut system.

switch the disk

boot off the tape

interupt boot at console 10 second prompt

sea

bo p2 if the sequential or tape device is p2

N Don't interact

Your system will load.

If you have an extra drive slot you can use mirror/ux

lvextend -m 1 /dev/vg00/rlvol3 /dev/dsk/c#t#d#

All database apps must be shut during make_tape_recovery if you intend to migrate them this way.

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
Sundar_7
Honored Contributor

Re: Replacing a failing root disks

OK, let us try something new (atleast for me) and see if that works :-)

1) Attach the new disk

2)

# pvcreate -B /dev/rdsk/c0t1d0

# mkboot -a "hpux" /dev/dsk/c0t1d0

# mknod /dev/vgroot c 64 0x010000

# vgcreate /dev/vgroot /dev/dsk/c0t1d0

# lvcreate -L 150 -r n -C y /dev/vgroot # Stand volume

# lvcreate -L 1024 -r n -C y /dev/vgroot # Swap

# lvcreate -L 500 -r n -C y /dev/vgroot #

- Create other logical volumes

# newfs -F hfs /dev/vgroot/lvol1

# newfs -F vxfs /dev/vgroot/lvol3

- Create other file systems

# /usr/sbin/shutdown -r -y 0

Interrupt in ISL and boot in maint mode

ISL> hpux -lm

# vgchange -a y /dev/vg00

# vgchange -a y /dev/vgroot

# mount -a

- Mount the /dev/vgroot/lvols in a temp
directory and copy the contents over

# lvrmboot -r /dev/vg00/lvol3 /dev/vg00
# lvrmboot -s /dev/vg00/lvol2 /dev/vg00
# lvrmboot -d /dev/vg00/lvol2 /dev/vg00
# lvrmboot -b /dev/vg00/lvol1 /dev/vg00

# lvlnboot -r /dev/vgroot/lvol3 /dev/vgroot
# lvlnboot -s /dev/vgroot/lvol2 /dev/vgroot
# lvlnboot -d /dev/vgroot/lvol2 /dev/vgroot
# lvlnboot -b /dev/vgroot/lvol1 /dev/vgroot

# lvlnboot -R

# vgchange -a n /dev/vg00

# vgchange -a n /dev/vgroot

# edit /etc/fstab

# reboot

interrupt BCH and boot using the new disk

BCH> bo newdisk

-- Tell me is this works.

I havent really tried this anytime. So this is just my guess work..

Sundar.
Learn What to do ,How to do and more importantly When to do ?