help for aix script

hi all i want help to write the script thatti check rmt drive serial number if the same in two site Production and HA, the recomended like the follwing:

The : AIX script to set up tape devices on OS to be identical on both nodes
- define a rule, according to the renaming of the tape devices on AIX will occur (this is for a case when the library(s) get changed, so that the script can handle that too)
- the comparison of the tape devices should be on one side on the tape library, through tapeutil, on the other side on AIX

Recommended steps
- list smcX devices and divide them according to their serials (you can route data in text files temporary )
- call tapeutil with one smcX device for each library and list the drives (you can route data in text files temporary )
- list the drives on AIX and compare them with the ones from the tapeutil command to see all are present
- define a rule/naming convention to differentiate the drives and robot of the seperate libraries. I'll give one example, you can define your own, if you like.
for example the libraries: smcX_L<library series number (manual setting), or other unique identification based on HW data, like serial number>
this would mean for example: smc0_L1
smc1_L1
smc2_L1
smc3_L1
smc0_L2
smc1_L2
smc2_L2
smc3_L2

            for example the drives: L&lt;library series number, as  above&gt;_&lt;drive serial's last five \(or more\) character&gt;_&lt;drive  series number&gt;
                    this would mean for example:         L1\_12435_01
                                                    L1\_12435_02
                                                    ...
                                                    ...
                                                    L1\_21342_01
                                                    ...
                                                    L2\_32211_01
                                                    ...
            The drives series numbers are to see the different paths  to a drive, the library series number is to see the drives association  to libraries \(example 2\), and which robot paths are present for                  a library \(example 1\).
    - Rename the devices accordingly.
    - Check for accuracy.

Because of the device name changes on AIX, on TSM, paths, drives and libraries will have to be redefined after this change, one last time again.
any on ehave an idea about this?

where do you need help? what have you done so far? it is not our work to write a script for you! show us what you've done and where you need help...

hi,
i do two scripts one for rmt device and the other for smc device and list them succfully now i want to compare if the serial number is the same on each sites between aix and tapeutil?
the scripts are:

for i in 0 1 2 3 4 5 6 7
do
echo "**********lscfg output**************" >> serials2.txt
lscfg -vl smc$i >> serials2.txt
echo "**********itdt output***************" >>serials2.txt
./itdt -f /dev/smc$i inquiry 80 >> serials2.txt
echo "****************************" >> serials2.txt 
done

and the same for rmt

I'd like to help out here...but I can't figure out what you need or why you would do this.

"Because of the device name changes on AIX"...Are you trying to rename the AIX devices? You don't want /dev/rmt0?

Or are you trying to rename the TSM drive names?

hi ,
thx for replay,
about my script is to compare the serials numbers of each rmt and smc devices on aix and from tapeutil, now i want to:

  • Rename the devices accordingly.
    - Check for accuracy.

any idea please , i am not fluent on aix