Shared file system and NFS data synchronization

Source: Internet
Author: User
Tags rsync

Shared file system and NFS data synchronization

1 , a single NFS the shortcomings

under normal circumstances, when NFS when the number of clients is small, NFS There is no problem with performance; NFS The number of servers is too high, and is the kind of operations that read and write more frequently, the results are not what we expect.

single Nfs This architecture has a single point of failure in addition to performance problems, once this nfs server fails, all apps that share data are no longer available, consider using rsync nfs service backup, but this is not helpful for improving the performance of the entire system. Based on such a requirement, we need to optimize the nfs server to add a single nfs adjusted to multiple nfs nfs

2 , Multilayer NFS Simple Architecture

Master NFS server to the first tier NFS device for file synchronization, first and second tier NFS device for file synchronization. Such a cluster of NFS packets can greatly improve the performance and robustness.

3 , Multilayer NFS Data Synchronization

There are two common methods of synchronization, one is the upper layer pushed down the way, the other is the lower level to the top of the initiative to initiate the request to obtain the way;

These two methods are mainly based on the actual business situation of choice, you can also develop their own programs to achieve synchronization and distribution of files, flexibility is quite high.

4 , using NFS Sharing Server for file synchronization

1 , Configuration NFS

# Service Portmapstart

# Service NFS Start

#vi/etc/exports

/home/rsync/img * (rw,sync,no_root_squash) # #rw : Permission to read and write; Sync : Data is synchronously written into memory; No_root_squash : Log in to NFS If the host user is ROOT user, he uses a ROOT the Permissions

# Exportfs - RV # # re-load the settings

2 , Load NFS shared directory before loading, first use SSH connect the two machines so you don't have to verify , then write to /etc/fstab in the file, OK up.

Mount-t NFS 10.0.0.12:/home/rsync/img/home/rsync/img

written in the last: Method a file exists simultaneously on two machines, with real-time, security, but only suitable for the environment that does not perform deleted files; method two files exist only in NFS on the server, if mates rsync Server scheduled backup to another place, in the event of a failure can be manually restored, is also a good choice.

Shared file system and NFS data synchronization

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.