简体   繁体   English

在Linux中将实时文件镜像到NAS

[英]Real-Time File Mirroring in Linux to a NAS

Can anyone tell how I might best mirror selected files and folders to a NAS, (Network Addrssable Storage) box from a Linux workstation in real-time? 谁能告诉我如何最好地将选定的文件和文件夹从Linux工作站实时镜像到NAS(可添加网络存储)盒?

These are very large files, (> 50GB) and are being continually modified, so I would only like to change those portions of the files that have been changed, added or deleted. 这些是非常大的文件(> 50GB),并且会不断进行修改,因此我只想更改文件中已更改,添加或删除的部分。

FYI: These files are actually Virtual Box virtual hard disk (VDI) files. 仅供参考:这些文件实际上是Virtual Box虚拟硬盘(VDI)文件。

I discovered that my Synology DS211J NAS can run an RSync service. 我发现Synology DS211J NAS可以运行RSync服务。 So I enabled that and used lsyncd for the live mirror... the VirtualBox VMs... all works very well. 因此,我启用了该功能,并将lsyncd用于实时镜像... VirtualBox VM ...都运行良好。

Rsync only synchronises the parts of files that have change and so is very efficient at synchronising large files. Rsync仅同步有更改的文件部分,因此在同步大文件时非常有效。

Of the solutions that @awm mentioned, only drbd provides block-level, realtime synchronization. @awm提到的解决方案中,只有drbd提供了块级的实时同步。 The other tools will meet your goal of only propagating deltas, but they operate asynchronously. 其他工具将满足您仅传播增量的目标,但它们异步运行。 In fact, rsync will work just as well in this case, since you're not trying to provide bi-directional synchronization. 实际上,在这种情况下, rsync也可以正常工作,因为您没有尝试提供双向同步。

For drbd to provide block-level replication, you need need to install the drbd kernel modules and userspace tools on both the workstation on the NAS...which means this solution is only appropriate if your NAS is actually a fairly generic Linux box over which you have a great deal of control. 为了使drbd提供块级复制,您需要在NAS上的两个工作站上都​​安装drbd内核模块和用户空间工具...这意味着该解决方案仅在您的NAS实际上是相当通用的Linux机器上才适用。您有很多控制权。

Before hand I just want to suggest that you don't do this. 在此之前,我只想建议您不要这样做。 You can easily bottlenet your network and NAS and cause all sorts of problem on your host. 您可以轻松地对网络和NAS进行瓶颈连接,并在主机上造成各种问题。

That being said, these claim they can do it: Unison can be found at: http://www.cis.upenn.edu/~bcpierce/unison/ PeerSoft can do it too: http://www.peersoftware.com/products/peersync/peersyncserver/overview.aspx Maybe - http://www.drbd.org/ 话虽这么说,这些声称他们可以做到这一点:齐奏可以在这里找到http://www.cis.upenn.edu/~bcpierce/unison/ PeerSoft可以做到这一点: http://www.peersoftware.com/ products / peersync / peersyncserver / overview.aspx也许-http : //www.drbd.org/

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM