Re: Negative qgroup sizes

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Alin Dobre posted on Thu, 01 May 2014 14:32:55 +0100 as excerpted:

> I am having trouble with one of the btrfs subvolumes, as it shows
> negative quota accounting values

> Running a "btrfs quota rescan -w /tmp/test" seems to fix it, but it
> seems to come back pretty often (happened twice in the last couple of
> days).

> The kernel we are using is 3.14.1 (stable) and the btrfs-progs version
> is 3.12.

I'm not a qgroups user myself, but I know there were quite some 
complaints about negative numbers some months ago.  I hadn't seen any in 
awhile and had hoped the problems were all fixed, but now you're 
reporting them again, so I guess not.

Tho you are slightly outdated on your btrfs-progs version, 3.14.1 being 
current.  But I think the code in question is kernel code and the progs 
simply report it, so I don't think that can be the problem in this case.

The earlier recommendation, back when the problem reports were common, 
was not to use qgroups on btrfs as the code obviously wasn't accounting 
for something correctly.  Either use btrfs without qgroups, or if you 
really need quotas, use some other filesystem where the quota code works 
reliably.

As for the problems themselves, I saw some patches go by that fixed 
qgroups issues related to snapshot maintenance, and it's possible there's 
more work to do in that area.  The problem there is apparently due to the 
difficulty in properly accounting quotas for shared data, such that 
deleting old snapshots could turn things negative as the code subtracted 
the quota numbers repeatedly, once for each snapshot deleted, instead of 
properly figuring out what was shared and only subtracting for the data 
unique to that snapshot when it was deleted.

So if you are doing snapshots, you can try not doing them (switching to 
conventional backup if necessary) and see if that stabilizes your 
numbers.  If so, you know there's still more problems in that area.

Of course if the subvolumes involved aren't snapshotted, then the problem 
must be elsewhere, but I do know the snapshotting case /is/ reasonably 
difficult to get right... while staying within a reasonable performance 
envelope at least.

-- 
Duncan - List replies preferred.   No HTML msgs.
"Every nonfree program has a lord, a master --
and if you use the program, he is your master."  Richard Stallman

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




[Index of Archives]     [Linux Filesystem Development]     [Linux NFS]     [Linux NILFS]     [Linux USB Devel]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux SCSI]

  Powered by Linux