<div dir="ltr"><div><div><div><div><div>I'm confusing now...<br><br></div><div>in the test VM and one of my machine, rebuild xfsdump/xfsprogs will make the test work.<br></div><div><br></div>In one of my machine, still got error.<br><br>fw1:/vol/backup/x# ldd /sbin/xfsdump<br>        linux-vdso.so.1 (0x00007fff3f7fe000)<br>        libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007f8c2bf9d000)<br>        libhandle.so.1 => /lib/libhandle.so.1 (0x00007f8c2bd99000)<br>        libattr.so.1 => /lib/x86_64-linux-gnu/libattr.so.1 (0x00007f8c2bb93000)<br>        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007f8c2b976000)<br>        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007f8c2b5cd000)<br>        /lib64/ld-linux-x86-64.so.2 (0x00007f8c2c1b5000)<br>fw1:/vol/backup/x# ldd /sbin/xfsrestore<br>        linux-vdso.so.1 (0x00007fffcee8d000)<br>        libuuid.so.1 => /lib/x86_64-linux-gnu/libuuid.so.1 (0x00007ff53d507000)<br>        libhandle.so.1 => /lib/libhandle.so.1 (0x00007ff53d303000)<br>        libattr.so.1 => /lib/x86_64-linux-gnu/libattr.so.1 (0x00007ff53d0fd000)<br>        libpthread.so.0 => /lib/x86_64-linux-gnu/libpthread.so.0 (0x00007ff53cee0000)<br>        libc.so.6 => /lib/x86_64-linux-gnu/libc.so.6 (0x00007ff53cb37000)<br>        /lib64/ld-linux-x86-64.so.2 (0x00007ff53d71f000)<br><br></div>the xfsdump command I use:<br>xfsdump -v debug -l 0 -o -p 300 -J -F -M test -L test -f test.xfsdump /mnt/backup > xfsdump.log<br></div>the log: <a href="https://mega.co.nz/#!xIhTjD6Y!Gwp_ilW5UyRiqn2DSxPTHM0TH5qBghMlKXAmHoWk2iQ">https://mega.co.nz/#!xIhTjD6Y!Gwp_ilW5UyRiqn2DSxPTHM0TH5qBghMlKXAmHoWk2iQ</a><br><br></div>the xfsrestore command I use:<br>xfsrestore -v debug,tree=nitty -p 300 -J -f test.xfsdump /vol/backup/x/ > xfsrestore.log<br></div>the log: <a href="https://mega.co.nz/#!oZIFWQST!VUY90EZ8XvZDYy9GwF5mqtQVtWNW90Sar5MZhNzGbYI">https://mega.co.nz/#!oZIFWQST!VUY90EZ8XvZDYy9GwF5mqtQVtWNW90Sar5MZhNzGbYI</a><br><br><div><div><div><div><div><br></div></div></div></div></div></div><div class="gmail_extra"><br><div class="gmail_quote">2014-10-30 13:03 GMT+08:00 Dave Chinner <span dir="ltr"><<a href="mailto:david@fromorbit.com" target="_blank">david@fromorbit.com</a>></span>:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><span class="">On Thu, Oct 30, 2014 at 11:07:21AM +0800, Tommy Wu wrote:<br>
> I just create a x86-64 VM (using VirtualBox 4.3.18, under windows 8).<br>
> Install Debian jessie on it. Create a test partition in LVM for testing.<br>
> (so I think it's not hardware issue here)<br>
><br>
> test procedure:<br>
> 1. mkfs.xfs the 1st partition in LVM<br>
> 2. mount  the 1st partition<br>
> 3. extract linux-3.17.tar.xz to the partition<br>
> 4. xfsdump the 1st partition<br>
> 5. mkfs.xfs the 2nd partition in LVM<br>
> 6. mount the 2nd partition<br>
> 7. xfsrestore the dump file to 2nd partition<br>
> 8. compare the file/directory in 2 partitions.<br>
<br>
</span>Partition sizes are roughly a 5GB source and 10GB destination.<br>
<br>
So there's this many files in the fs:<br>
<span class=""><br>
> xfsrestore: 3054 directories and 50556 entries processed<br>
<br>
</span>OK, so on 3.18-rc2:<br>
<span class=""><br>
> root@debian:/mnt/xfsdump# mount /dev/debian/xfsrestore /mnt/xfsrestore<br>
> root@debian:/mnt/xfsdump# cd /mnt/xfsrestore/<br>
> root@debian:/mnt/xfsrestore# xfsdump -l 0 -o -p 300 -J -F -M test -L test -<br>
> /mnt/xfsdump | gzip -qv > /mnt/xfsrestore/xfsdump.gz<br>
</span>....<br>
<span class="">> xfsdump: media file size 575648352 bytes<br>
> xfsdump: dump size (non-dir files) : 560258760 bytes<br>
<br>
</span>These are a handful of bytes different.<br>
<span class=""><br>
> xfsdump: dump complete: 21 seconds elapsed<br>
> xfsdump: Dump Status: SUCCESS<br>
>  78.5%<br>
> root@debian:/mnt/xfsrestore# ls -la<br>
> total 120680<br>
> drwxr-xr-x 2 root root        23 Oct 30 10:48 .<br>
> drwxr-xr-x 4 root root      4096 Oct 30 10:37 ..<br>
> -rw-r--r-- 1 root root 123569739 Oct 30 10:48 xfsdump.gz<br>
> root@debian:/mnt/xfsrestore# cat /mnt/xfsrestore/xfsdump.gz | gzip -dqv |<br>
> xfsrestore -p 300 -J -t - | grep xfsrestore<br>
<br>
</span>and the test shows:<br>
<span class=""><br>
> xfsrestore: reading directories<br>
> xfsrestore: 2035 directories and 33045 entries processed<br>
<br>
</span>A thousand less directories and 20000 less files, which doesn't make<br>
much sense for a dump that has a few bytes difference in size.<br>
<br>
So, I've done almost exactly the same test locally (I used the<br>
3.18-rc2 tarball) and on both the upstream 3.18-rc2 kernel and my<br>
current xfs-fixes-for-3.18-rc3 branch I can't reproduce your<br>
problem:<br>
<br>
$  find /mnt/test -type d |wc -l<br>
3080<br>
$  find /mnt/test  |wc -l<br>
51068<br>
$ zcat dump.gz | sudo xfsrestore -p 300 -J - . |grep xfsrestore<br>
.....<br>
xfsrestore: reading directories<br>
xfsrestore: 3080 directories and 51068 entries processed<br>
<span class="">xfsrestore: directory post-processing<br>
xfsrestore: restoring non-directory files<br>
</span>xfsrestore: restore complete: 7 seconds elapsed<br>
xfsrestore: Restore Status: SUCCESS<br>
$ find /mnt/scratch -type d |wc -l<br>
3080<br>
$ find /mnt/scratch |wc -l<br>
51069<br>
$ ls /mnt/scratch<br>
dump.gz  linux-3.18-rc2<br>
$<br>
<br>
Which shows that it's working just fine.  I've tried cold cache<br>
dumps. I've tried crc enabled filesystems, I've tried a bunch of<br>
random permutations, but I cannot get dump/restore to do what you<br>
are seeing it do. Whatever problem you are seeing is specific to<br>
your system.<br>
<br>
Hmmm - can you run 'ldd xfsdump' and 'ldd xfsrestore' and paste the<br>
output for me?<br>
<br>
Can you also please run a full test again on a kernel built from the<br>
current xfs-fixes-for-3.18-rc3 branch, with full dump/restore debug<br>
enabled and send me the output? i.e.<br>
<br>
$ xfsdump -v debug ...<br>
<br>
and<br>
<br>
$ xfsrestore -v debug,tree=nitty ...<br>
<br>
They ar going to produce a lot of output, so please capture it to<br>
files rather than trying to cut/paste output to an email.<br>
<div class="HOEnZb"><div class="h5"><br>
Cheers,<br>
<br>
Dave.<br>
--<br>
Dave Chinner<br>
<a href="mailto:david@fromorbit.com">david@fromorbit.com</a><br>
</div></div></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature"><br>Tommy Wu</div>
</div>