Unsolved
This post is more than 5 years old
8 Posts
0
912
symdg used in importvg script
Hi,
We have the following script which fail from the begining doing nothing:
1 echo "getting and activate disks from $DG group"
2 for DG in `$PATH_SYMCLI/symdg list|grep PR1_|awk '{print $1}'`
3 do
4 echo "Activate disks from $DG"
5 for DISCO in `$PATH_SYMCLI/symdg show $DG|grep "dev/"|cut -f2 -dr|awk '{print $1}'`
6 do
7 /usr/sbin/chdev -l $DISCO -a pv=yes
8 done
9 done
10 #
11 # Import Volume group
12 #
13 #for VGNAME in `ssh pr1dbci1 lsvg|grep vgpr1sap`
14 for VGNAME in `ssh pr1dbci1 lsvg -o|grep vgpr1sap`
15 do
16 DISCO=`ssh pr1dbci1 lspv |grep "$VGNAME "|head -1|awk '{print $2}'`
17 echo "Import VG: $VGNAME $DISCO"
18 /usr/sbin/importvg -y $VGNAME $DISCO
19 done
Now a sample output from one of failing DG (PR1_SAPDATA):
Standard (STD) Devices (168):
{
--------------------------------------------------------------------
Sym Cap
LdevName PdevName Dev Att. Sts (MB)
--------------------------------------------------------------------
DEV001 N/A 0001 (M) RW 22013
DEV002 N/A 0004 (M) RW 22013
DEV003 N/A 0007 (M) RW 22013
DEV004 N/A 000A (M) RW 22013
}
BCV Devices Locally-associated (168):
{
--------------------------------------------------------------------
Sym Cap
LdevName PdevName Dev Att. Sts (MB)
--------------------------------------------------------------------
BCV007 N/A 0652 (M) RW 22013
BCV008 N/A 0655 (M) RW 22013
BCV009 N/A 0658 (M) RW 22013
BCV010 N/A 065B (M) RW 22013
The script it was working ok untill last week, and in previous log file I can look output for each disk, like hdisk286... In PdevName column it used to be the devices names like this: /dev/rhdisk286... but now it shows like N/A. We noticed that now we got some PVMISSING devices when trying to varyonvg.
I'd appreciate your help.
Thanks,
We have the following script which fail from the begining doing nothing:
1 echo "getting and activate disks from $DG group"
2 for DG in `$PATH_SYMCLI/symdg list|grep PR1_|awk '{print $1}'`
3 do
4 echo "Activate disks from $DG"
5 for DISCO in `$PATH_SYMCLI/symdg show $DG|grep "dev/"|cut -f2 -dr|awk '{print $1}'`
6 do
7 /usr/sbin/chdev -l $DISCO -a pv=yes
8 done
9 done
10 #
11 # Import Volume group
12 #
13 #for VGNAME in `ssh pr1dbci1 lsvg|grep vgpr1sap`
14 for VGNAME in `ssh pr1dbci1 lsvg -o|grep vgpr1sap`
15 do
16 DISCO=`ssh pr1dbci1 lspv |grep "$VGNAME "|head -1|awk '{print $2}'`
17 echo "Import VG: $VGNAME $DISCO"
18 /usr/sbin/importvg -y $VGNAME $DISCO
19 done
Now a sample output from one of failing DG (PR1_SAPDATA):
Standard (STD) Devices (168):
{
--------------------------------------------------------------------
Sym Cap
LdevName PdevName Dev Att. Sts (MB)
--------------------------------------------------------------------
DEV001 N/A 0001 (M) RW 22013
DEV002 N/A 0004 (M) RW 22013
DEV003 N/A 0007 (M) RW 22013
DEV004 N/A 000A (M) RW 22013
}
BCV Devices Locally-associated (168):
{
--------------------------------------------------------------------
Sym Cap
LdevName PdevName Dev Att. Sts (MB)
--------------------------------------------------------------------
BCV007 N/A 0652 (M) RW 22013
BCV008 N/A 0655 (M) RW 22013
BCV009 N/A 0658 (M) RW 22013
BCV010 N/A 065B (M) RW 22013
The script it was working ok untill last week, and in previous log file I can look output for each disk, like hdisk286... In PdevName column it used to be the devices names like this: /dev/rhdisk286... but now it shows like N/A. We noticed that now we got some PVMISSING devices when trying to varyonvg.
I'd appreciate your help.
Thanks,
xe2sdc
2 Intern
2 Intern
•
2.8K Posts
0
October 14th, 2009 08:00
You said the script fails doing nothing but I guess it will print out something. Can you please show script output, too ??
Message was edited by:
Stefano Del Corno
dynamox
2 Intern
2 Intern
•
20.4K Posts
0
October 14th, 2009 10:00
marlon68ve
8 Posts
0
October 14th, 2009 11:00
Thanks,
Allen Ward
2.1K Posts
0
October 14th, 2009 12:00
In our environment I strongly recommend that the guys doing this type of scripting force a symcfg discover at the beginning of the run to ensure they get up to date info every time. Depending on your environment that could add a significant amount of time to the script run, but if you plan for that you can still work around it (e.g. kick off the discover 15 minutes before you are ready to kick off the script).