Mount options - AIX


 
Thread Tools Search this Thread
Top Forums Shell Programming and Scripting Mount options - AIX
# 1  
Old 05-01-2006
Mount options - AIX

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
# 2  
Old 05-04-2006
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

Code:
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:

Code:
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
Login or Register to Ask a Question

Previous Thread | Next Thread

10 More Discussions You Might Find Interesting

1. UNIX for Beginners Questions & Answers

How to create a new mount point with 600GB and add 350 GBexisting mount point? IN AIX

How to create a new mount point with 600GB and add 350 GBexisting mount point Best if there step that i can follow or execute before i mount or add diskspace IN AIX Thanks (2 Replies)
Discussion started by: Thilagarajan
2 Replies

2. UNIX for Beginners Questions & Answers

Options for AIX server backups

Hello, I'm new to this forum. Forgive a question that may have been asked, but I would like to get advice on options for backups of an AIX server. The AIX server in question has about 2TB of storage, with 3 Oracle databases configured on it We're currently using tar backups to tape, LTO... (1 Reply)
Discussion started by: terrya
1 Replies

3. AIX

AIX available cifs mount options

Hi, I can't find any documentation of all available mount options of mount -v cifs Unfortunately you can specify any fantasy options, no complains, and the mount command shows this option In particular I want to know if there is a possibility to completely disable cifs caching in aix,... (3 Replies)
Discussion started by: funksen
3 Replies

4. AIX

Mount CIFS on AIX

Hello AIX gurus, I am trying to mount a CIFS share on AIX and I could use some help. Here are the environment details: AIX - 6100-05-01-1016 Domain Controller - WIN2K8R2 (authentication takes place here) CIFS share is stored on a NetApp storage array that is joined to the domain I have... (2 Replies)
Discussion started by: jhall
2 Replies

5. UNIX for Dummies Questions & Answers

List of 'if -f' options - AIX / Korn Shell

Hi all, Can someone point me in the right direction for a manual on the various statement options for 'if'. Basically I have a piece of code which says: if ] and I wondered what the -f was. I know the '!' means not equal.. As usual any help much appreciated.. (5 Replies)
Discussion started by: Grueben
5 Replies

6. AIX

NFS mount problems on AIX

Hi, I have two machines (AIX) each on a different VLAN. Need to mount a filesystem using nfs on the other one. When I export the nfs file system its a breeze. But when I try to mount it on the other machine the smitty command hangs on "running" and i get an OK from smitty but with this... (6 Replies)
Discussion started by: aixromeo
6 Replies

7. AIX

Any hope to get lp options like the following to work on AIX (6.1)?

Greetings Aix gurus, I have been appointed the task to port my SAS environment on HP-UX to AIX... I have been able to solve most issues but I am stuck with the following lines (these were easy to find, since in shell scripts but I found out that there are plenty more and encapsulated in SAS... (1 Reply)
Discussion started by: vbe
1 Replies

8. UNIX for Advanced & Expert Users

how to check the options used in mount command

hi , I want to check that what options i have used in mount command ... or what switches i have used while mounting .. is there any method to check ? thanks (1 Reply)
Discussion started by: tahir23
1 Replies

9. UNIX for Advanced & Expert Users

Mount point options

Hello all, I'm sharing 1 volume from a Sun Storage array (6130), out to 2 servers. Created a slice on one server and mounted a filesystem. On the other server the disk already sees the created slice from the other server (shared throught the storage array, so mounted this filesystem as well. ... (1 Reply)
Discussion started by: Sunguy222
1 Replies

10. AIX

AIX 4.3 - unable to mount one of our VG's

AFter a hardware issue - scsi controller replaced and hadware is now functioning again . Able to mount all VG except one. Need AIX 4.3 experience to assist... Thanks (0 Replies)
Discussion started by: pmcopoc
0 Replies
Login or Register to Ask a Question