linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Josh Berry <des@condordes.net>
To: Chris Ball <cjb@laptop.org>
Cc: Sage Weil <sage@newdream.net>, David Nicol <davidnicol@gmail.com>,
	kreijack <kreijack@libero.it>,
	linux-btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: Updating the wiki pages adding btrfs command
Date: Wed, 15 Sep 2010 16:46:14 -0700	[thread overview]
Message-ID: <AANLkTimySR7R9tkwQNDKxJ9gb_+6XK7VK_Chys0r_Bec@mail.gmail.com> (raw)
In-Reply-To: <m3wrqmljkr.fsf@pullcord.laptop.org>

On Wed, Sep 15, 2010 at 15:37, Chris Ball <cjb@laptop.org> wrote:
=2E..
> =C2=A0 > Why not just do:
> =C2=A0 > # btrfs subvolume delete /path/to/subvolume1
> =C2=A0 > # btrfs subvolume delete /path/to/subvolume2
> =C2=A0 > # sync
>
> Or even better, "btrfs filesystem sync <path>".
>
> I'm assuming that the caller wants to wait until the subvol delete
> has happened, but is unwilling to wait until all other writes to the
> FS have finished, and is even more unwilling to wait for all writes
> on the rest of the system to finish.
>
> I don't know whether that's actually a reasonable/plausible use case,
> though.

I think so, because I have that use case (sorta).  I have a home
fileserver with btrfs, and a cron job on that machine runs hourly,
taking snapshots.  However, once the disk fills up, I want to delete
the oldest snapshots:

while [[ disk > xx% full ]]; do
    btrfs subvol delete /the/oldest/snapshot
    wait for space to free up
done

If delete does not wait to free space, I'll delete too many snapshots.
 But if I force a filesystem-wide sync after every delete, the loop
may take longer, which on a system busier than mine could take more
than the hour to complete.

-- Josh
--
To unsubscribe from this list: send the line "unsubscribe linux-btrfs" =
in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

      reply	other threads:[~2010-09-15 23:46 UTC|newest]

Thread overview: 21+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2010-09-12 19:40 reserving an IOCTL number; other details David Nicol
2010-09-12 22:08 ` David Nicol
2010-09-13 17:23   ` Goffredo Baroncelli
2010-09-13 20:15     ` David Nicol
2010-09-13 20:19       ` David Nicol
2010-09-13 20:22       ` Goffredo Baroncelli
2010-09-14 19:25       ` Updating the wiki pages adding btrfs command [Was Re: reserving an IOCTL number; other details] Goffredo Baroncelli
2010-09-15 14:10         ` David Nicol
2010-09-15 17:51           ` Goffredo Baroncelli
2010-09-15 18:35             ` David Nicol
2010-09-15 19:29               ` Goffredo Baroncelli
2010-09-15 18:41           ` Josh Berry
2010-09-15 20:54             ` David Nicol
2010-09-15 21:07               ` Updating the wiki pages adding btrfs command Chris Ball
2010-09-15 21:46                 ` Josh Berry
2010-09-15 21:52                   ` Chris Ball
2010-09-15 22:19                     ` Josh Berry
2010-09-15 22:31                     ` Sage Weil
2010-09-15 22:33                       ` Sage Weil
2010-09-15 22:37                       ` Chris Ball
2010-09-15 23:46                         ` Josh Berry [this message]

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=AANLkTimySR7R9tkwQNDKxJ9gb_+6XK7VK_Chys0r_Bec@mail.gmail.com \
    --to=des@condordes.net \
    --cc=cjb@laptop.org \
    --cc=davidnicol@gmail.com \
    --cc=kreijack@libero.it \
    --cc=linux-btrfs@vger.kernel.org \
    --cc=sage@newdream.net \
    /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).