Hello,
I holds HP-UX B.10.20.
When running SAM I receives the following messages:
/var/sam/log: no such file or directory
/usr/sbin/sam[196]: var/sam not found
Sam main could not open the directory /var/sam (errno=2, "No such file or directory")
#bdf shows no VAR directory exists,
Plese advice,
Yali.
Hi:
@Yaroki wrote:#bdf shows no VAR directory exists,
So '/var' isn't mounted. Did you just reboot, and if so why? What happens if you do:
# mount -a
Is '/var' present in '/etc/fstab'?
What last happened before this or what did you do?
Regards!
...JRF...
The "bdf" command lists mount points, not directories. /var is a standard HP-UX mount point: it may be possible to create a custom installation of HP-UX that has /var as a regular directory instead of a mount point, but the default installation should always have /var as a mount point. Without /var, many system services and daemons, including sam, will not work.
Looks like your /var filesystem is currently not mounted for some reason.
Run "grep /var /etc/fstab" to see which disk device contains your /var filesystem: it's typically /dev/vg00/lvol7, but might be different on a HP-UX 10.20.
Make sure the /var directory exists: if it does not exist, mounting your real /var filesystem will not be possible.
Run "ll -d /var" to see if the directory exists. If it does not, create it (mkdir /var).
When /var directory exists, you should be able to mount the filesystem with a simple "mount /var" command.
If these commands display error messages, please copy&paste the errors to this thread.
>bdf shows no /var directory exists,
If /var/ doesn't exist, your system is completely broken and you need to restore from a backup.
If it is just /var/sam, then you should just "mkdir /var/sam". If you have another system, copy the permissions.
When was the last time your ran sam(1m)?
Thanks for the replies.
var directory exists:
# grep /var /etc/fstab gives
/dev/vg/00/lvol9 /var hfs defaults 0 2
# mount /var gives
mount: /dev/vg00/lvol9 needs to be fsck'ed before mounting
mount: warnning : if the device /devvg00/lvol9 is mounted to another system then do not run fsck.
How should I run the fsck? what commands to use? what mode (Single user, other run level)?
I have also noticed that /lvol2 /lvol6 and are not mounted (actually I can't see /lvol6 at all).
BR,
Yali
fsck -y -o full /dev/vg00/rlvol9
Since it is unmounted, I believe you can run it without going to single user mode.
Your lvol2 is most likely swap space and thus would not show in fstab (verify by running "swapinfo -tam"). As far as lvol6 is concerned, check /etc/fstab with "strings /etc/fstab |grep lvol6" to see what might supposed to be there (possibly /tmp?).
/dev/vg/00/lvol9 /var hfs defaults 0 2
>How should I run the fsck? What commands to use? what mode (Single user, other run level)?
Since it isn't mounted, you can run it now. Read fsck_hfs(1M).
# fsck /dev/vg00/rlvol9
Thanks Dennis, I hadn't noticed that it was HFS!
Indeed, /lvol2 is swap space.
Regarding /lvol6 I ran
# /etc/fstab | grep /lvol6 and it gives
/sbin/sh: /etc/fstab: Execute permission denied (???)
"strings /etc/fstab", though I probably should have just said "grep lvol6 /etc/fstab"
>CANNOT READ: BLK 212000
Looks like your disk is bad.
This document will guide you through the disk replacement process:
http://bizsupport.austin.hp.com/bc/docs/support/SupportManual/c01911837/c01911837.pdf
> I have few questions:
> 1. Does it support B.10.20 and B.11.11 as well?
> 2.What hardware do I need (DISK, OS CD and so on)?
> 3. What is the estimated time to replace the disk and bring back the system?
1. I've used this document for years on 11.11 and I think even back on 10.20, so yes.
2. Depends on your system (for the replacement disk) and the procedure required (read the doc)
3. Depends on how fast you work and how many bosses you have breathing down your neck - could be done in a couple of hours (without bosses) or a couple of days (with bosses).
>The system is still running and perform the job, but I guess it soon be crushed.
I'm not sure how it can be up if /var/ isn't mounted?
If you don't have a backup of /var, you can't ever patch the system.
And "can't never" is a really, really long time!!
>3. Depends on how fast you work and how many bosses you have breathing down your neck
And if they promise to bring you a beer(s) when you are done? :-)