Duplicating file system

Esa Karkkainen freebsd.lists at zxas.fi
Thu Feb 21 13:36:05 UTC 2019


On Thu, Feb 21, 2019 at 07:55:15AM +0100, Polytropon wrote:
> On Wed, 20 Feb 2019 20:59:21 -0700, @lbutlr wrote:
> > I will try cpdup as I have tried rsync already and it is too
> > resource intensive to run it constantly. Even with a 5 minute
> > delay sometimes a task will not finish before the next one
> > starts and then a cascade will bring the system down as more
> > and more processes get stuck.

FWIW, kludgey way of doing this is to run the sync in a "while true"
loop, with a sleep at the end, so then you'll have only one sync active
at the time.

Lock files give also the same result. But then you have to clean up lock
files after boot and start duplication process etc.

> This makes the scenario even more look like a situation where
> a mirrored approach (like software RAID, gmirror) is a good
> solution; writes will happen in quasi-parallel and transparent
> to the writing process, so those race conditions won't appear.

The only negative aspect, that I can think of,  having a mirror between
filesystem and mass storage device does not protect from filesystem
corruption.

Most likely the mirrored approach will be less of an hassle.

Best regards,

Esa

-- 
"In the beginning the Universe was created. This has made a lot of
people very angry and been widely regarded as a bad move."
        -- Douglas Adams 1952 - 2001


More information about the freebsd-questions mailing list