ZFS Networker: Difference between revisions
From Lolly's Wiki
Jump to navigationJump to search
No edit summary |
No edit summary |
||
Line 14: | Line 14: | ||
The structure of my RGs is always: | The structure of my RGs is always: | ||
<pre> | |||
RG: <name>-rg | RG: <name>-rg | ||
ZFS-HASP: <name>-hasp-zfs-res | ZFS-HASP: <name>-hasp-zfs-res | ||
Logical Host: <name>-lh-res | Logical Host: <name>-lh-res | ||
Logical Host Name: <name>-lh | Logical Host Name: <name>-lh | ||
</pre> | |||
So I use scripts like this: | So I use scripts like this: | ||
Line 50: | Line 52: | ||
# cat /nsr/res/sample.res | # cat /nsr/res/sample.res | ||
type: savepnpc; | type: savepnpc; | ||
precmd: "/local/sample-rg/ | precmd: "/local/sample-rg/nsr/networker_precmd.sh >/local/sample-rg/nsr/networker_precmd.log 2>&1"; | ||
pstcmd: "/local/sample-rg/ | pstcmd: "/local/sample-rg/nsr/networker_pstcmd.sh >/local/sample-rg/nsr/networker_pstcmd.log 2>&1"; | ||
timeout: "12:00pm"; | timeout: "12:00pm"; | ||
abort precmd with group: Yes; | abort precmd with group: Yes; | ||
</source> | |||
Of course our sample.res is just a link: | |||
<source lang=bash> | |||
# ls -al /nsr/res/TEST_TEAM.res | |||
lrwxrwxrwx 1 root root 40 Sep 5 2014 /nsr/res/sample.res -> /local/sample-rg/nsr/res/sample.res | |||
</source> | </source> |
Revision as of 09:03, 15 September 2014
Kategorie:ZFS Kategorie:Solaris
Backup of ZFS snapshots on Solaris Cluster with Legato/EMC Networker
First of all: 1. Install Solaris client package LGTOclnt 2. Register new resource type in cluster. One one node do:
# clrt register -f /usr/sbin/LGTO.clnt.rtr LGTO.clnt
Now you have a new resource type LGTO.clnt in your cluster.
The structure of my RGs is always:
RG: <name>-rg ZFS-HASP: <name>-hasp-zfs-res Logical Host: <name>-lh-res Logical Host Name: <name>-lh
So I use scripts like this:
# RGname=sample-rg
# clrs create \
-t LGTO.clnt \
-g ${RGname} \
-p Resource_dependencies=$(basename ${RGname} -rg)-hasp-zfs-res \
-p clientname=$(basename ${RGname} -rg)-lh \
-p Network_resource=$(basename ${RGname} -rg)-lh-res \
-p owned_paths=/local/${RGname} \
$(basename ${RGname} -rg)-nsr-res
This expands to:
# clrs create \
-t LGTO.clnt \
-g sample-rg \
-p Resource_dependencies=sample-hasp-zfs-res \
-p clientname=sample-lh \
-p Network_resource=sample-lh-res \
-p owned_paths=/local/sample-rg \
sample-nsr-res
Now we have a client name to which we can connect: sample-lh
What we need now is a resource definition in our Networker directory like this:
# cat /nsr/res/sample.res
type: savepnpc;
precmd: "/local/sample-rg/nsr/networker_precmd.sh >/local/sample-rg/nsr/networker_precmd.log 2>&1";
pstcmd: "/local/sample-rg/nsr/networker_pstcmd.sh >/local/sample-rg/nsr/networker_pstcmd.log 2>&1";
timeout: "12:00pm";
abort precmd with group: Yes;
Of course our sample.res is just a link:
# ls -al /nsr/res/TEST_TEAM.res
lrwxrwxrwx 1 root root 40 Sep 5 2014 /nsr/res/sample.res -> /local/sample-rg/nsr/res/sample.res