Linux - NewbieThis Linux forum is for members that are new to Linux.
Just starting out and have a question?
If it is not in the man pages or the how-to's this is the place!
Notices
Welcome to LinuxQuestions.org, a friendly and active Linux Community.
You are currently viewing LQ as a guest. By joining our community you will have the ability to post topics, receive our newsletter, use the advanced search, subscribe to threads and access many other special features. Registration is quick, simple and absolutely free. Join our community today!
Note that registered members see fewer ads, and ContentLink is completely disabled once you log in.
If you have any problems with the registration process or your account login, please contact us. If you need to reset your password, click here.
Having a problem logging in? Please visit this page to clear all LQ-related cookies.
Get a virtual cloud desktop with the Linux distro that you want in less than five minutes with Shells! With over 10 pre-installed distros to choose from, the worry-free installation life is here! Whether you are a digital nomad or just looking for flexibility, Shells can put your Linux machine on the device that you want to use.
Exclusive for LQ members, get up to 45% off per month. Click here for more info.
We have a nas from Hitachi that will be retiring and moving to a new nas.
On my linux machine called lnx1, I have 5 NFS shares mounted from the Hitachi nas. This is how I am thinking of doing and please advise if there is a better way.
1) mount addtional 5 nfs shares from the new nas on lnx1.
2) copy data from the current mounts to the new mounts. Each night synchronize the data over
3) On date of switch over, just un-mount the nfs shares from both nas after final data copy. Then remount the shares from the new nas to use old directory . Update the IP info in the /etc/fstab
Thanks advance!
TT
Last edited by trackstar2000; 08-23-2017 at 05:53 PM.
rsync is efficient enough that you can do the sync many times per day.
Assuming you have so much data that it will take a while to do the copy, I'd use rsync's bandwidth limit option to restrict how much bandwidth it consumes during the daytime. The, just use ctrl-c to end the rsync process and run an unrestricted rsync during night-time. Note that rsync plays nicely with other software accessing/changing files while it's running. It won't get everything in a single pass that way, of course, but you can just keep on running rsync until it gets everything.
Distribution: Debian /Jessie/Stretch/Sid, Linux Mint DE
Posts: 5,195
Rep:
The bwlimit option is a good suggestion. If not, you might choke your network or your processor.
Rsync really is nice. You can spend an arbitrary long time copying the bulk of the files. Of course the copies will not be completely up-to-date while time elapses. But then you can do just one last rsync copy just before the migration. Those are relatively few files and it is a quick action.
If the nfs shares are equal on both NAS-es you can change the IP address on the new one to the one the old NAS had. After taking the old NAS off-line or changing its IP address of course.
Once you are using your new NAS, you can do an additional rsync -auv to get any files which were changed anyway just before the migration.
Your biggest challenge is not to mix up source and destination during rsync actions.
Once you are using your new NAS, you can do an additional rsync -auv to get any files which were changed anyway just before the migration.
This is risky, even with the -u or --update option.
Better have the last rsync completed before you mount it for regular use.
One tip for rsync options:
in addition to -a you should have -H (keep hardlinks) and --delete (delete deleted files).
If it's possible to log into the destination NAS, it's best to run rsync on it directly (to "pull" files) and use the following options:
Code:
rsync -vaxAXH --delete --bwlimit=7500 ...
Running directly on the destination (as root) is the best way to ensure it's able to fully replicate all file permissions etc. Note that rsync will tell you if it was unable to set anything.
Oh, the bwlimit thing is not needed if the NAS's are using wired gigabit ethernet. I give the example of 7500 as something suitable for fast ethernet (100Mbit).
With gigabit ethernet, though, spinning hard drive speeds just aren't fast enough to eat up more than a small fraction of the available bandwidth.
This is risky, even with the -u or --update option.
Better have the last rsync completed before you mount it for regular use.
One tip for rsync options:
in addition to -a you should have -H (keep hardlinks) and --delete (delete deleted files).
Thank you. I had tested the rsync at home with the -a --delete and it was straight forward. I will try the -H option.
LinuxQuestions.org is looking for people interested in writing
Editorials, Articles, Reviews, and more. If you'd like to contribute
content, let us know.