From: Kai Krakow <hurikhan77@gmail.com>
To: linux-btrfs@vger.kernel.org
Subject: Re: commands like "du", "df", and "btrfs fs sync" hang
Date: Mon, 9 May 2016 20:20:15 +0200 [thread overview]
Message-ID: <20160509202015.1ed10049@jupiter.sol.kaishome.de> (raw)
In-Reply-To: CAD=QJKjfmpb9_b3s6kh6CaAOKLRLZkD5pRryxC3R7iiuA8rvAQ@mail.gmail.com
Am Mon, 9 May 2016 13:13:53 -0400
schrieb Nicholas D Steeves <nsteeves@gmail.com>:
> On May 7, 2016 7:43 AM, "Kai Krakow" <hurikhan77@gmail.com> wrote:
> >
> > Am Thu, 5 May 2016 08:35:37 +0200
> > schrieb Kai Krakow <hurikhan77@gmail.com>:
> >
> > > Am Tue, 3 May 2016 08:48:14 +0200
> > > schrieb Kai Krakow <hurikhan77@gmail.com>:
> > >
> [...]
> [...]
> > > [...]
> [...]
> [...]
> > >
> > > With the snapshot and sync related bits disabled in my script, I
> > > no longer experience freezing df/du/... commands.
> >
> > Ah well, I still do - it just triggers much less often.
> >
> > But I can track it down to the automounter now: As soon as I stop
> > the automounter of my backup device, du/df/etc no longer hang.
> > Still I'm not sure if the problem is originating from btrfs or
> > autofs itself.
>
> Hi Kai,
>
> If it's anything like what I've encountered it can be worked around
> with careful use of sleep, sync, btrfs sub sync and/or btrfs fi sync.
> Also, if it's a similar issue to my own then from what I've read on
> this list it's a timing or race issue (or maybe a locking issue).
> There's a Debian bug where someone is testing out different
> values/strategies. The values/strategy I use can be found in
> btrfs-borg on github. If I'm correct, you'll probably also need to
> script in delays to things time to settle with your automounter.
>
> Of course, ideally someone will one day spend the time debugging
> what's actually going on.
Thanks for the pointer... Maybe I could just remove the idle timeout of
the automount unit, so it never tries to automatically unmount once
mounted. Tho, I prefer if it did that. I don't want the backup FS being
online all of the time.
Maybe such a race results from btrfs still doing background work (like
removing snapshots) while there is no longer a user of the mount point
running (processes terminated) - and now, when systemd's automounter
tries to unmount, it doesn't work and autofs hangs.
If I know experience hanging processes, I can simply "systemctl restart
mnt-usbdevice.automount" and the hanging processes start to work again.
--
Regards,
Kai
Replies to list-only preferred.
next prev parent reply other threads:[~2016-05-09 18:20 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
2016-05-01 7:00 commands like "du", "df", and "btrfs fs sync" hang Kai Krakow
2016-05-01 12:47 ` Duncan
2016-05-01 13:54 ` Mike Fleetwood
2016-05-01 23:16 ` Duncan
2016-05-01 16:54 ` Kai Krakow
2016-05-01 23:22 ` Duncan
2016-05-01 23:49 ` Duncan
2016-05-02 13:19 ` Austin S. Hemmelgarn
2016-05-03 6:44 ` Kai Krakow
2016-05-02 0:23 ` Duncan
2016-05-02 13:13 ` Austin S. Hemmelgarn
2016-05-03 15:09 ` Duncan
2016-05-02 0:39 ` Nicholas D Steeves
2016-05-03 6:48 ` Kai Krakow
2016-05-05 6:35 ` Kai Krakow
2016-05-07 11:40 ` Kai Krakow
2016-05-09 17:13 ` Nicholas D Steeves
2016-05-09 18:20 ` Kai Krakow [this message]
-- strict thread matches above, loose matches on Subject: below --
2016-05-01 10:22 Kai Krakow
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=20160509202015.1ed10049@jupiter.sol.kaishome.de \
--to=hurikhan77@gmail.com \
--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).