Contents deleted from /var/sadm

Hi,
Somebody/somebody removed all contents /vat/sadm on Solaris 10 Sparc box.
As of now server is up and running. There is no backup for this server.
If we copy contents from another equivalent server, can it work ?
We don't know if it will be fixed by booting form DVD also.
Any suggestions?

Hi,

Oh dear, that is...unfortunate. The primary purpose of the directory tree underneath /var/sadm on Solaris is to store information about all installed packages and patches. So basically, it's entirely system-dependent. No two servers will have the same contents in there, unless they've had exactly (and I really do mean exactly) the same life in terms of the OS install options, subsequently-added packages and applied patches all being 100% identical at every step of the way.

So in other words, unless this server happens to have a sibling system that has identical hardware, an identical patch level of the OS, and absolutely identical sets of installed software and patches, with literally no differences between the two systems in any way whatsoever, then the contents of /var/sadm are going to be different. It's not really a transplantable directory, sadly.

If it were me, and I had a system with a hosed /var/sadm and genuinely no backups, I'd most likely be looking at migrating services off of it on to another server, and re-installing the broken box. Unless you are happy never being able to install any packages or apply any patches (an unwise situation to be in, generally speaking), then that is probably your only way out of this without backups, I'm sorry to say.

We have another application node, which is also servicing as cluster part of this server. OS, version and patch levels are same, but I can not say about ubsequently-added packages or may be little difference in libraries.

We are in talks with application teams for option of rebuilding it. But, if we take chance, it can not be 'repaired', if we boot it from OS bootable disk ?

Hi,

That's good, that you at least have something that can take over while you do a re-build. In terms of repairing this - I'm not myself aware of a way of doing that, sadly. The problem is that the information about installed packages and patches only lives in /var/sadm , and if it's gone, it's gone. With all the files actually being totally gone rather than corrupt or otherwise experiencing a problem, I'm not aware of any way to re-build /var/sadm , since it is itself the database that keeps note of what's happened to the system. Since there is no other record, there's nothing to re-build from, if you follow.

1 Like

For what it's worth, if you're paying Oracle for support on this system, you need to do a clean reinstall. There's no way you'll get any support from Oracle on that server until you do.

And once you get your system back up and stable, start doing backups. You now know why.

Then look into Solaris 10 alternate boot environments and live upgrade. Start here: Booting Multiple Boot Environments - Oracle Solaris 10 9/10 Installation Guide: Solaris Live Upgrade and Upgrade Planning Having a backup boot environment on the system can save you in cases like this.