I'm facing some issue while syncing data using lsyncd. I'm working on a project to migrate data from a source S3 bucket to target S3 bucket. Both buckets has been configured via AWS storage gateway and shared to Linux servers as nfs shares.
The data size on below servers are:
Server A : approx 2 TB
Server B : approx 8 TB
Server C : approx 25 TB
NFS shares :
Server A : (src-nfsshare1, tgt-nfsshare2)
Server B : (src-nfsshare3, tgt-nfsshare4)
Server C : (src-nfsshare5, tgt-nfsshare6)
Our approach of data migration is, to mount the source S3 (src nfs share x) and target S3 (tgt nfs share x) on each server.
I've used tar command to copy the initial full copy of data which was quite quicker than rsync.
It took me 2 months to complete the full copy process. Now, I've setup lsyncd to replicate the delta data as soon as the source have new/updated data. I preferred lsyncd preffered over rsync (scheduling via cron).
Now, for "Server A" it works fine. I can see the logs are updating and showing the data being updated.
Logs Server A:
Lsyncd Configuration:
- Increased the below value from default to 150000 which worked for me. Reason, getting error "Consider increasing /proc/sys/fs/inotify/max_user_watches" while lsyncd initiating the sync.
But for server B and C, though lsyncd doesn't throw any error but I think there is some issue. Actually, the server has been started since yesterday but seems it is not doing anything.
Lsyncd configuration for server B & C is same a above (only the src & tgt paths are different).
Here I set inotify watches a little high because till 500000, it was failing.
Lsyncd logs for Server A & B are same:
Its more than 25 hours but nothing logged in the log files. /etc/lsyncd.status file also blank. Can anybody shade light on this?
Also, I'm looking to add other rsync option with lsyncd (i.e. --stats, --progress or --progress2=info). How can I do that?
How to redirect the errors which occurred during file syncing operation (i.e. io errors or timeout errors) to a separate log file?
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
FWIW (many very little):
I tried lsyncd (for a short time) before but it seemed a bit overly complex to me, so I just run my own rsync scripts via crontab and have had no problems.
Yes, the count of files in the source directory and subsequent sub-directories are in millions for sure, though I don't know the exact count. Mostly, the file types are jpg,png, pdf and xml. There are 2 scripts used to run from cron, one script used to delete 1 year older data from the source on daily basis. Another one used to pull data from another server on daily basis. So I would say there are lot of changes happen in the source on daily basis. But here I want to mention that both scripts used to run in the midnight, 1st one takes approx 2 hours and the 2nd one takes 4-5 hours (got this info from apps team).
--- Post updated at 12:38 AM ---
Thanks Neo for your reply.
Could you please share the rsync and cron setup you used in your usecase? I can give a try with that.
Here is the rsync command which i used to run manually to sync the data.
I used lsyncd to migrate(p2v) servers to minimize downtime when migrating. Had lot's of files(1K-1M).
Like plain rsync it's good for a lot of things. It's very bad for syncing big files which change often(-> big database files), because lsyncd will constantly syncing those big files if only one byte changes. ( I had ~100 smaller mysql databases on some server. This worked fine.)
Worked like charm. You can apply rsync args with rsync/_extra:
Update: Since you copy files from nfs to nfs I recommend to check disabling the Delta-Transfer with -W.
If not lsyncd/rsync will read the whole file from the source-nfs before transferring the 5 (Bytes? MBytes? GBytes?) that have changed.
The above is default, when - like in this case - both source and target path are local(begin with /).
If you have so many files and access it via nfs the initial phase is of course taking long. (I had backup issues of servers with 4-8 million files, took 10-30 hours for an rsync backup to take place even if little changed - and that was with a local source). This should be either with lsyncd or rsync. But I'm curious if plain rsync is faster.
If you just have vanishing many files, this should not cause heavy load.
I think there's not so much difference between lsyncd and rsync. Because the former is just like a wrapper of the latter.
Location: Asia Pacific, Cyberspace, in the Dark Dystopia
Posts: 19,118
Thanks Given: 2,351
Thanked 3,359 Times in 1,878 Posts
Quote:
Originally Posted by arun_adm
Thanks Neo for your reply.
Could you please share the rsync and cron setup you used in your usecase? I can give a try with that.
Here is the rsync command which i used to run manually to sync the data.
I have my rsync command(s) in a crontab script(s), like so, for example:
... where my script sync_dumps contains an rsync command set up for my particular case.
If the files have not changed, rsync will log and exit, of course.
This is a classic "polling" versus "pushing" problem, and I prefer to keep this simple with rsync and cron. The frequency of my backups is based on my risk model and my risk model for this instance says that backing up to a remote server once a day is fine. Your risk model may be different and requires a different backup frequency.
FWIW, I never (rarely, is a better word, I guess) use additional processes to perform tasks which I can perform in a more simpler way, so I use rsync and not lsyncd, but that's just me. I like simple. It's easily to maintain, update and troubleshoot if there are problems (or port to a new server when a datacenter change is required).
Hi, i have to configure postfix in this mode:
- if i receive a mail from a@a.a relay to
- if i receive a mail NOT from a@a.a relay the mail to user "test" that is on localhost
For the first rule i do this in main.cf:
sender_dependent_default_transport_maps = hash:/etc/postfix/sender_check... (0 Replies)
I have installed openldap-servers package in server machine
i have edited vi /etc/openldap/ldap.conf
i have added following line
BASE dc=abcd,dc=com
URI ldap://ldap.abcd.com ldap://ldap-master.abcd.com:666
i have restarted the ldap service
then client pc i have installed... (0 Replies)
I have an RS/6000 running AIX 5.3. I would like to get either dhcp client working or assigning it an ip would be fine as well. I have tried using smit to do it many times trying different things, and I can get an ip assigned but it doesn't communicate with the network or internet. I haven't been... (3 Replies)
HEllo,
I try to Launch OOO, but I have X configuration problem.
I 'm searching in man pages but if someone can help me...
Of course I set the DISPLAY as explain in the man page but with no more result: setenv DISPLAY myws:0
Thanks in advance (1 Reply)
Can anyone please tell me anything about the following:
AIX O/S - IBM RS6000 server
I want to know where I can go to check and see how much RAM is intalled in the server, how many Processors are installed in the server, and how I can run a sar command to show me processor statistics?
I... (4 Replies)