How does rsync detect and react to changes? Does it copy the entire file over it's checksum changed, or does it break files up into sections and checksum portions of the file? Depending on how that works, it my be an ideal situation for a filesystem loaded with many small files... but not as good for a file system with just a few very large files (like databases).
Another way to look at your upcoming migration could be to zero your empty space now, turn on zero_detect, pvmigrate, turn off zero_detect and be done.
If you want to zero your free space while your production app is running, you need to be careful not to completely fill the filesystem, especially if the app adds or grows files at random. There is a 3PAR Thin Conversion Guide for *NIX that has a good solution to this. Basically they loop through creating 1 gig (or any size you like) zero files. They also claim it's more resource friendly to break it up instead of dumping one huge file. Here i the script 3PAR recommends:
Code:
[root@rhel5 /] # mkdir /vcpvv600/zerofree
[root@rhel5 /] # for ((i=0;i<7;++i)) do
> echo Generating file /vcpvv600/zerofree/$i ...
> nice dd if=/dev/zero of=/vcpvv600/zerofree/$i bs=1k count=1m
> done
Generating file /vcpvv600/zerofree/0 ...
1048576+0 records in
1048576+0 records out
Generating file /vcpvv600/zerofree/1 ...
1048576+0 records in
1048576+0 records out
...
Once the zeroing process completes, verify that all of the free space has be written with zeros:
[root@rhel5 /] # df –T /vcpvv600
Filesystem Type 1K-blocks Used Available Use% Mounted on
/dev/mapper/vg--f2t-vcpvv600 ext3 9978408 9978408 0 100% /vcpvv600
Finally, delete the files of zeros:
[root@rhel5 /] # rm –rf /vcpvv600/zerofree
Here is a copy of the full document for anyone interested, seems to be missing from their support site at this time.
Attachment:
File comment: 3PAR Thin Conversion: Linux and Unix
luf2t-wp-09.1[1].pdf [76.32 KiB]
Downloaded 3636 times
Back when I originally wrote this thread, I was on 2.24 and Thin reclamation didn't exist yet. It is nice to go back and recover this wasted space. A lot has changed in the past year and a half. I am looking forward to the next 3 years to seeing the T10 SBC-3 standards ratified and deployed which will introduce new SCSI commands to unmap and reclaim storage automatically.