Created 5GB share and put 175GB of data into it can't resize

When I try to resize share …
Created on: June 18th 2024, 6:19:00 pm
Pool (Active mount options / Status): Data-2 (rw,relatime,discard=async,space_cache=v2,subvolid=5,subvol=/)
Pool Quotas: Enabled
Active mount options / Status: rw,relatime,discard=async,space_cache=v2,subvolid=263,subvol=/music

I get error

Error running a command. cmd = /usr/sbin/btrfs qgroup assign 0/263 2015/7 /mnt2/Data-2. rc = 1. stdout = [‘’]. stderr = [‘ERROR: unable to assign quota group: File exists’, ‘’]

Traceback (most recent call last):
File “/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py”, line 41, in _handle_exception
yield
File “/opt/rockstor/src/rockstor/storageadmin/views/share.py”, line 279, in put
share_pqgroup_assign(share.pqgroup, share)
File “/opt/rockstor/src/rockstor/fs/btrfs.py”, line 1563, in share_pqgroup_assign
return qgroup_assign(share.qgroup, pqgroup, share.pool.mnt_pt)
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
File “/opt/rockstor/src/rockstor/fs/btrfs.py”, line 1632, in qgroup_assign
raise e
File “/opt/rockstor/src/rockstor/fs/btrfs.py”, line 1580, in qgroup_assign
run_command([BTRFS, “qgroup”, “assign”, qid, pqid, mnt_pt], log=False)
File “/opt/rockstor/src/rockstor/system/osi.py”, line 289, in run_command
raise CommandException(cmd, out, err, rc)
system.exceptions.CommandException: Error running a command. cmd = /usr/sbin/btrfs qgroup assign 0/263 2015/7 /mnt2/Data-2. rc = 1. stdout = [‘’]. stderr = [‘ERROR: unable to assign quota group: File exists’, ‘’]

Space free - 0 bytesSpace used - 174.13 GBSize 5.00 GB

This is a single disk pool with no RAID.

Details

Created on: June 18th 2024, 6:24:43 pm
Btrfs Raid configuration: single (Data: single - Metadata: single)
Active mount options / Status: rw,relatime,discard=async,space_cache=v2,subvolid=5,subvol=/
UUID: 17bdb4a4-4c79-4e0b-9686-a135683dfb32

Compression / Extra mount options / Quotas

Compression algorithm: no
Extra mount options: None
Quotas Enabled

uname -r is 6.4.0-150600.21-default

Is this a feature or a bug? Is this where Quotas come in to play? What is going to happen to my share when you fix quotas?

@Stevek Hello again.
Re:

We currently don’t enforce quota limits (Share size), but without quotas enabled we get less space usage info from btrfs. Hence 175 GB into a 5 GB share. We have then enabled by default for the extra info they give. Early on we did enforce quotas, but they were flaky back-then and would regularly give false positives etc. So we maintained their enabled status, added the ability to disable them (with reduced usages info side-effect) and defaulted to no longer enforcing them. This will change in time as they have now had a good few years of development upstream.

Thanks for the detailed report re the error message, this is likely a bug on our part, this code has had little attention for a while. And if reproducible we and issue this and likely fix our mostly cosmetic error message - given we don’t actually enforce these currently.

Both: a future feature (quotas enforcement), a current bug. We indicate in the Web-UI that we don’t yet enforce quota limits. And that all shares have access to the entire pool space.

Once we re-visit our quota support, given it has now been much improved in btrfs, your share will likely refuse writes, at least until it’s currently unenforced size restriction (5 GB) is adjusted as you attempted.

Hope that helps. At least for some context. We can get to investigating this in-time as we do want to re-enable quota enforcement and up our game re catching back-up with up-streams improvements of the past few years. Another option, assuming quotas are enforced and this issue persists, would be to just disable quotas. But this does reduce Share usage info available within the Web-UI.

Thanks for all the explanations. I really helps

three questions please ----
Should I delete the share and recreate it at the right size and reload data since I can’t expand it? or Just wait until it is fixed and expand it then?
Should I post this somewhere as a bug?
What is the best way to make and manipulate partitions with SUSE or Rockstor? I started looking at Parted but is is a little overwheliming. Is there a gui link Easeus Partition Magic?

@Stevek Hello again.
Re:

That is up to you. It makes little difference to the Web-UI and rockstor’s functioning give the none enforcement of quote limits currently.

You have already done so here on the forum: I’ve formalised with attribution here:

That is likely a duplicate of an older one but this could form a clean clear first part of re-introducing a btrfs quote capability - beyond that of just space usage reporting.

We have a few more things in the backgroud to tackle also before we can fully return to quota enforcment but it’s a good frist step I think. Plus it’s a bad user experience, regardless of its harmless nature.

For Rockstor we very strongly advise against all partition use. We simply don’t require them and they just complicate our task so we have very minimum support for btrfs-in-partition and again, strongly advise against their use entirely. The only partitions expected, and required by a Rockstor install are those auto-created by the installer. Beyond that they serve no purpose in Rockstors drive managment and just serve to slow/complicate things. Just remove all partitions on any drives you intend to use and use the bare drive as a data pool member.

Otherwise, in linux, parted is a go-to. But not required for anything in Rockstor. We only provide a capability to remove partitions to return drives to a native Rockstor format. And this helps to keep things simple. The Web-UI also only understand a subset of possible partition types/arrangements. So best to leave well alone on that front. The complexity of parted is due to linux’s capability to support all other OS partition types incidentally.

And remember that btrfs does not require btrfs volulme (Pool in Rockstor speak) members to be the same size - so there is no need to partition slightly, or wildly differing members to have partitions all exactly the same: which is a practice on some other DIY NAS instances. And btrfs can happily use bare drives: removing the need and complexity of the partition layer all-together.

Hope that helps.

2 Likes

@Stevek Hello again.
Re:

Thanks to your feedback we have now addressed the issue created as a result of your feedback in this thread.

5.0.13-0 just released:

is expected to have fix the issue you reported regarding the Share Resize function throwing an error on imported pools.

Hope that helps, and thanks again for the report.

2 Likes

Thanks Phil and crew. I just tested and it works for me.

2 Likes

@Stevek Hello again.

Thanks for the confirmation, much appreciated. In time we are, as discussed earlier in this thread, going to re-enable quota enforcement. So it would be good to have feedback on that when it’s enabled also. Quotas have come a long way since we set-out: and there is also a new tier of simple quotas in btrfs that I’ve yet to get familiar with. It may be we end up adopting that as a configurable option. All depends on resources available, and interest from developers/users really.

Cheers.

2 Likes