1834497 Members
2539 Online
110067 Solutions
New Discussion

recreate /var !!!

 
SOLVED
Go to solution
Lorenzo Facello
Valued Contributor

recreate /var !!!

Hi Forum,
in a Lclass1000 hpux11.00 we changed a crashed disk

it was a operating system disk, mirrored.
I found in the lvdisplay -v /dev/vg00/lovl8
some ??? instead rhe special file of the disk.
in the mirrored too!!!

infact I can't mount /var.. and I can't do fsck

so, yesterady HP changed the disk.. and they did the sync of the vg00.....
now... I want to recreate /var
I guess to do the following steps:

- lvreduce -m 0 /dev/vg00/lvol8 /dev/dsk/cxtxdx
- lvremove /dev/vg00/lvol8
- lvcreate -L xx /dev/vg00/lvol8
- newfs -F vxfs /dev/vg00/rlvol8
- mount /dev/vg00/lvol8 /var

We have a tape with the bkup of /var
I can use it or I need the make_tape_recovery cassette?

I know about the command "mt" but can you help to perform this activity
Thanks for help
L.F

6 REPLIES 6
Rick Garland
Honored Contributor
Solution

Re: recreate /var !!!

Your steps look correct. Once you have the new /var mounted you can restore from the tape.

Once you have completed the restore, recreate the mirror so you can get the /var back over there as well.

If all else fails, you do have the make_recovery tape. To get just the /var off of it, mt -f /dev/rmt/0m fsf 1 (Assuming the tape device is 0m)

Skip ahead 1 file mark off the make_recovery tape and then you can use the tar command. Remember the tar tape has saved in absolute path, be careful you only get the /var info.

Henk Geurts
Esteemed Contributor

Re: recreate /var !!!

did you try a full fsck ?:

# fsck -F vxfs -o full /dev/vg00/lvol8
TwoProc
Honored Contributor

Re: recreate /var !!!

Your steps look OK to me. If your backup of /var is recent - you should be able to just recover that part alone. Just to be safe, I'd be in single user mode before you do it, and then reboot afterwards back to your default init level.
We are the people our parents warned us about --Jimmy Buffett
Lorenzo Facello
Valued Contributor

Re: recreate /var !!!

hey guys,
do you think I can use simply the tar command to restor /var?
from /
tar xvf ./var/*

thanks
Stephen Keane
Honored Contributor

Re: recreate /var !!!

Don't forget the device file

tar xvf /dev/rmt/0m var

Depends on how the tar command was used to back up var in the first place. If you do a

tar vft /dev/rmt/0m

or whatever your tape drive, see if it lists files as

/file

or

file

Then recover by using

cd /
tar xvf /dev/rmt/0m var

or

tar xvf /dev/rmt/0m /var

as appropriate
TwoProc
Honored Contributor

Re: recreate /var !!!

FWIW - Stephen's post addresses your last question perfectly.
We are the people our parents warned us about --Jimmy Buffett