linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Oliver Freyermuth <o.freyermuth@googlemail.com>
To: 1i5t5.duncan@cox.net, linux-btrfs@vger.kernel.org
Subject: Re: btrfs send extremely slow (almost stuck)
Date: Wed, 7 Sep 2016 00:24:59 +0200	[thread overview]
Message-ID: <0d49b31c-4cab-f36e-dfec-a414a2ed175f@googlemail.com> (raw)
In-Reply-To: <pan$8ec2c$ff524e2$2c7a6f41$1fe67610@cox.net>

Duncan wrote on Mon, 05 Sep 2016 19:14:30 -0700: 
> I had something very similar happen here a few weeks ago, except with my 
> firefox profile dir (I don't run thunderbird, preferring claws-mail, but 
> I do run firefox as my browser).

Indeed, I also note Firefox doing a lot of IO especially if session recovery is enabled,
so I can totally imagine this causing similar issues... 

> My use-case does neither snapshots nor send/receive, however, so it was 
> just the single root subvolume (5).  But there was supposedly a file in 
> that dir according to bash's tab-completion, that would neither list, nor 
> rm, which meant the dir couldn't rm -r either.  (Interestingly enough, rm 
> -i asked if I wanted to rm "weird file" whatever, and weird it indeed was!
> )

Sadly, for me there is / was no file at all "visible", neither via tab nor via 'rm -i'. 

> So I immediately copied all the normal files to a new dir, and deleted 
> the normal files from the problem dir, leaving only the weird one.
> Then I renamed the problem dir in ordered to be able to rename the new 
> dir (with the good files) back to the name firefox expected.

That was exactly my "backup plan" I applied yesterday. In my case, luckily,
I even had a full backup of the profile just a few hours old, so I just took that
to replace the folder with a fresh one after renaming it. 

> Then I decided to see what I could do with the renamed dir.  I believe I 
> rebooted (or umount/mount cycled the filesystem) as well.  I think I had 
> to use the magic-sysrq m/remount-ro key as it refused to umount even from 
> systemd emergency mode.  But here's the interesting part.  At least after 
> the rename and a reboot, it *DID* let me delete (using mc) the dir!  I 
> honestly didn't expect it'd let me, but it did.

For me all the shutdowns went fine (the problem must / may have been present for weeks, 
I only noticed now that btrfs send finally did something - and errored out) 
- and the problem, sadly, was not fixed after any reboot. 
I guess after all for me it was corruption on the directory itself
(or rather its isize), 
while for you it was some other sort of metadata corruption causing 
a "weirdly behaving" file. 

> The difference, however, is that I didn't have any snapshots/subvolumes 
> or other reflinks to the "weird" file, only the one normal hardlink.  So 
> even if it's the same thing, I'm not sure if it'll work for you given the 
> multiple snapshot reflinks to the file, as it did for me with just the 
> one.

I did at least try to delete all snapshots which could reference that file - did not help. 
I also tried running 'btrfs defrag' on that folder, which should have broken up any reflinks, 
this also did not help. 

But luckily (as you can see from my other mail) two "btrfs check --repair" iterations finally
fixed my issue. I hope the experts can figure out something from my uploaded debug info
to prevent such things in the future. 

Thanks a lot in any case for your experience report! 

I hope my "repair experience" from my other mail made from my user's perspective may at some point
of time also be of help to you (even though, I hope, you'll never need it). 

Cheers and thanks again, 
	Oliver

  reply	other threads:[~2016-09-06 22:25 UTC|newest]

Thread overview: 19+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-08-28  3:38 btrfs send extremely slow (almost stuck) Oliver Freyermuth
2016-08-28  7:53 ` Duncan
2016-08-29  2:11 ` Qu Wenruo
2016-08-29  2:12   ` Qu Wenruo
2016-08-31  1:35     ` Jeff Mahoney
2016-08-31  1:54       ` Qu Wenruo
2016-08-29 10:02   ` Oliver Freyermuth
2016-08-30  0:48     ` Qu Wenruo
2016-09-04 21:41       ` Oliver Freyermuth
2016-09-05  5:21         ` Qu Wenruo
2016-09-05 21:29           ` Oliver Freyermuth
2016-09-06  2:13             ` Duncan
2016-09-06 22:24               ` Oliver Freyermuth [this message]
2016-09-06  2:46             ` Qu Wenruo
2016-09-06 21:53               ` Oliver Freyermuth
  -- strict thread matches above, loose matches on Subject: below --
2016-08-28 16:15 Oliver Freyermuth
2016-08-28 21:41 ` james harvey
2016-08-29 17:50   ` Kai Krakow
2017-04-14 15:33 J. Hart

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=0d49b31c-4cab-f36e-dfec-a414a2ed175f@googlemail.com \
    --to=o.freyermuth@googlemail.com \
    --cc=1i5t5.duncan@cox.net \
    --cc=linux-btrfs@vger.kernel.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).