Topic
  • 4 replies
  • Latest Post - ‏2013-03-28T13:00:42Z by MuppanaLalitaPrasad
MuppanaLalitaPrasad
MuppanaLalitaPrasad
4 Posts

Pinned topic PdAt ODM is 'not consistent' at shutdown time

‏2013-03-22T12:43:22Z |
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
Updated on 2013-03-28T13:00:42Z at 2013-03-28T13:00:42Z by MuppanaLalitaPrasad
  • jklotz
    jklotz
    26 Posts

    Re: PdAt ODM is 'not consistent' at shutdown time

    ‏2013-03-25T11:39:27Z  
    Perhaps a silly question in your context, but why not use the /etc/rc.shutdown script ?
  • dukessd
    dukessd
    345 Posts

    Re: PdAt ODM is 'not consistent' at shutdown time

    ‏2013-03-26T22:21:44Z  
    • jklotz
    • ‏2013-03-25T11:39:27Z
    Perhaps a silly question in your context, but why not use the /etc/rc.shutdown script ?
    "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?
  • MuppanaLalitaPrasad
    MuppanaLalitaPrasad
    4 Posts

    Re: PdAt ODM is 'not consistent' at shutdown time

    ‏2013-03-28T12:57:24Z  
    • jklotz
    • ‏2013-03-25T11:39:27Z
    Perhaps a silly question in your context, but why not use the /etc/rc.shutdown script ?
    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
  • MuppanaLalitaPrasad
    MuppanaLalitaPrasad
    4 Posts

    Re: PdAt ODM is 'not consistent' at shutdown time

    ‏2013-03-28T13:00:42Z  
    • dukessd
    • ‏2013-03-26T22:21:44Z
    "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?
    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.