[sclug] Writing files to 2 places at once?

Roland Turner SCLUG raz.fpyht.bet.hx at raz.cx
Fri Mar 3 18:09:02 UTC 2006


On Fri, 2006-03-03 at 15:57 +0000, Sapan Ganguly wrote:

> I have a good question.  First of all here is my situation, I have a
> RHEL3 machine running Oracle, the server is low on disk space (but not
> critical yet) so I've attached a disk array to it.  I've set myself
> the task of moving the Oracle datafiles (about 90 files 2.0Gb or more
> each) to the new disk array without any down time...or maybe a small
> amount of down time, certainly no more than 1 hour.

You've not made clear how critical getting this right is. Does the short
window reflect a technical challenge that you've taken on voluntarily,
or is there a serious impact on the organisation of getting this wrong?

In the latter case, you _don't_ want to be experimenting.

> I've been thinking along thsese lines, all the filesystems involved
> are journalling (ext3), I've also been reading about FAM (File Access
> Monitor) and IMON (Inode Monitor).  I may be barking up the wrong tree
> but what do you all think?  Should I be able to use both or one of
> these tools to let Oracle write to its datafiles in the current
> location and to my new location at the same time?

I don't have the impression that either of these tools gives you
block-level update information, but even if it did, you probably don't
want to bet that you can get a synch algorithm working correctly first
time.

Why not use Oracle's own tablespace replication facilities?

> I've tried an rsync whilst the database is running, the first run took
> ages as expected...but so did the second run, third etc.  I haven't

The time constraint is computational, not I/O. Rsync is calculating a
sliding checksum over every block of every source file and every _byte_
(-boundary) of every destination file on each run. It's ability to save
time on subsequent runs by skipping unchanged files is impaired in this
case because even a single byte change in a 2GB file will change the
mtime and force rsync to have to process the entire file (both source
and destination) to locate the change, if any.

Rsync is also designed to work on files that aren't changing during the
sync operation.

> So, what do you think?  Am I being silly?

Yup. Re-inventing Oracle facilities is a time-honoured tradition amongst
DBAs, but not a wise one.

- Raz



More information about the Sclug mailing list