Using rsync for buidling Oracle standbys.
matt at mattmccutchen.net
Thu Sep 3 14:23:24 MDT 2009
On Thu, 2009-09-03 at 10:25 -0700, Saibabu Devabhaktuni wrote:
> We currently use rsync to create an Oracle standby on a target box
> from an existing standby by copying all the datafiles while the source
> standby is in recovery status. We are occasionally running into
> datafile corruptions being reported by oracle when it is recovering
> the new standby. Oracle support says they don't recommend copying
> files while the changes being applied to them unless the database is
> put in backup mode (which is not possible for us).
> We are using "rsync -av --password-file=pass.secret
> source_data_file_name oracle at target::ORCL/"
> We are planning to use "rsync -av --password-file=pass.secret
> --block-size=8192 source_data_file_name oracle at target::ORCL/"
> This is because, we are using 8k block size for Oracle and hence the
> blocks will be copied in full by rsync to avoid fractured block
> copies. Am I correct in this assumption by using "--block-size"
No. --block-size sets the block size for the delta-transfer algorithm;
rsync does not provide a way to set the size of its read(2) calls. And
even if it did, it would appear from the following message that read(2)
calls are not atomic on Linux:
I would recommend looking into a block-device-level snapshot facility
such as LVM snapshots.
(Note: a similar issue was discussed in this thread:
but the non-atomicity of read(2) calls was not considered.)
More information about the rsync