Replication of an entire ZFS storage pool.
All of the volumes contained in a single ZFS storage pool need to be configured into their own SNDR replica. This list can be derived using the output of "zpool status <pool-name>"
When ZFS uses the entire volume (as is the case in most situations), all ZFS data is placed in slice 0. /dev/rdsk/c?t?d?s0 of the volume being configured. If partial volumes are configured, be careful to specify the individual slice being used.
Bitmap volumes are needed for each replica, that size of which is derived by using 'dsbitmap -r <volume-name>".
Provision bitmaps volumes on SSDs, cached arrays, RAID-1 or RAID-10 volumes. Avoiding using RAID-Z or RAID-5 storage, due to the high I/O cost of flipping one or more bits.
At SNDR create time, use the "g <group>" option, or after the fact with the "-R g <group> [set]" option with sndradm, placing all replicas for a single ZFS storage pool in a the same SNDR I/O consistency group.
NOTE: When SNDR replicas are configured before the ZFS storage pool is created, use "sndradm -E ...", verses "sndradm -e ...", avoiding the cost in both time and network resources to synchronize all volumes in the ZFS storage pool, volumes which essential contain no data.
Examples of using both forms of SNDR enable follow.
Using sndradm -E
[on primary host]
zpool create <pool-name> <vdev1> ... <vdev'n'>
zpool status
[ keep list of all vdevs configured]
zpool destroy <pool-name>
dsbitmap -r <vdev1>
[ keep output of required bitmap volume size depending on type]
[provision 'n' bitmap volumes, based on size returned from dsbitmap]
[on secondary host]
zpool create <pool-name> <vdev1> ... <vdev'n'>
zpool status
[ keep list of all vdevs configured]
zpool destroy <pool-name>
[ keep output of required bitmap volume size depending on type]
[provision 'n' bitmap volumes, based on size returned from dsbitmap]
[on primary host]
sndradm -E <primary-hostname> <vdev1> <bitmap1> <secondary-hostname> <remote-vdev1> <remote-bitmap1> ip async g <pool-name>
.
.
sndradm -E <primary-hostname> <vdev'n'> <bitmap'n'> <secondary-hostname> <remote-vdev'n'> <remote-bitmap'n'> ip async g <pool-name>
zpool create <pool-name> <vdev1> ... <vdev'n'>
[on secondary host]
sndradm -E <primary-hostname> <vdev1> <bitmap1> <secondary-hostname> <remote-vdev1> <remote-bitmap1> ip async g <pool-name>
.
.
sndradm -E <primary-hostname> <vdev'n'> <bitmap'n'> <secondary-hostname> <remote-vdev'n'> <remote-bitmap'n'> ip async g <pool-name>
[note: zpool create not done on secondary, as the ZFS storage pool from the SNDR primary is replicated here by SNDR]
[on primary host]
sndradm -g <pool-name> -nu
Using sndradm -e
[on primary host]
zpool status
[ keep list of all vdevs configured]
dsbitmap -r <vdev1>
[provision 'n' bitmap volumes based on size returned from dsbitmap]
[on secondary host]
zpool create <pool-name> <vdev1> ... <vdev'n'>
zpool status
[ keep list of all vdevs configured]
zpool destroy <pool-name>
[provision 'n' bitmap volumes based on size returned from dsbitmap]
[on primary host]
sndradm -e <primary-hostname> <vdev1> <bitmap1> <secondary-hostname> <remote-vdev1> <remote-bitmap1> ip async g <pool-name>
.
.
sndradm -e <primary-hostname> <vdev'n'> <bitmap'n'> <secondary-hostname> <remote-vdev'n'> <remote-bitmap'n'> ip async g <pool-name>
[on secondary host]
sndradm -e <primary-hostname> <vdev1> <bitmap1> <secondary-hostname> <remote-vdev1> <remote-bitmap1> ip async g <pool-name>
.
.
sndradm -e <primary-hostname> <vdev'n'> <bitmap'n'> <secondary-hostname> <remote-vdev'n'> <remote-bitmap'n'> ip async g <pool-name>
[note: zpool create not done on secondary, as the ZFS storage pool from the SNDR primary is replicated here by SNDR]
[on primary host]
sndradm -g <pool-name> -nu
Caution: Only "zpool import <pool-name>" a replicated storage pool, when SNDR replication is in logging mode. Make sure to "zpool export <pool-name>" a replicated storage pool before resuming SNDR replication. Failure to adhere to this requirement may lead to ZFS detectable corruption, or a system panic. ZFS is not a shared filesystem, and an actively replicating ZFS storage pool is being shared.
Please read the sndradm(1m)man page, and the complete AVS documentation at http://docs.sun.com/app/docs?p=coll%2FAVS4.0