Apparent issues with quotas and snapshots

This isn’t a Rockstor bug, but may be a BTRFS bug.

In my own testing I found that the btrfs-cleaner service would hang while consuming a full core of CPU after deleting a snapshot. This also creates the condition where btrfs send/receive will hang, and trying to create or delete any additional snapshots will hang.

Working through this on the BTRFS mailing list it was supposed that the issue may be related to quotas if I’m using them. The suggestion was not to use quotas yet because they’ve been a consistent source of bugs and problems.

In testing I was able to correlate the use of quotas to these problems with snapshots. When all qgroups and deleted and quotas are disabled, I have been able to create and delete large amounts of snapshots without issue.

Unfortunately quotas are used in the Rockstor GUI to display certain information so turning off quotas does break certain GUI functionality. Creating NFS shares is broken for example. In my case I’m using snapshots with send/receive to perform backups so I’m just working around what I’ve broken in the GUI for now.

Final thought is to pass on the recommendation from the mailing list about avoiding quotas, which would mean consider re-writing some things to remove the dependency on quotas.

1 Like

@seijirou Thanks for sharing your experience with quotas. My experience has been the same, especially with the 4.0+ kernels. It’s easy to trigger quota related errors that breaks I/O or deleting snapshots. It’s causing ripple effects that pop up while using Rock-ons, scheduled snapshots etc… I am very familiar with the behavior and anticipating two scenarios

  1. If quota codes is temporarily deprecated, then we lose Share resize functionality and size reporting of Shares. The cost we pay is obvious in terms of feature loss, but the troubles of quota related features are outweighing the benefits.

  2. I am hoping that 4.2 fixes a lot of quota related problems. From what I can tell, the patches have made substantial changes. But I am skeptical if these changes will fix everything or if we need to wait a couple more releases. I want to test the 4.2 rc kernel one of these days.

@suman Is there any update on this situation?

@koendb

Quotas are still problematic and Rockstor is essentially at the mercy of the BTRFS devs on this one. I’d suggest joining the BTRFS mailing list to get some news on the status of various BTRFS things if you want to know what rockstor has to work with.

2 Likes

Quotas are OK in BTRFS already, but the file system specifics raise certain problems:
https://btrfs.wiki.kernel.org/index.php/Quota_support#Known_issues
And there are some limits too…

Still, quotas are much better solution to control space usage than shares limitations, and Rockstor should probably go this way.