How to change the order in which AIX V5.3 mounts filesystems
Filesystems are mounted at AIX boot time in the order they appear in /etc/filesystems. Filesystems are added to /etc/filesystems in the order they are defined. The easiest way to change the order in which filesystems are mounted is to edit /etc/filesystems and change the ordering of the filesystem stanzas. (But be careful to maintain a blank line between each stanza. If blank lines are removed, some filesystems won't get mounted at boot time!)
 | Note
There is, however, a down side to editing /etc/filesystems to change the order in which filesystems are mounted. Actions by another system administrator (who might not be aware that /etc/filesystems has been edited) can revert /etc/filesystems to the original order without notice.
That's because AIX keeps information regarding each JFS and JFS2 filesystem not only in /etc/filesystems but also in the LVCB of the logical volume on which the filesystem is defined. (The LVCB (logical volume control block) is in the first 512 bytes of a logical volume. Search the AIX V5.3 Information Center for more information about the LVCB.)
When a volume group is imported, AIX reads the LVCB of every logical volume in the volume group and adds filesystem definitions at the bottom of /etc/filesystems. And when a volume group is exported, AIX deletes from /etc/filesystems the definition of filesystems in the volume group.
So if /etc/filesystems is edited to change filesystem mount order, the order in which filesystems are mounted will change if/when one or more volume groups are exported and re-imported. Not a good thing. See advice near the end of this page. |
There is no justification for editing /etc/filesystems unless the filesystem hierarchy has nested mounts (eg, mount points of /oracle, /oracle/home, /oracle/home/logs, etc). A sample chkfsmnt Perl script is available which will examine /etc/filesystems and identify situations where nested mounts exist and where filesystems might not be mounted in the correct order at AIX boot time:
But it is likely that situations where filesystems are not mounted in the correct order have already been found and corrected. Please note that after AIX boots, the command 'alog -t console -o' can be used to display error messages generated during the boot process, including messages generated when AIX tries to mount filesystems at boot time.
There might be a more serious concern that /etc/filesystems has already been edited to change the order in which filesystems will be mounted at boot time. A sample chkvgmnt Perl script is available which will examine all volume groups which are varied on and identify situations where filesystems could end up mounted in the wrong order if one or more of those volume groups are exported and re-imported:
 | Note
If a filesystem does not have a mount=true attribute set in the LVCB (implying that the filesystem will have mount=false in /etc/filesystems if the volume group containing the filesystem is exported and re-imported), the chkvgmnt Perl script will display mount=false for the filesystem in a column not shown in the example above. And if a filesystem has a type= attribute in the LVCB (suggesting that AIX might be tailored to cause the filesystem to be mounted out of the usual order at boot time), the script will display the type= attribute for the filesystem in the same column. However, the shell script assumes that every filesystem will be mounted at AIX boot time in the order found in /etc/filesystems (after volume groups are exported and reimported), which might not be a valid assumption.
(The LVCB (logical volume control block) is in the first 512 bytes of a logical volume. Search the AIX V5.3 Information Center for more information about the LVCB.) |
See the Using Mount Groups in AIX Technote
to understand how to change the order in which filesystems are mounted at AIX boot time without editing /etc/filesystems.
The contents of this web page solely reflect the personal views of the authors and do not necessarily represent the views, positions, strategies or opinions of IBM or IBM management. Please use the
Add Comment link at the bottom of the page to provide feedback. Note: Until you log in (using the link in the upper right corner of this web page), you will not see the
Add Comment link and you can not add a comment. If you do not already have an IBM ID, use the Register Now link on the sign in page to obtain one. Registration is quick and easy.