format and pkginfo -l question

I have a Solaris 2.6 box flagging an "Error block: 308918" in the messages file when I execute a pkginfo -l. pkginfo with no flags returns no errors. I think I need to use format to mark this block and then restore the database used by pkginfo for backup. Any advice/input welcome.

Perhaps try a few FSCKs on the file system and see if that helps. If you have a defect on the disk you can do as you suggest and tag the errors. Disk space is so cheap, if you have defects on the disk, you might consider getting a new disk and replacing the bad one. I don't tolerate any errors on disks because losing a disk ruins my day.

I'm not fully understanding if you have a file system error or a disk flaw. It sounds like you believe the disk has a flaw. Well, if you do, then you may be safer in replacing it. Others may have a better suggestion. I always replace disks with surface flaws..... My Zero Tolerance for Disk Errors Policy :slight_smile:

On the other hand, if the error is in the file system, you can repair this. So, the key is finding out (for sure) if you have a disk flaw or a file system error.

Thanks Neo. I do beleive that it is a bad sector on the disk itself and not a file system error. Over the weekend I brought it down and marked the secotr as bad. This cleaned up the entries in the messages file but I still don't know if I can recover the pkginfo data. The problem with replacing the disk is that it is the root disk on a server which needs to be up 100% of the time. We have a hard time rebooting it much less swapping the disk and installing the OS etc.
Thanks again.

If you get a new disk with similar geometry, then the next time the system goes down, install the disk. Then, when you have time, do a dd (disk to disk) copy and competely mirror the root disk unto the new disk. (or do this just before a reboot). Afterwards, swap the new disk (freshly made with dd), with the original root disk. If you do this at 'targets of opportunities' when either down or rebooting, then the transition to an error-free disk can be made without being too intrusive.

I'm sorry I'm not much more help on the disk error. They make me nervous and I see them as a warning sign for future failures. My apologies for disk-paranoia :wink: About the error in your pkgtool distro, you might try just copying the entire directory with cp -rP (or something like that) and then move the old directory to an archive; then move the tree made with cp -rP (or whatever works for your system) back. You might get lucky and the disk error will remain in the archive tree and the new tree will be error free. This is a shot in the dark, but sometimes these wild-arse-guesses get lucky and solve obscure problems.

Hey no need to apologize for anything. I appreciate the fact that you share your knowledge/experience! I will try that next time I reboot the system. In the mean time I would like to try to fix the pkginfo table as we can't remove any packages. We have regular backups (monthly full dumps and Legato). I think I should be able to restore the file(s). This is there error I get when I exectute the pkginfo -l
# pkginfo -l wuftpd
pkginfo: ERROR: bad entry read in contents file
pathname: /kernel/strmod/hwc
problem: unable to read mode/owner/group

When I look at the modified and touch dates on /kernel/strmod/hwc they are very old??? I am confused and not sure how to proceed.