IBM®
Skip to main content
    Country/region [select]      Terms of use
 
 
    
     Home      Products      Services & solutions      Support & downloads      My account     
 
developerworks > My developerWorks >  Dashboard > AIX > ... > AIXV53Howtos > AIXV53mount
developerWorks
Log In   View a printable version of the current page.
Overview Connect Spaces Forums Wikis
AIXV53mount
Added by OneSkyWalker, last edited by OneSkyWalker on Nov 16, 2009  (view change)
Labels: 
(None)

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:

 # /usr/local/sbin/chkfsmnt
All parent filesystems will be mounted before children 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:

 # /usr/local/sbin/chkvgmnt
chkvgmnt: Generating volume group list ...
chkvgmnt: Generating list of filesystems in VG rootvg ...
chkvgmnt: Generating list of filesystems in VG appsvg ...
chkvgmnt: Generating list of filesystems in VG apptstdata1 ...
chkvgmnt: Generating list of filesystems in VG apptstdata2 ...
chkvgmnt: Generating list of filesystems in VG appstgdata1 ...
chkvgmnt: Generating list of filesystems in VG appstgdata2 ...
chkvgmnt: Generating list of filesystems in VG archvlogvg ...
chkvgmnt: Generating list of filesystems in VG apptstredo ...
chkvgmnt: Generating list of filesystems in VG appstgredo ...
If the OK? column is 'No', the Child filesystem will be mounted before the
Parent filesystem at AIX boot time, assuming all volume groups except rootvg are
exported and are then reimported in the order listed by 'lsvg -o' (starting
with the volume group preceding rootvg at the bottom and working up).

If the filesystems are in two different volume groups, then the issue can be
addressed by changing the order in which volume groups are imported, which might
create an issue if other parent-child relationships are dependent upon the two
volume groups being mounted in the current order.

If the filesystems are in the same volume group, then the issue can be
addressed by deleting the Child filesystem and recreating it in the same volume
group, which might create an issue if the Child filesystem is the parent of some
other filesystem in the same volume group.

Parent          Parent VG           Child                          Child VG    OK?
--------------- ---------           ------------------------------ ----------- ----
/home           rootvg    parent of /home/pidba                    appsvg      Yes
/opt            rootvg    parent of /opt/oracle                    appsvg      Yes
/opt/oracle     appsvg    parent of /opt/oracle/product            appsvg      No
/usr            rootvg    parent of /usr/local                     rootvg      Yes
/usr/local      rootvg    parent of /usr/local/dba                 rootvg      Yes
/usr            rootvg    parent of /usr/openv                     rootvg      Yes
/usr            rootvg    parent of /usr/sys/inst.images           rootvg      Yes
/var            rootvg    parent of /var/adm/ras/livedump          rootvg      Yes
/var            rootvg    parent of /var/adm/sa                    rootvg      Yes
/var            rootvg    parent of /var/opt/escalationdata        rootvg      Yes
/var            rootvg    parent of /var/opt/global                rootvg      Yes
/var/opt/global rootvg    parent of /var/opt/global/r3             rootvg      Yes
/var            rootvg    parent of /var/opt/oracle                appsvg      Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/archv01        archvlogvg  Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/bkup01         appsvg      No
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk001/APPSTG appstgdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk001/APPTST apptstdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk002/APPSTG appstgdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk002/APPTST apptstdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk003/APPSTG appstgdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk003/APPTST apptstdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk004/APPSTG appstgdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk004/APPTST apptstdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk005/APPSTG appstgdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk005/APPTST apptstdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk006/APPSTG appstgdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk006/APPTST apptstdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk007/APPSTG appstgdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk007/APPTST apptstdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk008/APPSTG appstgdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk008/APPTST apptstdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk009/APPSTG appstgdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk009/APPTST apptstdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk010/APPSTG appstgdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk010/APPTST apptstdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk011/APPSTG appstgdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk011/APPTST apptstdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk012/APPSTG appstgdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk012/APPTST apptstdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk013/APPSTG appstgdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk013/APPTST apptstdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk014/APPSTG appstgdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk014/APPTST apptstdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk015/APPSTG appstgdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk015/APPTST apptstdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk016/APPSTG appstgdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk016/APPTST apptstdata1 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk017/APPSTG appstgdata2 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk017/APPTST apptstdata2 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk018/APPSTG appstgdata2 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk018/APPTST apptstdata2 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk019/APPSTG appstgdata2 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk019/APPTST apptstdata2 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk020/APPSTG appstgdata2 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk020/APPTST apptstdata2 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk021/APPSTG appstgdata2 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/disk021/APPTST apptstdata2 Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/redo01/APPSTG  appstgredo  Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/redo01/APPTST  apptstredo  Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/redo02/APPSTG  appstgredo  Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/redo02/APPTST  apptstredo  Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/redo03/APPSTG  appstgredo  Yes
/var/opt/oracle appsvg    parent of /var/opt/oracle/redo03/APPTST  apptstredo  Yes
/var            rootvg    parent of /var/opt/perf                  rootvg      Yes
 #
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.

Recommendation

If /etc/rc is changed (as suggested in the Technote), document that change in a file (eg, /usr/local/README), as suggested in the Don't store local files in / and /usr best practice.

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.


 
    About IBM Privacy Contact