This commit is contained in:
2024-10-14 00:08:40 +02:00
parent dbfba56f66
commit 1462d52e13
4572 changed files with 2658864 additions and 0 deletions

File diff suppressed because it is too large Load Diff

View File

@@ -0,0 +1,81 @@
#!/bin/bash
# define vsan
VSAN=2
# file with aliasnames and pwwns
# servername_port pwwn
ALIASPWWN=./fcalias_pwwn.txt
# files with zone definitions
# servername-storagename
ZONES=./zones.txt
# create unique zoneset name
ZONESET="ZONES_"`date +%Y%m%d`"_"`date +%H%M`
# convert alias definitions to all lower case
cat $ALIASPWWN | tr [A-Z] [a-z] > /tmp/aliaspwwn
cat /tmp/aliaspwwn > $ALIASPWWN
# convert zone definitions to all lower case
cat $ZONES | tr [A-Z] [a-z] > /tmp/zones
cat /tmp/zones > $ZONES
echo conf t
echo !~~~~~~~~~~ Aliase ~~~~~~~~~~
for LINE in `cat $ZONES | tr [A-Z] [a-z]`
do
SERVER=`echo $LINE | cut -d"-" -f 1`
STORAGE=`echo $LINE | cut -d"-" -f 2`
echo $SERVER >> /tmp/alias
echo $STORAGE >> /tmp/alias
done
cat /tmp/alias | sort -u > /tmp/aliases
rm /tmp/alias
for LINE in `cat /tmp/aliases`
do
HOST=`cat $ALIASPWWN | grep $LINE | awk '{print $1}' | sort -u`
for I in `echo $HOST`
do
echo "fcalias name $I vsan $VSAN"
PWWN=`cat $ALIASPWWN | grep $I | awk '{print $2}'`
echo " member pwwn $PWWN"
echo ""
done
done
echo !~~~~~~~~~~ 1:1 Zonen ~~~~~~~~~~
for LINE in `cat $ZONES`
do
SERVER=`echo $LINE | cut -d"-" -f 1`
STORAGE=`echo $LINE | cut -d"-" -f 2`
SRV=`cat $ALIASPWWN | grep $SERVER | awk '{print $1}' | sort -u`
STO=`cat $ALIASPWWN | grep $STORAGE | awk '{print $1}' | sort -u`
for I in `echo $SRV`
do
for J in `echo $STO`
do
ZN=`echo zone name "$I"__"$J" vsan $VSAN`
AZN="$AZN $I"__"$J"
echo $ZN
echo " member fcalias $I"
echo " member fcalias $J"
echo ""
done
done
done
echo !~~~~~~~~~~ Zoneset ~~~~~~~~~~
echo "zoneset name $ZONESET vsan $VSAN"
for I in `echo $AZN`
do
echo " member $I"
done
echo "!zoneset activate name $ZONESET vsan $VSAN"
echo "copy running startup"

View File

@@ -0,0 +1,73 @@
#!/bin/bash
VSAN=2
ALIASPWWN=./fcalias_pwwn.txt
echo "SERVER und STORAGES"
cat $ALIASPWWN | awk '{print $1}' | awk -F_ '{print $1}' | sort -u
echo ""
echo "SERVER: [conesx15]"
read SERVER
if [ "$SERVER" == "" ]; then
SERVER=conesx15
fi
echo ""
echo "STORAGE: [constor03]"
read STORAGE
if [ "$STORAGE" == "" ]; then
STORAGE=constor03
fi
echo ""
echo "Server Aliases"
SRV=`cat $ALIASPWWN | grep $SERVER | awk '{print $1}' | sort -u`
echo $SRV
echo ""
echo "Storage Aliases"
STO=`cat $ALIASPWWN | grep $STORAGE | awk '{print $1}' | sort -u`
echo $STO
echo ""
echo ~~~~~~~~~~ Konfiguration ~~~~~~~~~~
for I in `echo $SRV`
do
echo "fcalias name $I vsan $VSAN"
PWWN=`cat $ALIASPWWN | grep $I | awk '{print $2}'`
echo " member pwwn $PWWN"
echo ""
done
for I in `echo $STO`
do
echo "fcalias name $I vsan $VSAN"
PWWN=`cat $ALIASPWWN | grep $I | awk '{print $2}'`
echo " member pwwn $PWWN"
echo ""
done
for I in `echo $SRV`
do
for J in `echo $STO`
do
ZN=`echo zone name "$I"__"$J" vsan $VSAN`
AZN="$AZN $I"__"$J"
echo $ZN
echo " member fcalias $I"
echo " member fcalias $J"
echo ""
done
done
#echo "!zoneset name ZONES_"`date +%Y%m%d`"_"`date +%H%M`" vsan $VSAN"
echo "!Use existing zoneset!"
for I in `echo $AZN`
do
echo " member $I"
done
echo ""

View File

@@ -0,0 +1,61 @@
conesx01_hba1p0 21:00:00:24:ff:4b:b5:ec
conesx01_hba1p1 21:00:00:24:ff:4b:b5:ed
conesx02_hba1p0 21:00:00:24:ff:4b:b5:de
conesx02_hba1p1 21:00:00:24:ff:4b:b5:df
conesx03_hba1p0 21:00:00:24:ff:4b:b5:a2
conesx03_hba1p1 21:00:00:24:ff:4b:b5:a3
conesx04_hba1p0 21:00:00:24:ff:4b:b5:e8
conesx04_hba1p1 21:00:00:24:ff:4b:b5:e9
conesx05_hba1p0 10:00:00:90:fa:8a:0c:9c
conesx05_hba1p1 10:00:00:90:fa:8a:0c:9d
conesx06_hba1p0 10:00:00:90:fa:b5:7a:c9
conesx06_hba1p1 10:00:00:90:fa:b5:7a:d1
conesx07_hba1p0 10:00:00:90:fa:8a:0c:d2
conesx07_hba1p1 10:00:00:90:fa:8a:0c:d3
conesx09_hba1p0 10:00:00:90:fa:90:73:5e
conesx09_hba1p1 10:00:00:90:fa:90:73:5f
conesx11_hba1p0 10:00:00:90:fa:90:7c:be
conesx11_hba1p1 10:00:00:90:fa:90:7c:bf
conesx13_hba1p0 10:00:00:90:fa:90:7a:50
conesx13_hba1p1 10:00:00:90:fa:90:7a:51
conesx15_hba1p0 10:00:00:90:fa:b5:6d:cd
conesx15_hba1p1 10:00:00:90:fa:b5:6d:d5
constor01_cm0ca0p0 50:00:00:e0:d4:6c:3e:80
constor01_cm0ca0p1 50:00:00:e0:d4:6c:3e:81
constor01_cm1ca0p0 50:00:00:e0:d4:6c:3e:90
constor01_cm1ca0p1 50:00:00:e0:d4:6c:3e:91
constor02_cm0ca0p0 50:00:00:e0:d4:6a:2d:80
constor02_cm0ca0p1 50:00:00:e0:d4:6a:2d:81
constor02_cm1ca0p0 50:00:00:e0:d4:6a:2d:90
constor02_cm1ca0p1 50:00:00:e0:d4:6a:2d:91
constor03_cm0ca0p0 50:00:00:e0:da:82:36:20
constor03_cm0ca0p1 50:00:00:e0:da:82:36:21
constor03_cm1ca0p0 50:00:00:e0:da:82:36:30
constor03_cm1ca0p1 50:00:00:e0:da:82:36:31
constor04_cm0ca0p0 50:00:00:e0:da:82:2f:20
constor04_cm0ca0p1 50:00:00:e0:da:82:2f:21
constor04_cm1ca0p0 50:00:00:e0:da:82:2f:30
constor04_cm1ca0p1 50:00:00:e0:da:82:2f:31
contapstorage1_hba0b 50:0a:09:82:89:db:30:64
contapstorage1_hba0d 50:0a:09:81:89:db:30:64
contapstorage2_hba0a 50:0a:09:81:99:db:30:64
contapstorage2_hba0d 50:0a:09:82:99:db:30:64
dionlxaval1n1_hba1p0 10:00:00:90:fa:67:d6:8c
dionlxaval1n1_hba1p1 10:00:00:90:fa:67:d6:8d
dionlxaval1n2_hba1p0 10:00:00:90:fa:67:d4:fe
dionlxaval1n2_hba1p1 10:00:00:90:fa:67:d4:ff
dionlxaval2n1_hba1p0 10:00:00:90:fa:67:d5:22
dionlxaval2n1_hba1p1 10:00:00:90:fa:67:d5:23
dionlxaval2n2_hba1p0 10:00:00:90:fa:67:d9:b2
dionlxaval2n2_hba1p1 10:00:00:90:fa:67:d9:b3
questaxesxold_hba1p0 21:00:00:24:ff:4b:ba:70
questaxesxold_hba1p1 21:00:00:24:ff:4b:ba:71
sfmesx024_hba1p0 21:00:00:1b:32:08:a2:bc
srflxcac01_hba1p0 10:00:00:00:c9:73:83:ea
srflxcac01_hba1p1 10:00:00:00:c9:73:83:eb
srflxcac02_hba1p0 10:00:00:00:c9:73:83:d8
srflxcac02_hba1p1 10:00:00:00:c9:73:83:d9
srfprecac01_hba1p0 10:00:00:00:c9:94:a4:d8
srfprecac01_hba1p1 10:00:00:00:c9:94:a4:d9
srfprecac02_hba1p0 10:00:00:00:c9:94:9d:c0
srfprecac02_hba1p1 10:00:00:00:c9:94:9d:c1

View File

@@ -0,0 +1,58 @@
constor01-constor02
constor03-constor04
conesx01-constor01
conesx01-constor02
conesx01-constor03
conesx01-constor04
conesx02-constor01
conesx02-constor02
conesx02-constor03
conesx02-constor04
conesx03-constor01
conesx03-constor02
conesx03-constor03
conesx03-constor04
conesx04-constor01
conesx04-constor02
conesx04-constor03
conesx04-constor04
conesx05-constor01
conesx05-constor02
conesx05-constor03
conesx05-constor04
conesx06-constor01
conesx06-constor02
conesx06-constor03
conesx06-constor04
conesx07-constor01
conesx07-constor02
conesx07-constor03
conesx07-constor04
conesx09-constor01
conesx09-constor02
conesx09-constor03
conesx09-constor04
conesx11-constor01
conesx11-constor02
conesx11-constor03
conesx11-constor04
conesx13-constor01
conesx13-constor02
conesx13-constor03
conesx13-constor04
conesx15-constor01
conesx15-constor02
conesx15-constor03
conesx15-constor04