Hi,

I would like to try to break my teeth on a small ( hopefully) project that is missing for me in the OpenBSD kernel.

A way to have live mirror of pre determine directory, or may be if that's easier to implement, full partition(s).

The idea is to configure a directory on a master server to copy the file that are change in it's monitor directory to one or multiple other server(s) in the same directory structure.

It's possible to do this via cronjob and rsync, etc. But that sure increase the load a lots if you want near live mirroring.

I am looking more at suggestion of concept, to get this started. Like what part of the kernel would be best to look at to do this? May be a file(s) in the kernel that would be more suitable for this idea. Via hooks, or other ways? May be using ctime flags, or something else?

SO, what I am thinking is that the setup would be a master and slave where the ssh keys are already setup that no password is needed to have the files scp over the slave unit. Then each time the kernel save a file in a partition if that's easier to check, or a directory structure, then fire up the process of copying that changed file to the preset slave.

This way, continuous live mirroring can be done and no need for cronjob, etc. And this would be much more efficient as well.

May be from the kernel side it can simply send a message to a privilege separation daemon that only get the file name to copy and then do it's business, so on the kernel side, the impact would be minimal I would think.

This might be stupid as well, so these are my thoughts and I am looking if possible to get some idea on the concept of doing so, or suggestion to do it differently if what I am thinking here is stupid.

Then I want to try to write the daemon and the hook(s) to my custom kernel to do this, if that's the best way to achieve this live mirroring process.

If the results are good, I would be more then happy to offer it under BSD license if that's judge to be any good.

Any ideas or suggestions for this would be more then welcome, either on list or off lists if that's to much noise and of no interest to anyone.

I want to think of the best way to do this and get ideas exchange more then noise.

Thanks for your time if you read it until here.

If this is off topic or not call for, I apologies for it and that's the end of this tread, if not, I would very much want to ear ideas, on or off list.

Regards,

Daniel

Reply via email to