AIX

AIX

Connect with fellow AIX users and experts to gain knowledge, share insights, and solve problems.

 View Only
  • 1.  PdAt ODM is 'not consistent' at shutdown time

    Posted Fri March 22, 2013 08:43 AM

    Originally posted by: MuppanaLalitaPrasad


    Hi All,

    I am using "shutdown -r now" to reboot the AIX 7.1 box and the system is rebooting but it is not invoking the shutdown notify script registered with the PdAt ODM at sometimes.

    Our requirement is to invoke some script whenever there is a reboot of the system using shutdown command after unmounting all the filesystems. Added the following stanza to the PdAt odm.

    PdAt:
    uniquetype = "xyz/shutdown/driver"
    attribute = "shutdown_notify"
    deflt = "/etc/shutdown_notify.sh"
    values = ""
    width = ""
    type = ""
    generic = ""
    rep = ""
    nls_index = 0

    And as per the line number 1375 in /usr/sbin/shutdown,

    ------------------------------------8<-----------------------------------------------
    1. added the following for feature 207332
    COMMANDS=`odmget -q "attribute = shutdown_notify" PdAt | grep deflt | cut -f 2 -d \"`
    ------------------------------------8<-----------------------------------------------

    the shutdown script is going to store the shutdown notification scripts in the variable COMMANDS. But the value of this variable is NULL at some times and is failed to invoke the shutdown notification script /etc/shutdown_notify.sh. But after line number 1375, when we are capturing the complete PdAt odm using "odmget PdAt" command, we are able to see the above mentioned stanza in it. So our observation is that PdAt ODM is not consistent.

    The details of the AIX box are

    bash-3.2# oslevel -r
    7100-01
    bash-3.2# oslevel -s
    7100-01-04-1216
    bash-3.2#

    Please let me know whether this is a known bug or not. If it is so, then in which TL, the fix is available?

    Please let me know if you need any information in order to know more about this issue.

    With Regards,
    Prasad


  • 2.  Re: PdAt ODM is 'not consistent' at shutdown time

    Posted Mon March 25, 2013 07:39 AM

    Originally posted by: jklotz


    Perhaps a silly question in your context, but why not use the /etc/rc.shutdown script ?


  • 3.  Re: PdAt ODM is 'not consistent' at shutdown time

    Posted Tue March 26, 2013 06:22 PM

    Originally posted by: dukessd


    "Our requirement is to invoke some script whenever there is a reboot of the system using shutdown command after unmounting all the filesystems"

    Um, "after unmounting all the filesystems" how you going to read the script?


  • 4.  Re: PdAt ODM is 'not consistent' at shutdown time

    Posted Thu March 28, 2013 09:01 AM

    Originally posted by: MuppanaLalitaPrasad


    Even if the shutdown script is trying to unmount all the filesystems, it can not unmount few filesystems of rootvg, e.g., /, /usr/ /var, /tmp and my script is available at /etc which is part of /.

    My point is that before invocation, it should be able to find the entry in the PdAt ODM as per the line number 1375 in the /usr/sbin/shutdown script and placed some echo messages to debug the issue. And is not reproducible always.


  • 5.  Re: PdAt ODM is 'not consistent' at shutdown time

    Posted Thu March 28, 2013 08:57 AM

    Originally posted by: MuppanaLalitaPrasad


    This script is invoked much before unmounting the filesystems. But i need to invoke my script after the filesystems are unmounted. Even if the shutdown script is trying to unmount all the filesystems, it can not unmount few filesystems of rootvg, e.g., /, /usr/ /var, /tmp and my script is available at /etc