xfs增量备份不适合新的磁盘

我在Amazon EBS上有一个1TB的xfs卷,它包含246GB增量备份,使用rsync和hardlinking创build。 我想把它复制到一个新的,更小的磁盘。

问题是它似乎不适合300GB的磁盘。 有没有我可以调查或任何大小? 我最近删除了700GB的备份,我需要清除一些东西吗? 我正在使用cp -R在已安装的卷之间进行复制

使用cp -R复制你的硬链接数据是删除硬链接。

$ du -sh one/ two/ 140M one 4.0K two $ cd one ~/one$ ln file1 file2 ~/one$ ls -s total 285280 142640 file1 142640 file2 $ cd .. $ du -sh one two 140M one 4.0K two 

此时ls显示两个140MB文件,但是它们很难链接,所以du报告只有140MB的使用。

 $ cp -R ../one/* two/ $ du -sh one two 140M one 279M two 

这显示cp -R不保留硬链接状态。

(或至less一个)正确的复制方法是再次使用rsync和-H(或–hard-links)参数。

 rsync -avPH one/ three sending incremental file list ./ file2 146058808 100% 185.43MB/s 0:00:00 (xfer#1, to-check=0/3) file1 => file2 sent 146076781 bytes received 47 bytes 292153656.00 bytes/sec total size is 292117616 speedup is 2.00 $ ls -s three/ total 285272 142636 file1 142636 file2 $ du -sh three 140M three