Why not use a function in your .bashrc instead?
Maybe something like this:
function delnode {
if [ -z "$1" ]; then
# Empty $1 positional parameter. Show some help message
echo "delnode <nodename>"
else
# Remove and decommission the node from both primary and replication
servers
dsmadmc -id=<username> -se=<primary server> "rem repln $1" <<<===
Might be tricky to get $1 across to dsmadmc
dsmadmc -id=<username> -se=<primary server> "decom n $1"
dsmadmc -id=<username> -se=<repl server> "rem repln $1"
dsmadmc -id=<username> -se=<repl server> "decom n $1"
fi
}
You can add some more error checking, etc to it. After all, you are deleting
nodes.
---
Szabi Nagy
Systems and Storage Administrator
HFS Backup & Archive Services
________________________________
From: ADSM: Dist Stor Manager <[email protected]> on behalf of Bjørn
Nachtwey <[email protected]>
Sent: 14 December 2018 12:36:36
To: [email protected]
Subject: [ADSM-L] more sophisticated way to delete nodes that are replicated?
Dear all,
i just started to use replication and it looks to be a good approach to
replace the copy pools i till now.
But one point seems to become much more complicated: deleting nodes.
The only way i see up to now takes some steps and two times to log on:
log on to the primary server:
1) rem repln <nodename>
2) decom n <nodename>
log on to the repl server:
3) rem repln <nodename>
4) decom n <nodename>
but how to simplify this?
i tried to put the commands in script, doing step 3 and 4 using command
routing, but it does not work.
So:
Does anybody know a more sophisticated approach?
=> perfectly it would work with a single command / script call :-)
thanks in advance
Bjørn
--
--------------------------------------------------------------------------------------------------
Bjørn Nachtwey
Arbeitsgruppe "IT-Infrastruktur“
Tel.: +49 551 201-2181, E-Mail: [email protected]
--------------------------------------------------------------------------------------------------
Gesellschaft für wissenschaftliche Datenverarbeitung mbH Göttingen (GWDG)
Am Faßberg 11, 37077 Göttingen, URL: http://www.gwdg.de
Tel.: +49 551 201-1510, Fax: +49 551 201-2150, E-Mail: [email protected]
Service-Hotline: Tel.: +49 551 201-1523, E-Mail: [email protected]
Geschäftsführer: Prof. Dr. Ramin Yahyapour
Aufsichtsratsvorsitzender: Prof. Dr. Norbert Lossau
Sitz der Gesellschaft: Göttingen
Registergericht: Göttingen, Handelsregister-Nr. B 598
--------------------------------------------------------------------------------------------------
Zertifiziert nach ISO 9001
--------------------------------------------------------------------------------------------------