All filesystems mounted in proper order at boot
 
*
Welcome, Guest. Please login or register. December 05, 2008, 12:34:28 PM


Login with username, password and session length


Pages: [1]   Go Down
  Print  
Author Topic: All filesystems mounted in proper order at boot  (Read 824 times)
0 Members and 1 Guest are viewing this topic.
Michael
Administrator
Hero Member
*****
Posts: 530


« Reply #1 on: June 19, 2008, 06:00:21 PM »

Well, I suspect - hope - that it is easy enough to do by changing the order in /etc/filesystems. I'll have to install a test system to verify, but that may be enough.

A second option might be to change an option in the filesystem you want mounted first (/oracle/P25). You code try:

With all /oracle/P25 filesystems unmounted remove all the subdirectories that exist in the /oracle/P25 directory. Now none of the sub-directory mounts will work until /oracle/P25 is mounted - and only /oracle/P25 gets mounted. To make this even more "pretty" set all the other filesystems to non-auto mount. Use: for each of the /oracle/P25 subdirectories....

# chfs -A no /oracle/P25/mirrlogB # etc.'

Make sure that /oracle/P25 is still automount (chfs -A yes /oracle/P25).

Some study of the init process ....
The processing of automounts is initiated by the rc line in /etc/inittab: Anything you add after this will process later.
init:2:initdefault:
brc::sysinit:/sbin/rc.boot 3 >/dev/console 2>&1 # Phase 3 of system boot
powerfail::powerfail:/etc/rc.powerfail 2>&1 | alog -tboot > /dev/console # Power Failure D
etection
load64bit:2:wait:/etc/methods/cfg64 >/dev/console 2>&1 # Enable 64-bit execs
tunables:23456789:wait:/usr/sbin/tunrestore -R > /dev/console 2>&1 # Set tunables
rc:23456789:wait:/etc/rc 2>&1 | alog -tboot > /dev/console # Multi-User checks
... more stuff follows


In /etc/rc the lines we are interested in are:

# Varyon all Volume Groups marked as auto-varyon.
# ( rootvg already varied on)
dspmsg rc.cat 2 ' Performing auto-varyon of Volume Groups \n'
cfgvg
..... more info ....
# Perform all auto mounts
dspmsg rc.cat 4 ' Performing all automatic mounts \n'

# Remove the file 'fs1.$$' if it already exists
rm -f /tmp/fs1.$$

# handle the egrep line carefully: between each pair of brackets is a tab
# followed by a space, and the tab may get lost if you copy and paste the line
egrep -vp "^[    ]*vfs[  ]*=[    ]*(cachefs|nfs)[        ]*$" \
                        /etc/filesystems > /tmp/fs1.$$

mount /tmp/fs1.$$ /etc/filesystems
mount all
umount /etc/filesystems
rm -f /tmp/fs1.$$


Summary: Two basic choices: either:
  • Edit /etc/filesystems to change the order. Note this will need to be done (again) anytime importvg is done.
  • Change the sub-directories to no automount (and clean up the /oracle/P25 directory (mountpoint) so that when /oracle/P25 is not mounted, none of the subdirectories exist. Next create a new script, perhaps add both a S and a K script is /etc/rc.d/rc2.d directory to finish the automounts and also start the application. Or, add a new entry in /etc/inittab and position it after the rc: line, but before the entry that starts the application.

  • My apologies, if there is a bit of wandering around in this answer - but I hope it provides enough information for you to decide on your solution. Do keep us updated on your solution!
    « Last Edit: June 20, 2008, 12:08:30 PM by Michael » Logged
    jasdeepsingh_07
    New Member
    *
    Posts: 2


    « on: June 19, 2008, 08:06:52 AM »

    How can I modify the order in which filesystems are mounted at boot.
    Present order:
    /oracle/P25/mirrlogB
    /oracle/P25/saparch
    /oracle/P25/sapreorg
    /oracle/P25/origlogA
    /oracle/P25/sapdata8
    /oracle/P25

    Order for mounting filesystems:
    /oracle/P25
    /oracle/P25/mirrlogB
    /oracle/P25/saparch
    /oracle/P25/sapreorg
    /oracle/P25/origlogA
    /oracle/P25/sapdata8

    I'm not allowed to re-build all the filesystems. Kindly advise how to rectify this.
    Logged
    Pages: [1]   Go Up
      Print  
     
    Jump to:  

    Powered by MySQL Powered by PHP Powered by SMF 1.1.2 | SMF © 2006-2007, Simple Machines LLC

    Valid XHTML 1.0! Valid CSS! Dilber MC Theme by HarzeM
    Page created in 1.213 seconds with 19 queries.




    eXTReMe Tracker

    Terms of Use and Privacy and Security Policies
    Copyright 2001-2008 Michael Felt and ROOTVG.NET