IBM®
Skip to main content
    Country/region [select]      Terms of use
 
 
    
     Home      Products      Services & solutions      Support & downloads      My account     
 
developerworks > My developerWorks >  Dashboard > AIX > ... > AIXV53Howtos > AIXV53resync
developerWorks
Log In   View a printable version of the current page.
Overview Connect Spaces Forums Wikis
AIXV53resync
Added by OneSkyWalker, last edited by OneSkyWalker on Nov 04, 2009  (view change)
Labels: 
(None)

How to automatically resync volume groups on AIX V5.3

A sample syncvg.ksh Korn shell script is available which can be invoked from root's cron:

# Attempt to sync (as appropriate) any volume group with stale partitions every 15 minutes
0,15,30,45 * * * * /usr/local/sbin/syncvg.ksh

When invoked, the shell script will look for volume groups with stale physical partitions. If a volume group has missing hdisks, the shell script will use dd to drive an I/O to each missing hdisk. If I/Os to all missing hdisks are successful (or if there are stale physical partitions but no missing hdisks), the shell script will issue an AIX syncvg command in an attempt to resync the volume group.

Note

Each time the shell script drives an I/O to a missing hdisk, if the hdisk is still unavailable, a SC_DISK_ERR2 (and perhaps other errors) will be written to the AIX error log (displayed using the errpt command), which should be taken into consideration when deciding how often to run the shell script.

By default, the shell script sends notes to the root userid regarding successes and failures. (When invoked by a user in a terminal session (rather than as a cron job), the shell script writes messages to the terminal (rather than sending notes) regarding successes and failures.) The shell script can be configured to send notes to other userids, as well or instead, by changing the:

users="root"                    # List of email addrs to which to send status notes

line in the shell script. To configure AIX so that the shell script can send a note to a user on another host, follow instructions on the How to configure AIX V5.3 to send mail to users on other hosts web page.

Note

If rootvg has missing physical volumes, the shell script must manipulate dump devices, as explained in a note on the How to monitor for issues with dump space on AIX V5.3 web page. The shell script requires that two dump devices be allocated (one defined as primary and one as secondary) rather than a single mirrored dump device, as described on the cited web page. The shell script will fail without warning if both dump devices reside on the same hdisk and that hdisk goes missing.

The contents of this web page solely reflect the personal views of the authors and do not necessarily represent the views, positions, strategies or opinions of IBM or IBM management. Please use the Add Comment link at the bottom of the page to provide feedback. Note: Until you log in (using the link in the upper right corner of this web page), you will not see the Add Comment link and you can not add a comment. If you do not already have an IBM ID, use the Register Now link on the sign in page to obtain one. Registration is quick and easy.


 
    About IBM Privacy Contact