1833230 Members
2720 Online
110051 Solutions
New Discussion

Re: lost /opt

 
SOLVED
Go to solution
Rushank
Super Advisor

lost /opt

I lost /opt while running lvreduce.
Is it possible to restore /opt directory from the make_recovery tape..? If yes How..?

OS :HP_UX 11.00

17 REPLIES 17
Helen French
Honored Contributor

Re: lost /opt

Hi Rushank:

Yes ! /opt is part of the vg00 and if you have used the -A option while using the make_recovery, then you can restore the full vg00. Boot the system, interrupt it and specify boot path of the tape drive. It will recreate the vg00.

HTH,
Shiju
Life is a promise, fulfill it!
harry d brown jr
Honored Contributor

Re: lost /opt

You can restore /opt like Shiju said, providing you used the -A option to create the backup. Before rebooting do this:

mt -t /dev/rmt/0mn fsf 1
tar -tvf /dev/rmt/0mn

and see if many files show up under /opt, if they do, then you can restore /opt:

mt -t /dev/rmt/0mn fsf 1
tar -xvf /dev/rmt/0mn /opt

then shutdown and reboot.


live free or die
harry
Live Free or Die
S.K. Chan
Honored Contributor
Solution

Re: lost /opt

Or you can just recover /opt .. this is from Technical DB ..

Quote

The make_recovery creates a lif area and a tar archive on each tape; this tar archive does not include the leading / of the files and directories. To recover individual files fast forward past the lif area and then use tar to extract what you want as in the following example:
# cd /
# mt -f /dev/rmt/0mn fsf 1
==> Use norewind device file with mt so that tar will start just after the lif area
# tar xvf /dev/rmt/0m opt
==> Don't use leading / .

Unquote

pap
Respected Contributor

Re: lost /opt

Hi Rushank,

If you have full backup of vg00 file systems, you can restore it from backup.
Through make_recovery also you can restore the /opt file system provided as shiju suggeste you used -A option (if you are running make_recovery) OR -x inc_)entire=vg00 option in case of make_tape_recovery.

I will suggest before doing so, please take a full back of vg00. This is to be on safer side in case your ignite tape will not work properly.

-pap
"Winners don't do different things , they do things differently"
Rushank
Super Advisor

Re: lost /opt


I tried booting from tape drive but every it selects my alt boot disk instead tape drive.

I Tried BO AL 0/0/1/0.1 (which is path for Tape drive) ( I got this from sea )


pap
Respected Contributor

Re: lost /opt

Hi Rushank,

Try to use P1 P2 ....option while booting from tape.
I mean use

BOOT_ADMIN>bo Px where x is the number of your tape drive ( P1. P2 ....etc....)

-pap
"Winners don't do different things , they do things differently"
harry d brown jr
Honored Contributor

Re: lost /opt

Rushank,

SK Chan has the syntax correct, follow it and save yourself some time. But after the restore, you should reboot.

live free or die
harry
Live Free or Die
Helen French
Honored Contributor

Re: lost /opt

Hi Rushank:

Do this:
1) Interrupt the boot process
2) Give "search" command
3) find path of tape drive OR search path (Px)
4) give " bo 4/4/12.0" OR "bo P1" ( according to the search results)

HTH,
Shiju
Life is a promise, fulfill it!
Rushank
Super Advisor

Re: lost /opt

Hello ,

I tried also with selecting p0 insted of full path while booting but no success. I don't know why it is selecting my alt boot disk.
I've selected -A while running make_recovery.
Christopher McCray_1
Honored Contributor

Re: lost /opt

Hello,

After you interrupt the boot process, type

sea ipl

Which will search your system for devices with bootable media. Look for the one with the description Sequntisl access media and use the P#

bo P#

Hope this helps

Chris
It wasn't me!!!!
Tony500
Advisor

Re: lost /opt

Harry,
I didn't think you could use a 'tar' command on a make_recovery. As I understand it, make_recovery uses fbackup (an HP specific format). Is it possible to combined the commands of the tar format?
You can usually find me at www.constantreader.net
Sandip Ghosh
Honored Contributor

Re: lost /opt

during booting interrupt and give sea. Is there showing anything as sequential access media? Give that No, means corresponding P# or the HW address of that device.

Sandip
Good Luck!!!
Rushank
Super Advisor

Re: lost /opt

I'm using SK Shan's method It's restoring file and update you accordingly.

I was trying to reduce /opt and increase /var, since I want to use this server act as server fot make_net_recovery client.

I did a mistake doing lvreduce first before I execute fsadm! It corrucpted the file system.

Now, Is it possible to run fsadm command while /opt mounted..??




Helen French
Honored Contributor

Re: lost /opt

Hi Rushank:

The reason why it picks up the alternate path is - because you specified 'bo al'. You need to specify only 'bo' and the path.

HTH,
Shiju
Life is a promise, fulfill it!
S.K. Chan
Honored Contributor

Re: lost /opt

I'm assuming you wanted to reduce /opt on the fly with OnlineJFS and that's why you're using fsadm ? The answer is yes you can do this with /opt mounted but the sequence must be correct ..

To increase
1) lvextend
2) fsadm

To reduce
1) fsadm
2) lvreduce
Helen French
Honored Contributor

Re: lost /opt

Hi Rushank:

The answer is it depends ! This specific on the file system type( online JFS, hfs etc) which /opt uses. If you have onlineJFS, then you can do that

# man fsadm_FStype - for details

HTH,
Shiju
Life is a promise, fulfill it!
harry d brown jr
Honored Contributor

Re: lost /opt

Tony500,

A make_recovery tape has a LIF are as the first part of the tape (boot sector), then it has a TAR like backup called "pax". "pax" has two options, tar and cpio. The make_recovery process uses the "tar" backup option. The reason make_recovery uses "pax" is so that it can recover the vg00 files without having to have all the crap that frecover uses - pax has a smaller "footprint" and is very very efficent.

live free or die
harry
Live Free or Die