linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: "Austin S. Hemmelgarn" <ahferroin7@gmail.com>
To: Tomasz Torcz <tomek@pipebreaker.pl>, linux-btrfs@vger.kernel.org
Subject: Re: [PATCH] btrfs-progs: add option to run balance as daemon
Date: Mon, 11 Jul 2016 07:17:28 -0400	[thread overview]
Message-ID: <63dba99e-cf1c-63f5-bee6-548270b7a653@gmail.com> (raw)
In-Reply-To: <20160711072612.GA1417185@mother.pipebreaker.pl>

On 2016-07-11 03:26, Tomasz Torcz wrote:
> On Tue, Jun 21, 2016 at 11:16:59AM -0400, Austin S. Hemmelgarn wrote:
>> Currently, balance operations are run synchronously in the foreground.
>> This is nice for interactive management, but is kind of crappy when you
>> start looking at automation and similar things.
>
>   It can be done with simplest systemd unit file:
> btrfs-balance@.service:
> ---
> [Unit]
> Description=btrfs balance for %I
>
> [Service]
> ExecStart=/usr/bin/btrfs balance start %I
> ExecStop=/usr/bin/btrfs balance cancel %I
> ---
>
>   It automates quite nicely and needs no additional code.
>
It's also entirely dependent on a couple of things:
1. You're running systemd (not everyone is, I'm certainly not).
2. You're only dealing with the local system.

The type of situation I'm thinking of is dealing with non-local systems. 
  For example, running something like this:
ssh user@remotehost btrfs balance start --background /
Keeping the SSH connection open for the duration of the balance has 
issues for some people (may close without keep-alive set, uses network 
bandwidth with keep-alive set, many people who are hosted have bandwidth 
quotas still), and it's extremely useful to have the option to fire and 
forget.

  reply	other threads:[~2016-07-11 11:17 UTC|newest]

Thread overview: 14+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2016-06-21 15:16 [PATCH] btrfs-progs: add option to run balance as daemon Austin S. Hemmelgarn
2016-07-11  1:44 ` Satoru Takeuchi
2016-07-26 17:07   ` David Sterba
2016-07-26 17:25     ` Austin S. Hemmelgarn
2016-07-11  7:26 ` Tomasz Torcz
2016-07-11 11:17   ` Austin S. Hemmelgarn [this message]
2016-07-11 16:58     ` Tomasz Torcz
2016-07-12 12:25       ` Austin S. Hemmelgarn
2016-07-12 15:22         ` Duncan
2016-07-12 18:25           ` Austin S. Hemmelgarn
2016-07-13  4:39         ` Andrei Borzenkov
2016-07-13 11:57           ` Austin S. Hemmelgarn
2016-07-13 16:38 ` David Sterba
2016-07-13 16:59   ` Austin S. Hemmelgarn

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=63dba99e-cf1c-63f5-bee6-548270b7a653@gmail.com \
    --to=ahferroin7@gmail.com \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=tomek@pipebreaker.pl \
    /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).