[16] | 1 | #!/bin/ksh |
---|
| 2 | # @(#)53 1.5 src/avs/fs/mmfs/ts/config/nsddevices.sample, mmfs, avs_rgpfs24, rgpfs240610b 8/9/04 16:51:23 |
---|
| 3 | ############################################################################## |
---|
| 4 | # |
---|
| 5 | # When properly installed, this script is invoked by the |
---|
| 6 | # /usr/lpp/mmfs/bin/mmdevdiscover script. |
---|
| 7 | # |
---|
| 8 | # INSTALLATION GUIDELINES FOR THIS SCRIPT: |
---|
| 9 | # |
---|
| 10 | # a) edit this script using the configuration guidelines below |
---|
| 11 | # b) copy this script to /var/mmfs/etc/nsddevices |
---|
| 12 | # c) ensure this script is executable (chmod +x /var/mmfs/etc/nsddevices) |
---|
| 13 | # |
---|
| 14 | # DESCRIPTION OF NSD DEVICE DISCOVERY: |
---|
| 15 | # |
---|
| 16 | # The mmdevdiscover script and conversely this script are invoked by |
---|
| 17 | # the mmfsd daemon when it tries to discover or verify physical |
---|
| 18 | # devices previously defined to GPFS with the mmcrnsd command. These |
---|
| 19 | # scripts identify devices found in the /dev file system on the local |
---|
| 20 | # machine that may correlate to NSDs defined to GPFS. |
---|
| 21 | # |
---|
| 22 | # GPFS uses the list of devices output by these scripts in mapping |
---|
| 23 | # the NSD name listed in the configuration database to a local device |
---|
| 24 | # in the /dev file system. When an NSD is created via the mmcrnsd |
---|
| 25 | # command it is marked with a unique identifier written to sector |
---|
| 26 | # two of the device. This unique identifier is recorded in the |
---|
| 27 | # configuration database along with the user recognizable NSD name. |
---|
| 28 | # |
---|
| 29 | # During GPFS disk discovery each device name output by mmdevdiscover |
---|
| 30 | # and nsddevices is opened in turn and sector two of each device is |
---|
| 31 | # read. If a match between an NSD identifier on the device and an |
---|
| 32 | # identifier recorded in the configuration database is found, then |
---|
| 33 | # this machine has local access to the NSD device. I/O is thus |
---|
| 34 | # subsequently performed via this local /dev interface. |
---|
| 35 | # |
---|
| 36 | # CONFIGURATION AND EDITING GUIDELINES: |
---|
| 37 | # |
---|
| 38 | # If this script is not installed then disk discovery is done |
---|
| 39 | # only via the commands listed in mmdevdiscover. |
---|
| 40 | # |
---|
| 41 | # If this script is installed and returns a NON ZERO return code |
---|
| 42 | # then the disk discovery commands listed in mmdevdiscover will ALSO |
---|
| 43 | # be run. |
---|
| 44 | # |
---|
| 45 | # If this script is installed and returns a ZERO return code |
---|
| 46 | # then the disk discovery commands listed in mmdevdiscover will NOT |
---|
| 47 | # be run. |
---|
| 48 | # |
---|
| 49 | # The output from both this script and nsddevices is a number |
---|
| 50 | # of lines in the following format: |
---|
| 51 | # |
---|
| 52 | # deviceName deviceType |
---|
| 53 | # |
---|
| 54 | # where (deviceName) is a device name such as (hdisk1) |
---|
| 55 | # and (deviceType) is a set of known disk types. Consult |
---|
| 56 | # |
---|
| 57 | # /usr/lpp/mmfs/bin/mmdevdiscover |
---|
| 58 | # |
---|
| 59 | # for a list of currently known deviceTypes |
---|
| 60 | # |
---|
| 61 | # Example output: |
---|
| 62 | # |
---|
| 63 | # hdisk1 hdisk |
---|
| 64 | # hdisk2 hdisk |
---|
| 65 | # |
---|
| 66 | ############################################################################## |
---|
| 67 | |
---|
| 68 | osName=$(/bin/uname -s) |
---|
| 69 | |
---|
| 70 | if [[ $osName = Linux ]] |
---|
| 71 | then |
---|
| 72 | : # Add function to discover disks in the Linux environment. |
---|
| 73 | fi |
---|
| 74 | |
---|
| 75 | if [[ $osName = AIX ]] |
---|
| 76 | then |
---|
| 77 | : # Add function to discover disks in the AIX environment. |
---|
| 78 | fi |
---|
| 79 | |
---|
| 80 | # To bypass the GPFS disk discovery (/usr/lpp/mmfs/bin/mmdevdiscover), |
---|
| 81 | # return 0 |
---|
| 82 | |
---|
| 83 | # To continue with the GPFS disk discovery steps, |
---|
| 84 | # return 1 |
---|