1836455 Members
2724 Online
110101 Solutions
New Discussion

Internal drive failure

 
Tim Medford
Valued Contributor

Internal drive failure

Hi all.

Our production server has a bad internal drive in it. Running HPUX 11.0, hardware is an L3000.

The drive is one of two internal drives, and luckily not the primary boot disk. It is identified as an alternate drive though.

I am NOT running Mirror/UX, however I do have the drive configured as a boot disk. I manually keep it in sync with the primary root drive every month or so. I also have a good Ignite-UX recovery tape ready to go.

Is there anything special I should do before the HP tech swaps the drive? I'm assuming I will need to rebuild the drive from the ground up, but I was more concerned about the LVM information being corrupted.

It seems I would want to remove all the logical volumes and the volume group first, but I cannot communicate with the drive right now.

Thanks in advance for any advice.

Tim
8 REPLIES 8
A. Clay Stephenson
Acclaimed Contributor

Re: Internal drive failure

Actually, the vgcfgrestore command should take care of all the LVM stuff for you. This does assume that a vgcfgbackup was done. By default, most of the LVM commands do a vgcfgbackup automatically. Man vgcfgrestore for details. NOTE: This will only restore the LVM stuff; the actual data (e.g. filesystems) is up to you.
If it ain't broke, I can fix that.
PIYUSH D. PATEL
Honored Contributor

Re: Internal drive failure

Hi,

Was your failed drive configured in VG00 ???

If your drive has failed then you cannot modify the vg paramaters in it.

When u get a new drive, I recommend that you should do a mirroring of the new drive ( root mirror )
You can do a vgcfgrestore for restoring the vg info on the new drive.

#vgcfgrestore /dev/vg00 /dev/dsk/c1t1d0 ( new disk)

Piyush
Sanjay_6
Honored Contributor

Re: Internal drive failure

Hi Tim,

If you don't have Mirror/UX on this system, how are you syncing the alternate disk with the primary root. Are you using dd. IF so, there is no problem, just get the drive repalced and then again do a dd. There is no question of any vgremove or anything in this sort of situation.

I think the situation would be more clear if you can tell us, how you are syncing the disk in the absence of mirror/ux.

Hope this helps.

regds
Tim Medford
Valued Contributor

Re: Internal drive failure

Thanks for the information guys. I followed directions from an HP instructor for manually mirroring the drive.

I created the boot disk using all the standard commands, pvcreate, vgcreate, lvcreate mkboot, lifcp, etc.... I then copied the root data over in this manner:

cd /stand
find . -xdev -depth -print | cpio -pdxm /newroot/stand

Repeated this for all root LVs. Once a month a cron job runs which synchronizes the data using a find/cpio.
Sandip Ghosh
Honored Contributor

Re: Internal drive failure

Instead of doing cpio you can go for rdist for distributing the data.

Sandip
Good Luck!!!
Sanjay_6
Honored Contributor

Re: Internal drive failure

Hi Tim,

If you have created another vg for this other disk, once you have done the pvcreate -B and vgcfgrestore for the disk, do lvlnboot for the boot/swap/root/dump volumes for this vg's lv.

then mount the LV's to the directories where they get mounted and then do a copy like you do on a monthly basis.

Hope this helps.

Regds
Tim Medford
Valued Contributor

Re: Internal drive failure

Thanks again for all the advice.

The new drive is now installed. When I try to do a pvcreate -B to initialize it I get a message "pvcreate: The physical volume "/dev/dsk/c2t2d0" is already recorded in the "/etc/lvmtab" file."

Can I simply start with the vgcfgrestore or do I need to use pvcreate -B to make it a bootable disk first?

I have all the LVM info printed on hard copy. It might be safer and easier just to vgexport the /dev/vgroot volume and start over?

Just bouncing some ideas off you. Thanks again.
Michael Tully
Honored Contributor

Re: Internal drive failure

Hi,

Try running the 'vgcfgrestore' first before attempting to make the disk bootable. I think this will explain why the message was appearing.

# vgcfgrestore -n /dev/yourvg /dev/dsk/cxtydz

To create the first part of the root disk.
Replace the hardware address and device as necessary
in the mkboot command.

# pvcreate -Bf /dev/rdsk/c2t6d0
# mkboot /dev/rdsk/c2t6d0
# mkboot -a "hpux -lq (0/0/2/1.6.0;0)/stand/vmunix" /dev/dsk/c2t6d0

Then do your 'cpio' I think that should
do it....

HTH
~Michael~
Anyone for a Mutiny ?