[CentOS] rsyncing directories - sanity check

Wed Jun 24 18:33:52 UTC 2015
Gordon Messmer <gordon.messmer at gmail.com>

On 06/24/2015 09:42 AM, Tim Dunphy wrote:
> And for
> some reason when the servers were ordered the large local volume ended up
> being /usr when the ES rpm likes to store it's indexes on /var.
> So I'm syncing the contents of both directories to a different place, and
> I'm going swap the large local volume from /usr to /var.

Have you considered just resizing the volumes?  If you're trying to swap 
them with rsync, you're going to have to reboot anyway, and relabel your 
system.  If any daemons are running, you might also corrupt their data 
this way.

> The entire /var partition is only using 549MB:
> rsync: write failed on "/opt/var/log/lastlog": No space left on device (28)

Depending on what UIDs are allocated to your users, lastlog can be an 
enormous sparse file.  You would need to use rsync's -S flag to copy it.