Topic
  • 3 replies
  • Latest Post - ‏2011-05-12T17:46:17Z by esj
HajoEhlers
HajoEhlers
253 Posts

Pinned topic Q: User exits ( mmfsup and preunmount )

‏2011-05-12T12:37:57Z |
Hi,

Given: GPFS v3.2.1 PTF 25 / sles 11 sp1 (32bit)
1) Question/problem with mmumount and userexit preunmount
mmumount does starts the preumount script as seen from the command line output but it in mmfslog the execution of the preunmount is not shown.
Is this a bug or a feature ?

Example:
:~ # mmumount /tcgpfs1/fbf
Thu May 12 10:07:20 GMT 2011: mmumount: Unmounting file systems ...
Thu May 12 10:07:20 GMT 2011: /var/mmfs/etc/preunmount invoked

:~ # tail /var/mmfs/gen/mmfslog
...
Thu May 12 10:07:21.757 2011: Command: unmount gpfsfbf
Thu May 12 10:07:21.758 2011: Command: err 0: unmount gpfsfbf

2) Question regarding mmfsup
In my understanding mmfsup is started as soon as the gpfsd is active AND all auto mount enabled GPFS are mounted. But the logs tells me that mmfsup is started twice where i think its run actually only once.

Example:
Note: /cluster is the only auto mount enabled GPFS.

Tue May 10 07:54:22.885 2011: mmfsd ready
--> Tue May 10 07:54:22 GMT 2011: mmcommon mmfsup invoked
Tue May 10 07:54:23 GMT 2011: mounting /dev/cluster
Tue May 10 07:54:23.027 2011: Command: mount cluster
Tue May 10 07:54:23.028 2011: Connecting to ....
...
Tue May 10 07:54:23.232 2011: Command: err 0: mount cluster
Tue May 10 07:54:23 GMT 2011: finished mounting /dev/cluster
--> Tue May 10 07:54:23 GMT 2011: /var/mmfs/etc/mmfsup invoked
tia
Hajo
Updated on 2011-05-12T17:46:17Z at 2011-05-12T17:46:17Z by esj
  • dlmcnabb
    dlmcnabb
    1012 Posts

    Re: Q: User exits ( mmfsup and preunmount )

    ‏2011-05-12T15:04:47Z  
    The first mmfsup reference is the "mmcommon mmfsup invoked" which is the internal mmcommon function called mmfsup. After that does the automatic mounts, it calls the user exit script mmfsup which prints out the message
    "/var/mmfs/etc/mmfsup invoked"
  • HajoEhlers
    HajoEhlers
    253 Posts

    Re: Q: User exits ( mmfsup and preunmount )

    ‏2011-05-12T15:12:08Z  
    • dlmcnabb
    • ‏2011-05-12T15:04:47Z
    The first mmfsup reference is the "mmcommon mmfsup invoked" which is the internal mmcommon function called mmfsup. After that does the automatic mounts, it calls the user exit script mmfsup which prints out the message
    "/var/mmfs/etc/mmfsup invoked"
    Hi Dan,
    Thanks for the clearification . Any remark to the behaviour of the preumount user exist ?

    tia
    Hajo
  • esj
    esj
    104 Posts

    Re: Q: User exits ( mmfsup and preunmount )

    ‏2011-05-12T17:46:17Z  
    Hi Dan,
    Thanks for the clearification . Any remark to the behaviour of the preumount user exist ?

    tia
    Hajo
    This can be confusing but I'll give it a shot ...

    There are two preunmount user exit points. The "official" one is the preunmount
    exit that can be established with the mmaddcallback command. This is handled by
    the daemon code and, when defined, will be triggered every time the file system
    is unmounted no matter how the unmount is initiated. When this callback is invoked,
    there will be a record in the mmfs log file.

    The other preunmount is invoked only as a result of a mmumount command and is run
    outside the daemon code prior to the mm script issuing the OS unmount command.
    This code is needed by the CNFS component which some times needs to intercept and
    reject the unmount. At the end of this code path there is an option to run a user
    provided code if it is installed in /var/mmfs/etc. As far as I know, this was
    never formally externalized but people may have been told that it is there.
    Because the daemon code is not involved, the messages are not logged in the mmfs log.

    The thing to remember is that /var/mmfs/etc/preunmount will not be executed
    as a result of the OS umount command. If you want your code to be run on each
    unmount, use the mmaddcallback framework. I would also strongly urge that for
    addcallback you do not put your executables in /var/mmfs/etc. This directory
    should be reserved for the legacy user exits which GPFS still needs to support.

    Eugene