Hi folks
We migrated storage from local disk to SAN with:
# rsync -avz /mnt/lvol00045/* /lvol00045
Why there is a difference in size? How to explain this? Do we have inconsistency? What we did wrong?
[...] /dev/mapper/vg01-lvol00045_old 10321208 3930336 6286016 39% /mnt/lvol00045 [...] /dev/mapper/vg01-lvol00045 10321208 3163852 6633068 33% /lvol00045 [...]
kind regards Sven
Sven wrote:
Hi folks
We migrated storage from local disk to SAN with:
# rsync -avz /mnt/lvol00045/* /lvol00045
Why there is a difference in size? How to explain this? Do we have inconsistency? What we did wrong?
[...] /dev/mapper/vg01-lvol00045_old 10321208 3930336 6286016 39% /mnt/lvol00045 [...] /dev/mapper/vg01-lvol00045 10321208 3163852 6633068 33% /lvol00045
did rsync copy .* hidden files ?
do the two file systems have the same block size?
John R Pierce wrote:
Sven wrote:
Hi folks
We migrated storage from local disk to SAN with:
# rsync -avz /mnt/lvol00045/* /lvol00045
Why there is a difference in size? How to explain this? Do we have inconsistency? What we did wrong?
[...] /dev/mapper/vg01-lvol00045_old 10321208 3930336 6286016 39% /mnt/lvol00045 [...] /dev/mapper/vg01-lvol00045 10321208 3163852 6633068 33% /lvol00045
did rsync copy .* hidden files ?
do the two file systems have the same block size?
Rsync would copy hidden files when recursing as a side effect of the -a option. However, the shell is going to expand that '*' before rsync sees the command line and miss any hidden files in the top level directory. I'd probably have done: cd /mnt/lvo100045 rsync -avH . /lvo00045 instead. That gives rsync a directory as a starting point without having to remember the quirks of whether it will or won't create a subdirectory of that name on the target. It also doesn't make sense to use -z for a local file copy and you might need -H if you have hardlinked files on the filesystem.
Hi,
For what it's worth, I always specify my source and target paths as absolute, ending in a slash (/). This has saved me from sneaky mistakes many a time. Next to that, I don't know if your target filesystem is supposed to be an exact copy of the source, but you did not specify --delete which results in rsync not touching any files in the target filesystem that do not match files in the source (ie. file foo exists in target and stays there. with --delete it would be removed). I would secify a sync between an target and source filesystem as follows:
rsync -avPH --delete /sourcefs/directoryA/ /targetfs/directoryA/
I've seen differences in fs sizes when the blocksize or type of filesystem differ from one-another. Always wondered what the exact underlying reason for it was (ie. I don't have a more exact answer ;-)
Kind regards,
Rubin.
Les Mikesell wrote:
John R Pierce wrote:
Sven wrote:
Hi folks
We migrated storage from local disk to SAN with:
# rsync -avz /mnt/lvol00045/* /lvol00045
Why there is a difference in size? How to explain this? Do we have inconsistency? What we did wrong?
[...] /dev/mapper/vg01-lvol00045_old 10321208 3930336 6286016 39% /mnt/lvol00045 [...] /dev/mapper/vg01-lvol00045 10321208 3163852 6633068 33% /lvol00045
did rsync copy .* hidden files ?
do the two file systems have the same block size?
Rsync would copy hidden files when recursing as a side effect of the -a option. However, the shell is going to expand that '*' before rsync sees the command line and miss any hidden files in the top level directory. I'd probably have done: cd /mnt/lvo100045 rsync -avH . /lvo00045 instead. That gives rsync a directory as a starting point without having to remember the quirks of whether it will or won't create a subdirectory of that name on the target. It also doesn't make sense to use -z for a local file copy and you might need -H if you have hardlinked files on the filesystem.
Thanks for feedback.
After doing a little bit research I found that the application (Apache Tomcat) and backup (Veritas NetBackup) was running during the copy job.
What influence have a running Tomcat and NetBackup on rsync? What rsync (running as root) do if there are read-only files?
kind regards Sven
Sven wrote:
Thanks for feedback.
After doing a little bit research I found that the application (Apache Tomcat) and backup (Veritas NetBackup) was running during the copy job.
What influence have a running Tomcat and NetBackup on rsync? What rsync (running as root) do if there are read-only files?
There really isn't such thing as a read-only file in linux. If a file is open for writing by another program you can still write to it though you normally should not to avoid data corruption.
Also if your doing a local copy I suggest not using the -z option as using -z will likely dramatically slow down the sync process. Only use -z if your copying over a slow network link.
Also if your doing multiple syncs and want to keep them in sync I suggest you check out the --delete option as well.
nate
Sven wrote:
Thanks for feedback.
After doing a little bit research I found that the application (Apache Tomcat) and backup (Veritas NetBackup) was running during the copy job.
What influence have a running Tomcat and NetBackup on rsync? What rsync (running as root) do if there are read-only files?
That's generally not a problem, but you'll get a snapshot of changing files, like growing logfiles, and if a file is deleted while still open it will still consume space on the source as seen by 'df' until the application closes it or exits but it won't be copied.
Sven wrote:
Hi folks
We migrated storage from local disk to SAN with:
# rsync -avz /mnt/lvol00045/* /lvol00045
Why there is a difference in size? How to explain this? Do we have inconsistency? What we did wrong?
[...] /dev/mapper/vg01-lvol00045_old 10321208 3930336 6286016 39% /mnt/lvol00045 [...] /dev/mapper/vg01-lvol00045 10321208 3163852 6633068 33% /lvol00045
What does the output of df -i show? It should show the same amount of inodes used regardless of block size.
Dean
mmmm, with this options only you are indicating to rsync don't create a directory name as name of your file, , maybe yoy can try these options :
rsync -arvcu --partial --progress -e "/usr/bin/ssh" orign destiny
I've use these options to trasfer a big data vollume and alwas is OK.
Cheers
2008/11/2 Sven aluoor@gmail.com:
Hi folks
We migrated storage from local disk to SAN with:
# rsync -avz /mnt/lvol00045/* /lvol00045
Why there is a difference in size? How to explain this? Do we have inconsistency? What we did wrong?
[...] /dev/mapper/vg01-lvol00045_old 10321208 3930336 6286016 39% /mnt/lvol00045 [...] /dev/mapper/vg01-lvol00045 10321208 3163852 6633068 33% /lvol00045 [...]
kind regards Sven _______________________________________________ CentOS mailing list CentOS@centos.org http://lists.centos.org/mailman/listinfo/centos