1847478 Members
3671 Online
110265 Solutions
New Discussion

Re: /var corruption

 
SOLVED
Go to solution
Raul Igartua
Occasional Contributor

/var corruption

I have corruption in the /var fs and I don't have an ignite tape.

I do have a fullbackup and an Installation/update/recovery cd.

Can these two help me recovery a healthy /var fs?

Thanks in advance
7 REPLIES 7
MarkSyder
Honored Contributor

Re: /var corruption

It depends on the nature of the corruption. What are you seeing?

Mark Syder (like the drink but spelt different)
The triumph of evil requires only that good men do nothing
KapilRaj
Honored Contributor

Re: /var corruption

single user mod & fsck -y /var . Did you try ?

Regds,

Kaps
Nothing is impossible
A. Clay Stephenson
Acclaimed Contributor

Re: /var corruption

When you don't bother to indicate what kind of backup you have (tar, cpio, fbackup ...), you make it difficult to answer. The good news is that if you used a standard backup tool (e.g. not Data Protector or NetBackup) then you won't even need the recovery media.

All you need to do is bring the machine up in single-user mode. You may simply need to do an fsck on /var or you may run newfs and create a new filesystem, mount /var, and then restore. You then umount /var and reboot and you are fixed. In single-user mode, you need to execute the commands in /sbin because all of these (tar,pax,frecover) are statically linked. You can use /sbin/pax to restore tar, cpio, or pax images although you could mount /usr and then also have cpio itself.
If it ain't broke, I can fix that.
Raul Igartua
Occasional Contributor

Re: /var corruption

Sorry, I forgot to say what kind of backup.

I have an fbackup.

The problem started when the EMS reported a a disk error and the server crashed. The disk with problem is in VG00. At the time there was no mirror disk.

I booted the server in single user mode and did the fsck -F vxfs -o full /dev/vg00/lvol8

could not stat.

The server was not booted again until this day. It complained about some files but it booted. I then made a mirror of vg00 and replaced the defective drive and resync'd both drives.

The tested the both drives and they boot ok, but when I tried to run swlist I got the error:

root:/>swlist
# Initializing...
# Contacting target "HPL-2000"...
ERROR: The expected depot or root does not exist at "/".
ERROR: There is currently no installed software on host "HPL-2000" at
location "/".

So, I believe that /var has some corrupted files.






James R. Ferguson
Acclaimed Contributor
Solution

Re: /var corruption

Hi Raul:

You need to restore '/var' from a backup. WIthout the Installed Products Database held in '/var/adm/sw' your server is worthless in terms of any patching. It's not capable anymore.

I would boot up into single user mode; mount '/usr' and '/tmp' and 'newfs' '/var'. Then, use your 'frecover' to recovery the entire contents of the '/var' filesystem. I assume that you have a current backup taken at least after your last patch ('swinstall' and/or 'swremove') session.

Regards!

...JRF...
Raul Igartua
Occasional Contributor

Re: /var corruption

Thanks to all. Your resolution of recreating the fs worked fine.


Raul Igartua
Occasional Contributor

Re: /var corruption

Everything is working ok