I'm trying to write a script to verify that file systems mounted properly after a reboot or a script that any system admin can run to verify that all file systems are mounted properly. With HP-UX, I can run a mount -aQ and it will mount file systems not already mounted and report back any errors/file systems that aren't mounted. If I have 50 file systems specified in the /etc/fstab and I ran a mount -a, it will show you the information about all of the file systems - the ones that mounted and any that have errored out BUT instead of having to read through each of the 50 lines, I can do the mount -aQ and it will only show me the file systems which errored. Is there such a mount option on an AIX machine?
DP
I've checked the 'mount' man pages for Aix 5.2/5.3 and can't find an equivalent to mount -aQ but the lsfs command shows details of all file systems in /etc/filesystems
lsfs output
Name Nodename Mount Pt VFS Size Options Auto Accounting
/dev/hd4 -- / jfs 262144 -- yes no
/dev/hd1 -- /home jfs 131072 -- yes no
/dev/hd2 -- /usr jfs 3932160 -- yes no
/dev/hd9var -- /var jfs 4194304 -- yes no
/dev/hd3 -- /tmp jfs 4194304 -- yes no
/proc -- /proc procfs -- -- yes no
/dev/hd10opt -- /opt jfs -- -- yes no
/dev/cd0 -- /cdrom cdrfs -- ro no no
/dev/nb45lv -- /usr/openv jfs 33554432 rw yes no
If you filter out those which should be automounted but size is shown as '--' you get a list of filesystems which are not mounted but should be:
lsfs | while read name nodename mountpoint vfs size options auto accounting
do
if [ ! "$name" = "Name" ]&&[ ! "$vfs" = "procfs" ]&&[ "$auto" = "yes" ]&&[ "$size" = "--" ]; then
print "Filesystem $name not mounted on $mountpoint"
fi
done
Output like:
Filesystem /dev/hd10opt not mounted on /opt
hope this helps to ease the pain of moving to Aix
cheers