Operating System - HP-UX
1834169 Members
2776 Online
110064 Solutions
New Discussion

Re: lost /var because boot disk bad

 
SOLVED
Go to solution
Marc Ahrendt
Super Advisor

lost /var because boot disk bad

the system has only 1 boot disk and 2 external disks for Informix volume groups. what do i need to do in order to replace the boot disk?
are there any tricks with LVM?

i will take out the bad 2GB disk and replace it with 2 2GB disks (so that i can mirror the boot disk later)
i have all the data backed up in Legato, and sadly have no Ignite image of this system.
hola
13 REPLIES 13
harry d brown jr
Honored Contributor

Re: lost /var because boot disk bad

First, be very careful not to build over your informix vg's. Exportvg the vg's. Save/print some files like /etc/hosts, network files, and /etc/fstab.
Live Free or Die
Marc Ahrendt
Super Advisor

Re: lost /var because boot disk bad

harry: thx, that is exactly my concern

i can actually still boot off the bad disk. the bad disk sectors/whatever are where /var PEs are, and thus /var does not mount. i can still run LVM commands with the bad boot disk. what are the LVM commands that i should run to get needed information? i can then ftp these files/information off the system before replacing the drive.
hola
harry d brown jr
Honored Contributor

Re: lost /var because boot disk bad

/usr/sbin/vgexport -m /tmp/vg01_mapfile -v vg01

then do one for any other vg's you might have - other than vg00

You can't boot from a legato backup, so you will need some other boot media. Have you enough space to create a dummy /var on your existing disks? If so, then do so, and install ignite, then create a make_recovery tape.
Live Free or Die
James R. Ferguson
Acclaimed Contributor

Re: lost /var because boot disk bad

Hi Marc:

If you don't have an Ignite recovery tape and your boot disk is already in shambles, my is:
does your vg00 span more than one physical disk, and if so, what filesystems span the disk you will be replacing? You may be looking at cold installing.

Regards!

...JRF...
Marc Ahrendt
Super Advisor

Re: lost /var because boot disk bad

james/harry: thx for the quick responses, will give points later

here are the details:
only 1 internal 2GB disk (only PV in vg00)
disk is bad but can still boot it at times
right now system is booted
2 extrenal 9GB disks (both PVs in vg01)
disks are good and have Informix LVs
got a good backup (Legato) but no Ignite image
75MB free in /opt if needed to load Ignite
(afraid to do so since the disk is unstable)

here is what i want to do:
preserve vg01
vgexport?
replace boot disk
will put in 2 ...mirror LVs to 2nd later
rebuild vg00
cold install and Legato
vgimport of vg01?


hola
James R. Ferguson
Acclaimed Contributor

Re: lost /var because boot disk bad

Hi Marc:

OK. Since you seem to have the opportunity to cold install go that route. You can 'vgexport' your non-vg00 volume(s) and 'vgimport' them afterwards.

# vgexport -m -s -v /tmp/vg01.mapfile /dev/vg01

...and after the cold install...

# mkdir /dev/vg01
# mknod /dev/vg01/group c 64 0x010000
# vgimport -m -s /tmp/vg01.mapfile vg01
# vgchange -a y vg01
# vgcfgbackup vg01

You have a good backup, so you have your configuration files available to reconstruct or reload.

Take this opportunity to load Ignite and make an Ignite recovery tape once you've completed the cold-install!

You can look upon this too, as an opportunity to resize your vg00 filesystems and to get a freshly patched server!

Regards!

...JRF...
Sridhar Bhaskarla
Honored Contributor

Re: lost /var because boot disk bad

Marc,

If you just lost /var, I don't think it would be problem. If you have /var backed up earlier, restore it on another system in some other file system, take a tar of it and untar it on this system in /var and reboot. It should work fine. Once your /var is restored, you can create your make_recovery tape and then do the shuffling.

-Sri

You may be disappointed if you fail, but you are doomed if you don't try
Marc Ahrendt
Super Advisor

Re: lost /var because boot disk bad

james/sridhar: thx for the quick responses, will give points later

so which option do you recommend? A or B
NOTE: vg00 has special software for our environment, and do not want to lose vg01

A: cold install, install Legato client, recover from Legato server, add mirror PV and Ignite (make recovery tape for future)
B: make /var just a subdirectory, recover /var files, add 2nd PV and pvmove all LVs to it, recreate LV for /var on 2nd disk, remove bad 1st PV and replace it, lvextend back to this replacement, add Ignite for future use

any suggestions for the correct make_recovery command syntax for this situation (this system has a local DAT drive at /dev/rmt/0m)?

hola
A. Clay Stephenson
Acclaimed Contributor
Solution

Re: lost /var because boot disk bad

Hi Marc:

While 'B' is quicker I actually prefer 'A' with a few wrinkles. I would unmount the non-vg00 filesystems, and vgchange -a n the non-vg00 vg's. I assume at this point that you have hardcopies of bdf, /etc/fstab, /etc/services, lvdisplays, vgdisplays, etc.

I would then shutdown and remove all the disks so that you can't hurt anything and install you new disks for vg00. Do a cold install along with applications, latest HWCR patches, and General Release patches. Then re-install the non-vg00 disks and vgimport your non-vg00 stuff.

The advantage of this method is that while it is not the fastest method it is the safest and you can easily revert to the old by replacing the vg00 disk.

Clay
If it ain't broke, I can fix that.
James R. Ferguson
Acclaimed Contributor

Re: lost /var because boot disk bad

Hi Marc:

My preference is the cold install. The outcome is guaranteed to work, and as I indicated, you have the "opportunity" to resize your filesystems according to your needs.

To create a make_recovery_tape for vg00, do the following:

# make_tape_recovery -x inc_entire=vg00 -I -v -a /dev/rmt/0mn

This process also creates 'vgexport' mapfiles automatically for *all* volume groups in the event that you ever need/want to use the tape so created to recreate your vg00. The "-I' option means that when you boot from the recovery tape, you will be in (I)nteractive mode with Ignite, thereby allowing you to resize filessystems, etc.

Be sure to download the latest Ignite software and documentation from here:

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

Regards!

...JRF...
Marc Ahrendt
Super Advisor

Re: lost /var because boot disk bad

Clay/James: thx for your input ...i also called HP and they suggest your approaches as well!
hola
Sridhar Bhaskarla
Honored Contributor

Re: lost /var because boot disk bad

You can do B anytime and have your production going. Once you have a stable system, then you can schedule a downtime, then go for A and make it clean by re-arranging the stuff. It's important to get the system back into the production first.

-Sri
You may be disappointed if you fail, but you are doomed if you don't try
MIGUEL CARABANO
Contributor

Re: lost /var because boot disk bad

The problem this resolute one. The hard disk this bad one. Replacement the disc and I form volume again group