From Wiki-UX.info

Wiki-UX / Make tape recovery -u fail to release NFS client connection
Jump to: navigation, search

Make tape recovery -u fail to release NFS client connection

Contents


Abstract

When using make_net_recovery or make_tape_recovery (with the -s and -u options, to allow Ignite-UX to automatically update the IUX-Recovery bundle itself from the Ignite server it is possible that the client directory may be left mounted after the commands completes. This will always happen if Ignite-UX updates itself from the Ignite server and should not happen under any other circumstances.

Analysis

The following commands were run on the Ignite-UX client:

# uname -a
HP-UX tifa B.11.23 U ia64 1348272084 unlimited-user license

# swlist IUX-Recovery
# Initializing...
# Contacting target "tifa"...
#
# Target:  tifa:/
#
# IUX-Recovery                  C.7.7.93       Ignite-UX network recovery tool subset
  IUX-Recovery.Ignite-UX        C.7.7.93       HP-UX System Installation Services

# /opt/ignite/bin/make_net_recovery -v -n 1 -u \
-s zx6000 -x inc_entire=vg00 \
-x exclude=/stand -x exclude=/tmp -x exclude=/var -x exclude=/opt -x exclude=/home -x exclude=/usr \
-P s
WARNING: /var/opt/ignite/recovery directory does not exist. Will create it.
       * Creating NFS mount directories for configuration files.
       * Recovery Archive Name = 2009-01-02,00:25
       * Lanic Id  = 0xCA65FD9224B9
       * Ignite-UX Server = zx6000

=======  01/02/09 00:25:14 CST  Started /opt/ignite/bin/make_net_recovery. (Fri
         Jan 02 00:25:14 CST 2009)
         @(#)Ignite-UX Revision C.7.7.93
         @(#)ignite/net_recovery (opt) Revision:
         /branches/IUX_RA0809/ignite/src@74753 Last Modified: 2008-07-11
         12:27:58 -0600 (Fri, 11 Jul 2008)
       * Testing for necessary pax patch.
       * Recovery Archive Description = Recovery Archive
       * Recovery Archive Location    =
         zx6000:/var/opt/ignite/recovery/archives/tifa
       * Number of Archives to Save   = 1
       * Pax type  = tar
NOTE:    Command 'exclude /stand' has no effect because essential files
         override this command.
        In?     dsk/vg  name                    minor#  Associated disks/mountpoints
        1       v       /dev/vg00               0x00    /dev/dsk/c0t0d0s2
                                                /dev/vg00/lvol1 /stand  1
                                                /dev/vg00/lvol2
                                                /dev/vg00/lvol3 /       2
                                                /dev/vg00/lvol4 /opt    0
                                                /dev/vg00/lvol5 /tmp    0
                                                /dev/vg00/lvol6 /usr    1
                                                /dev/vg00/lvol7 /var    0
                                                /dev/vg00/lvol8 /home   0
        ** 0 - The Volume Group or Filesystem is Not included in the
               System Recovery Archive
        ** 1 - The Volume Group or Filesystem is Partially included in the
               System Recovery Archive
        ** 2 - The Volume Group or Filesystem is Fully included in the
               System Recovery Archive
       * Checking Versions of Recovery Tools
NOTE:    Updating Ignite-UX using the command: /opt/ignite/lbin/update_tools -s
         zx6000 -d /var/opt/ignite/depots/recovery_cmds
NOTE:    The version of Ignite-UX software on the client is lower
         than that on the server. OR some of Ignite-UX filesets on the
         client are missing. Ignite-UX will be updated now
         from: "zx6000:/var/opt/ignite/depots/recovery_cmds".
=======  01/02/09 00:25:20 CST  BEGIN swinstall SESSION
         (non-interactive) (jobid=tifa-0017)
       * Session started for user "root@tifa".
       * Beginning Selection
       * Target connection succeeded for "tifa:/".
       * Source connection succeeded for
         "zx6000:/var/opt/ignite/depots/recovery_cmds".
       * Source:
         zx6000:/var/opt/ignite/depots/recovery_cmds
       * Targets:                tifa:/
       * Software selections:
             IUX-Recovery,r=C.7.7.98,a=HP-UX_B.11.11_32/64,v=HP
             Ignite-UX-11-23,r=C.7.7.98,a=HP-UX_B.11.11_32/64,v=HP
             Ignite-UX.BOOT-COMMON-IA,r=C.7.7.98,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.7.98,fa=HP-UX_B.11.11_32/64
             Ignite-UX.BOOT-COMMON-PA,r=C.7.7.98,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.7.98,fa=HP-UX_B.11.11_32/64
             Ignite-UX.BOOT-KRN-11-23,r=C.7.7.98,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.7.98,fa=HP-UX_B.11.11_32/64
             Ignite-UX.BOOT-SERVICES,r=C.7.7.98,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.7.98,fa=HP-UX_B.11.11_32/64
             Ignite-UX.CD-TOOLS,r=C.7.7.98,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.7.98,fa=HP-UX_B.11.11_32/64
             Ignite-UX.CD-TOOLS-DOC,r=C.7.7.98,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.7.98,fa=HP-UX_B.11.11_32/64
             Ignite-UX.CD-TOOLS-SRC,r=C.7.7.98,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.7.98,fa=HP-UX_B.11.11_32/64
             Ignite-UX.DVD-TOOLS,r=C.7.7.98,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.7.98,fa=HP-UX_B.11.11_32/64
             Ignite-UX.DVD-TOOLS-DOC,r=C.7.7.98,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.7.98,fa=HP-UX_B.11.11_32/64
             Ignite-UX.DVD-TOOLS-SRC,r=C.7.7.98,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.7.98,fa=HP-UX_B.11.11_32/64
             Ignite-UX.FILE-SRV-11-23,r=C.7.7.98,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.7.98,fa=HP-UX_B.11.11_32/64
             Ignite-UX.IGNITE,r=C.7.7.98,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.7.98,fa=HP-UX_B.11.11_32/64
             Ignite-UX.IGNT-ENG-A-MAN,r=C.7.7.98,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.7.98,fa=HP-UX_B.11.11_32/64
             Ignite-UX.IGNT-JPN-E-MAN,r=C.7.7.98,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.7.98,fa=HP-UX_B.11.11_32/64
             Ignite-UX.IGNT-JPN-S-MAN,r=C.7.7.98,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.7.98,fa=HP-UX_B.11.11_32/64
             Ignite-UX.MGMT-TOOLS,r=C.7.7.98,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.7.98,fa=HP-UX_B.11.11_32/64
             Ignite-UX.RECOVERY,r=C.7.7.98,a=HP-UX_B.11.11_32/64,v=HP,fr=C.7.7.98,fa=HP-UX_B.11.11_32/64
       * Selection succeeded.

       * Beginning Analysis and Execution
       * Session selections have been saved in the file
         "/.sw/sessions/swinstall.last".
       * "tifa:/":  There will be no attempt to mount filesystems that
         appear in the filesystem table.
       * The execution phase succeeded for "tifa:/".
       * Analysis and Execution succeeded.

NOTE:    More information may be found in the agent logfile using the
         command "swjob -a log tifa-0017 @ tifa:/".
=======  01/02/09 00:27:41 CST  END swinstall SESSION (non-interactive)
         (jobid=tifa-0017)
NOTE:    Restarting using updated Ignite-UX commands...
       * Creating NFS mount directories for configuration files.
       * Recovery Archive Name = 2009-01-02,00:27
       * Lanic Id  = 0xCA65FD9224B9
       * Ignite-UX Server = zx6000

=======  01/02/09 00:27:42 CST  Started /opt/ignite/bin/make_net_recovery. (Fri
         Jan 02 00:27:42 CST 2009)
         @(#)Ignite-UX Revision C.7.7.98
         @(#)ignite/net_recovery (opt) Revision:
         /branches/IUX_RA0809/ignite/src@75250 Last Modified: 2008-08-25
         11:39:14 -0600 (Mon, 25 Aug 2008)
       * Testing for necessary pax patch.
       * Recovery Archive Description = Recovery Archive
       * Recovery Archive Location    =
         zx6000:/var/opt/ignite/recovery/archives/tifa
       * Number of Archives to Save   = 1
       * Pax type  = tar
NOTE:    Command 'exclude /stand' has no effect because essential files
         override this command.
        In?     dsk/vg  name                    minor#  Associated disks/mountpoints
        1       v       /dev/vg00               0x00    /dev/dsk/c0t0d0s2
                                                /dev/vg00/lvol1 /stand  1
                                                /dev/vg00/lvol2
                                                /dev/vg00/lvol3 /       2
                                                /dev/vg00/lvol4 /opt    0
                                                /dev/vg00/lvol5 /tmp    0
                                                /dev/vg00/lvol6 /usr    1
                                                /dev/vg00/lvol7 /var    0
                                                /dev/vg00/lvol8 /home   0
        ** 0 - The Volume Group or Filesystem is Not included in the
               System Recovery Archive
        ** 1 - The Volume Group or Filesystem is Partially included in the
               System Recovery Archive
        ** 2 - The Volume Group or Filesystem is Fully included in the
               System Recovery Archive
       * Checking Versions of Recovery Tools
       * Scanning system for IO devices...
       * Boot device is: 0/0/0/0.0.0
       * Creating System Configuration.
       * /opt/ignite/bin/save_config -f /var/opt/ignite/recovery/client_mnt/0xC
         A65FD9224B9/recovery/2009-01-02,00:27/system_cfg vg00
       * Backing Up Volume Group /dev/vg00
       * /usr/sbin/vgcfgbackup /dev/vg00
       * Creating Map Files for Volume Group /dev/vg00
       * /usr/sbin/vgexport -s -p -m /etc/lvmconf/vg00.mapfile /dev/vg00
       * Creating Control Configuration.
       * Creating Archive File List
       * Creating Archive Configuration
       * /opt/ignite/lbin/make_arch_config -c /var/opt/ignite/recovery/client_m
         nt/0xCA65FD9224B9/recovery/2009-01-02,00:27/archive_cfg -g /var/opt/ig
         nite/recovery/client_mnt/0xCA65FD9224B9/recovery/2009-01-02,00:27/flis
         t -n 2009-01-02,00:27 -r ipf -b 64 -d Recovery\ Archive -L
         /var/opt/ignite/recovery/arch_mnt -l
         zx6000:/var/opt/ignite/recovery/archives/tifa -i 1 -m t
       * Saving the information about archive to
         /var/opt/ignite/recovery/previews
       * Creating The Networking Archive
       * /opt/ignite/data/scripts/make_sys_image -d
         /var/opt/ignite/recovery/arch_mnt -t n -s local -n 2009-01-02,00:27 -m
         t -w /var/opt/ignite/recovery/client_mnt/0xCA65FD9224B9/recovery/2009-
         01-02,00:27/recovery.log -u -R -g /var/opt/ignite/recovery/client_mnt/
         0xCA65FD9224B9/recovery/2009-01-02,00:27/flist -a 3516090
       * Preparing to create a system archive.
       * The archive is estimated to reach 1758045 kbytes.
       * Free space on /var/opt/ignite/recovery/arch_mnt
         after archive should be about 7629027 kbytes.
       * Archiving contents of tifa via tar to
          /var/opt/ignite/recovery/arch_mnt/2009-01-02,00:27.
       * Creation of system archive complete.
       * Creating CINDEX Configuration File
       * /opt/ignite/bin/manage_index -q -c 2009-01-02,00:27\ Recovery\ Archive
         -i /var/opt/ignite/recovery/client_mnt/0xCA65FD9224B9/CINDEX -u
         Recovery\ Archive

=======  01/02/09 00:48:37 CST  make_net_recovery completed successfully!

While the backup was running, the mounted NFS file systems can be observed in the Ignite-UX server.

# showmount -a zx6000
tifa.americas.local:/var/opt/ignite/recovery/archives/tifa
tifa.americas.local:/var/opt/ignite/clients

And in a new session in the Ignite-UX client using bdf and ll commands.

# bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    1048576  323344  719576   31% /
/dev/vg00/lvol1    1835008  145768 1676144    8% /stand
/dev/vg00/lvol7    10485760 4539856 5900256   43% /var
/dev/vg00/lvol6    8388608 2726640 5617784   33% /usr
/dev/vg00/lvol5     524288   16736  503592    3% /tmp
/dev/vg00/lvol4    8388608 4685960 3673744   56% /opt
/dev/vg00/lvol8     106496    8496   97240    8% /home
zx6000:/var/opt/ignite/clients
                   12574720 3276760 8716912   27% /var/opt/ignite/recovery/client_mnt
zx6000:/var/opt/ignite/recovery/archives/tifa
                   12574720 3276760 8716912   27% /var/opt/ignite/recovery/arch_mnt


# ll /var/opt/ignite/recovery/arch_mnt
total 113696
-rw-------   1 bin        sys        115818496 Jan  2 00:31 2009-01-02,00:27

# ll /var/opt/ignite/recovery/arch_mnt
total 873512
-rw-------   1 bin        sys        893075456 Jan  2 00:48 2009-01-02,00:27

After the make_tape_recovery completes sucessfully, the NFS client mount is not released.

# bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    1048576  323344  719576   31% /
/dev/vg00/lvol1    1835008  145768 1676144    8% /stand
/dev/vg00/lvol7    10485760 4539872 5900240   43% /var
/dev/vg00/lvol6    8388608 2726640 5617784   33% /usr
/dev/vg00/lvol5     524288   16728  503600    3% /tmp
/dev/vg00/lvol4    8388608 4685960 3673744   56% /opt
/dev/vg00/lvol8     106496    8496   97240    8% /home
zx6000:/var/opt/ignite/clients
                   12574720 4131832 7915280   34% /var/opt/ignite/recovery/client_mnt

And the same situation manifest in the Ignite-UX server.

# showmount -a zx6000
tifa.americas.local:/var/opt/ignite/clients

Note that there aren't any make_tape_recovery process in the system. The file system can be manually unmounted.

# umount /var/opt/ignite/recovery/client_mnt

# bdf
Filesystem          kbytes    used   avail %used Mounted on
/dev/vg00/lvol3    1048576  323344  719576   31% /
/dev/vg00/lvol1    1835008  145768 1676144    8% /stand
/dev/vg00/lvol7    10485760 4539872 5900240   43% /var
/dev/vg00/lvol6    8388608 2726640 5617784   33% /usr
/dev/vg00/lvol5     524288   16728  503600    3% /tmp
/dev/vg00/lvol4    8388608 4685960 3673744   56% /opt
/dev/vg00/lvol8     106496    8496   97240    8% /home

Subsequent runs of the make_net_recovery command on the clients with the -u option did unmounted the client NFS connection.

Diagnose

The reason for this is that in make_net_rec.c (function version_checks) the code that tests on the return code of check_version (along with if the -u option was used) calls update_tools. If Ignite-UX is update the make_net_recovery command is exec'ed again.

Because the client directory is currently mounted when exec'ed again make_net_recovery has code in it to say that it should not umount the client directory if it was already mounted when make_net_recovery started.

The program needs to umount the client directory just before make_net_recovery gets exec'ed again if it was the program responsible for mounting the client directory.

Reference

Authors

This page was last modified on 22 July 2011, at 17:37. This page has been accessed 2,460 times.