On 2015-11-09 22:11, Glen H wrote:
On Mon, Nov 9, 2015 at 8:50 AM, Austin S Hemmelgarn
<ahferro...@gmail.com> wrote:
On 2015-11-08 16:28, Glen H wrote:

Hi,

I really enjoy the features of btrfs but send|receive is failing me so
my backups are not working.  I'm using "btrbk" to backup my drives
(all local) and one of the three subvolumes errors out.  When I run
this command from the terminal it errors out:

btrfs send /mnt/ssd/_btrbk_snap/@.20151108 | btrfs receive
/mnt/backup2tb/

At subvol /mnt/ssd/_btrbk_snap/@.20151108
At subvol @.20151108
ERROR: send ioctl failed with -2: No such file or directory
ERROR: unexpected EOF in stream.

Have you ever run any kind of data deduplication (bedup, duperemove, or
something else) on the source filesystem?  I've seen errors like this in the
past when trying to send from a filesystem that I had run deduplication on
(and I don't think that the patches to fix it made into the version of Mint
you're using).

That aside, there are two things that I've found that can fix some (but not
all) send/receive errors:
1. Run a balance on the filesystem (either a full balance, or use filters to
select just the block in question).
2. Force the file that it's choking on to be re-written (you can use 'btrfs
receive -vv' to see what files it's processing, although be prepared for _a
lot_ of output).

Thanks Austin for the suggestions.  I haven't done any deduping, it is
a pretty fresh install too (two weeks old).  I tried a full balance a
few times:

# btrfs balan /
Done, had to relocate 28 out of 28 chunks
# btrfs balan /
Done, had to relocate 28 out of 28 chunks

After balancing the first time should there be less to rebalance the
second time?
Not usually, unless you had a lot of chunks that were partially full.

I tried receive -vv and then deleted the file that was causing the
issue but running again the issue happens on a different file:

...
utimes var/lib/sudo/hertz
truncate var/lib/sudo/hertz/2 size=40
chown var/lib/sudo/hertz/2 - uid=0, gid=1000
chmod var/lib/sudo/hertz/2 - mode=0600
utimes var/lib/sudo/hertz/2
mkfile o189735-35-0
truncate o189735-35-0 size=0
chown o189735-35-0 - uid=1000, gid=1000
chmod o189735-35-0 - mode=0600
ERROR: unexpected EOF in stream.
When I see this type of error on my system, it's usually with multiple files, and deleting/rewriting each one sequentially does eventually fix it.

I'm not using any kind of raid.  Do you think reformatting the
partition or something else might help?  Should I try to upgrade the
kernel?
Reformatting would definitely fix it, although that of course means you have to restore from a backup or re-install the system. Upgrading the kernel probably won't fix the issue (in this case it appears to be something in the on-disk structures), but it should make it less likely to happen again.

Attachment: smime.p7s
Description: S/MIME Cryptographic Signature

Reply via email to