Operating System - HP-UX
1832095 Members
3088 Online
110038 Solutions
New Discussion

I need to recreate /opt and /var!

 
SOLVED
Go to solution
Eric Antunes
Honored Contributor

I need to recreate /opt and /var!

Hi all,

HP-UX 11.0 server with JFS 3.3.

This morning I've updated /opt and /var to version 4 (I didn't read all the vxupgrade manual...).

Note: I think HP should modify this behaviour with, at least, a warning message explaining that this is not recomended for HP-UX 11.0...


Now I need to "rebuild" those 2 filesystems... :(

My questions are:

- Will I be able to recover those filesystems data after mkfs? How? With Ignite? Since the last Ignite tape, I've installed some software: are there dependecies between /opt and /var and the other OS filesystems?? Is there a chance to get inconsistencies???

- What is the recomended method to do that "rebuild", considering that, for example with /opt (lvol6):

a) the "mkfs -m /dev/vg00/lvol6" gives me the following:

mkfs -F vxfs -o ninode=unlimited,bsize=1024,version=4,inosize=256,logsize=1024,n
olargefiles /dev/vg00/lvol6 524288

b) the fstyp returns:

fstyp -v /dev/vg00/lvol6
vxfs
version: 4
f_bsize: 8192
f_frsize: 1024
f_blocks: 524288
f_bfree: 102578
f_bavail: 96179
f_files: 34556
f_ffree: 25644
f_favail: 25644
f_fsid: 1073741830
f_basetype: vxfs
f_namemax: 254
f_magic: a501fcf5
f_featurebits: 0
f_flag: 0
f_fsindex: 6
f_size: 524288



Thanks,

Eric Antunes
Each and every day is a good day to learn.
13 REPLIES 13
Arunvijai_4
Honored Contributor

Re: I need to recreate /opt and /var!

Hi Eric,

Not sure will this help, just check this thread

http://forums1.itrc.hp.com/service/forums/questionanswer.do?threadId=888098

Assign zero if not,

-Arun
"A ship in the harbor is safe, but that is not what ships are built for"
Geoff Wild
Honored Contributor

Re: I need to recreate /opt and /var!

Ignite would be the best bet.

To build from now on - add the -x version=3 (or is it -o) to mkfs.

Or, upgrade to 11i :)

Rgds...Geoff
Proverbs 3:5,6 Trust in the Lord with all your heart and lean not on your own understanding; in all your ways acknowledge him, and he will make all your paths straight.
Steven E. Protter
Exalted Contributor
Solution

Re: I need to recreate /opt and /var!

Shalom Eric,

There is nothing special about those filesystems.

You should be able to run mkfs or newfs and simply restore the contents of the filesystems from your latest fbackup. It would be unfortunate if all you had was Ignite because this problem does not seem serious enough to warrant that step. Still vg00 restore will allow you to do the upgrade again properly after reading the manual completely.

There are probably soft links between /opt and /usr but they will be stored in any restore methodology. Just make sure you have a copy of needed utilities before running newfs or mkfs. Veritas sticks their software there and any chance of restore will end with the newfs command.

:-)
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
James R. Ferguson
Acclaimed Contributor

Re: I need to recreate /opt and /var!

Hi Eric:

The key element here, is that you have installed software since your last Ignite backup. This has altered the Installed Product Database represented by '/var/adm/sw'.

This is critical to being able to patch a server and must be preserved at all costs! In that respect there will most certainly be relationships that are represented between '/opt' and '/var' and/or '/usr' and '/var'.

I think the easiest, safest course would be to make a new Ignite make_tape_recovery of your *current* configuration and use that to re-build your server.

Remember that the Ignite archive that will be reloaed is only a 'pax' backup, so your filesystems should be rebuilt with the lower (correct) VxFS version and all should be well thereafter.

Regards!

...JRF...
Eric Antunes
Honored Contributor

Re: I need to recreate /opt and /var!

Hi again,

Thanks for the help.

The problem with Ignite is that, besides /var and /opt, it will need to recover also /(root), /usr, /stand.

So it is better to do a entire vg00 tape (make_tape_recovery -lv -x inc_entire=vg00 -a /dev/rmt/0mn), isn't it?


Thanks,

Eric Antunes
Each and every day is a good day to learn.
Eric Antunes
Honored Contributor

Re: I need to recreate /opt and /var!

Would a fbackup done now of /opt and /var be enough?

PS: I'll assign points at the end for more fairness.

Thanks,

Eric Antunes
Each and every day is a good day to learn.
A. Clay Stephenson
Acclaimed Contributor

Re: I need to recreate /opt and /var!

Yes, you can run fbackup, tar, or cpio of your current /opt and /var filesystems. Read the image back so that you know you have good backups. Next shutdown and come up in single-user mode and create the new filesystems. Restore from your backups and then bring the box up normally.

Whichever backup/restore utilities you choose, make sure that there are versions in /sbin because you need to statically linked versions. (tar,cpio, and frecover all have statically linked versions in /sbin).

If it ain't broke, I can fix that.
Pete Randall
Outstanding Contributor

Re: I need to recreate /opt and /var!

Eric,

I would definitely do a "-x inc_entire=vg00" and rebuild the whole thing.


Pete

Pete
James R. Ferguson
Acclaimed Contributor

Re: I need to recreate /opt and /var!

Hi Eric:

Yes, you should be able to recover only '/opt' and '/var' having backed them up in *single-user* mode if you chose.

You will need to boot into single user mode; mount '/usr'; run '/usr/sbin/fbackup'; 'newfs' your filesystems; and then run 'frecover'.

When done, reboot to come up cleanly.

Regards!

...JRF...
A. Clay Stephenson
Acclaimed Contributor

Re: I need to recreate /opt and /var!

I'll even give you a Plan C. You could move /opt and /var to another VG or leave them in vg00 but not on the boot disk. Only /stand, primary swap, and / must be on the boot disk. If you have enough spare PE's on the boot disk, you could create new LVOL's and filesystems there. Then you could simply copy /opt to /newopt for example; umount /newopt; edit /etc/fstab making the /newopt entry /opt and comment out the old /opt entry. (repeat for /var) Reboot and you are back in business. You can then lvremove the original /opt and /var LVOL's.
If it ain't broke, I can fix that.
Eric Antunes
Honored Contributor

Re: I need to recreate /opt and /var!

Thank you all.

I must live the offive now but monday I'kll decide what more to do (I have already Ignited) and assign points fairly.

Best Regards,

Eric
Each and every day is a good day to learn.
Eric Antunes
Honored Contributor

Re: I need to recreate /opt and /var!

Hi all!

New info: the AC power went down in the weekend and all servers were booted.

This specific server booted OK even with /opt and /var version 4!

What about now? Is it ok to continue with this version??

Best Regards,

Eric Antunes
Each and every day is a good day to learn.
Robert-Jan Goossens
Honored Contributor

Re: I need to recreate /opt and /var!

Hi Eric,

I would recreate the filesystems to prevent future failures, could be your systems boots perfectly, but when you need to recover from the recovery media yould could have problems.
----
These file systems are used for system recovery. If you upgrade these file systems to version 4 layout, you may not be able
to boot your system with the 11.0 kernel or with the emergency recovery media.
----
Best regards,
Robert-Jan