linux-btrfs.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
From: Arne Jansen <sensille@gmx.net>
To: "matthieu Barthélemy" <bonsouere@gmail.com>
Cc: Linux Btrfs <linux-btrfs@vger.kernel.org>
Subject: Re: working quota example?
Date: Tue, 09 Oct 2012 09:24:46 +0200	[thread overview]
Message-ID: <5073D13E.90101@gmx.net> (raw)
In-Reply-To: <CAK=A7Efzgu8pS0P_i=qK-Fqahb4KENBrV-Fq_FHKHDm-GxCBjA@mail.gmail.com>

On 09.10.2012 09:13, matthieu Barthélemy wrote:
> On Mon, Oct 8, 2012 at 9:51 PM, Arne Jansen <sensille@gmx.net> wrote:
>> On 10/08/12 21:31, matthieu Barthélemy wrote:
>>
>>>
>>> Are there any plan to maybe get a better 'btrfs quota show' output?
>>
>> Definitely. The first priority was to get the kernel part running, when
>> that is settled, we can improve the user mode part. There's also still
>> some work to do to make the tracking qgroups more presentable.
>>
> Yes, and it seems to run well, I confirm that I was able to set a
> quota on a test subvolume and have it trigger as expected.
> 
> But now I'm stuck again, though maybe the problem is as obvious as the
> one that made me post first...
> After having created a file that triggered a "quota exceeded" error, I
> created a snapshot of my subvolume. No problem here.
> Then I tried to remove the original 'big' test file :
> 
> rm: cannot remove `/btrfs/test/bigFile': Disk quota exceeded
> 
> 
> I then tried to delete the snapshot subvol to see if it helped:
> 
> # ./btrfs sub delete /btrfs/test/.snap1/
> Delete subvolume '/btrfs/test/.snap1'
> # rm /btrfs/test/bigFile
> rm: cannot remove `/btrfs/roger/bigFile': Disk quota exceeded
> 
> # ./btrfs qgroup show /btrfs/
> 0/257 1073725440 4096
> 0/261 1073725440 4096
> 
> 261 was the snap that I just removed. Why is it still there?
> 

It may be that the corresponding qgroup does not get removed automatically
with the subvol. So it's not the subvol that's still there, just the qgroup.

> No problem, let's remove it:
> # ./btrfs qgroup destroy 0/261 /btrfs/
> 
> # rm /btrfs/test/bigFile
> rm: cannot remove `/btrfs/test/bigFile': Disk quota exceeded

Do you have a limit on 257?

> 
> # ls -lsha /btrfs/test/
> total 1.0G
>    0 drwxr-xr-x 1 root root   14 Oct  9 09:00 .
> 4.0K drwxr-xr-x 1 root root   10 Oct  8 19:56 ..
> 1.0G -rw-r--r-- 1 root root 1.0G Oct  8 19:58 bigFile
> 
> 
> 
> I have to destroy my subvolume qgroup (0/257) to be able to 'rm' my
> file.  Is this the expected behavior?

In a way. You could just have raised the limit. The problem with cow
filesystems is that a delete actually takes space, even if it gets
freed afterwards when no snapshots are present. The quota code currently
has no special handling for 'rm', though it would obviously be useful.
It is already on the TODO list.

-Arne

> Of course I did something wrong again, but where?
> 
> Thanks for your help,


      reply	other threads:[~2012-10-09  7:24 UTC|newest]

Thread overview: 6+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2012-10-08 12:09 working quota example? matthieu Barthélemy
2012-10-08 13:01 ` Arne Jansen
     [not found]   ` <CAK=A7Ee84dXpc4DenR7-Sn8UPG-qTiRRS0fdvRCWT+hF1bPaSQ@mail.gmail.com>
2012-10-08 19:48     ` matthieu Barthélemy
2012-10-08 19:51     ` Arne Jansen
2012-10-09  7:13       ` matthieu Barthélemy
2012-10-09  7:24         ` Arne Jansen [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=5073D13E.90101@gmx.net \
    --to=sensille@gmx.net \
    --cc=bonsouere@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).