Can't change share size

When I try to change share size on my disks, I get this:

        Traceback (most recent call last):

File “/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py”, line 40, in _handle_exception
yield
File “/opt/rockstor/src/rockstor/storageadmin/views/share.py”, line 211, in put
update_quota(share.pool, share.pqgroup, new_size * 1024)
File “/opt/rockstor/src/rockstor/fs/btrfs.py”, line 727, in update_quota
return run_command(cmd, log=True)
File “/opt/rockstor/src/rockstor/system/osi.py”, line 109, in run_command
raise CommandException(cmd, out, err, rc)
CommandException: Error running a command. cmd = [‘/sbin/btrfs’, ‘qgroup’, ‘limit’, ‘none’, ‘2015/27’, ‘/mnt2/RSPool’]. rc = 1. stdout = [‘’]. stderr = [‘ERROR: unable to limit requested quota group: No such file or directory’, ‘’]

This has worked before, why won’t it now?

I know share sizes arent enforced, but I like to keep them at realistic levels, at least it looks better in the dashboard.

Hi @KarstenV,
actually it seems my “good week” on patch + patch required to patch last patch :sweat:

On https://github.com/rockstor/rockstor-core/issues/1512 had a simple fix removing “,” (comma) from numbers (you can still get a 1,000.34 MB share but when sending data to backend it’s 1000.34 because 1,000 is not an int), so I don’t think your issue to be linked to that PR (hope so, this would be third unlucky :confused:)

Question: did you update to latest kernel?
Mirko

P.S.
[selfish mode on]
Hoping a kernel/btrf-tools issue / costraint - not mine xD
[/selfish mode off]

Yes, I’m on the latest kernel, included in the last test build:

[root@rockstornas ~]# cat /proc/version
Linux version 4.8.7-1.el7.elrepo.x86_64 (mockbuild@Build64R7) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-11) (GCC) ) #1 SMP Thu Nov 10 20:47:24 EST 2016

btrfs-progs is ver 4.8.3

Stay tuned 5 mins,
yet on old kernel, going to check it :wink:
M

Linux version 4.6.0-1.el7.elrepo.x86_64 (mockbuild@Build64R7) (gcc version 4.8.5 20150623 (Red Hat 4.8.5-4) (GCC) ) #1 SMP Mon May 16 10:54:52 EDT 2016

btrfs-progs 4.6

Paranoia mode off: you told “share resize”, so not related to share creation & last PR :slight_smile:

Bad news: had a 1GB share resized to 2GB then back to 1GB, to 500MB finally to 1.5GB all fine without errors.

Reading btrfs-progs changelog:

On 4.7 ver there’s a “check: verify qgroups of higher levels” - this seems the only one related

Test: can you create a new share then try to resize it?

@suman @phillxnet @Tomasz_Kusmierz : are we facing old Rockstor “fake quotas” moving to a real quota system?
M.

1 Like

Yes.

I just created a 100GB Share named Test. Resized it to 150GB and then to 75GB, without problems.

Then I deleted it :slight_smile:

Trying to resize another of my “old” shares gives this:

        Traceback (most recent call last):

File “/opt/rockstor/src/rockstor/storageadmin/views/share.py”, line 50, in _validate_share_size
size = int(size)
ValueError: invalid literal for int() with base 10: ‘5476083302.4’

Different error report this time.

1 Like

Uhmm…do you have a share you can play with?? (not sensible data)

A quota rescan could solve

M.

I have a small share (36GB data) that I can quickly backup, and then play with. Am allready backing up.

Quota rescan did not seem to help. But I ran it on complete pool, should it have been for the specific share?

share quota is under pool quota so yes, having it on the share is the way

M.

I’m starting to get in over my head :slight_smile:

Would “btrfs quota rescan //mnt2/Data” be correct, if the share name was Data?

I ran my suggested command, and waited patiently until the quota scan finished (checked it with “btrfs quota rescan -s //mnt2/Data”).

When this finished I went into shares and tried to resize Data. Same result as in the first post:

        Traceback (most recent call last):

File “/opt/rockstor/src/rockstor/rest_framework_custom/generic_view.py”, line 40, in _handle_exception
yield
File “/opt/rockstor/src/rockstor/storageadmin/views/share.py”, line 211, in put
update_quota(share.pool, share.pqgroup, new_size * 1024)
File “/opt/rockstor/src/rockstor/fs/btrfs.py”, line 727, in update_quota
return run_command(cmd, log=True)
File “/opt/rockstor/src/rockstor/system/osi.py”, line 109, in run_command
raise CommandException(cmd, out, err, rc)
CommandException: Error running a command. cmd = [’/sbin/btrfs’, ‘qgroup’, ‘limit’, ‘none’, ‘2015/25’, ‘/mnt2/RSPool’]. rc = 1. stdout = [’’]. stderr = [‘ERROR: unable to limit requested quota group: No such file or directory’, ‘’]

Something must have gone wrong in my setup, I’m curious to what that is :slight_smile:

Edit:
I’m off to bed, Lets see if we can find something out in the comming days.

hmmmmmm … maybe having a tick box “quotas enabled / dissabled” would help in situations like this one. I still strongly opt for a ability disable this darn thing, most NAS users are using it s N A S … to many rules will just put them off.

Uhmm, agree with you about “hey guys I want a nas to save my photos without getting crazy” and probably that will require lot of coding to avoid unexpected results (people jumping to/from quota/not quota)

M.

You forgot this very important word :slight_smile:

I must say that I mostly use my NAS for storing movies / series / documentaries, and my music collection, + backups of documents and such.
Very few cat photos, if any :slight_smile:

I don’t remember having quotas disabled / enabled but that could have been at some time.

Isn’t quotas a requirement for the share size enforcement that is planned for Rockstor?
Even though I basically use my Rockstor for storage only, I would still like to have some kind of restriction as to how much space a given share would be able to take up on my drives.

1 Like