Editing Datasets

RodrigoLopes

Dabbler
Joined
Feb 2, 2019
Messages
24
Hello Guys,

I'm new to the world of FreeNas and i have a problem/question.

I was trying to receize a dataset that i had created but i'm always getting the same error.

Is there any guide that i can follow to do so?

Can you help?

Best regards,

Rodrigo Lopes
 

RodrigoLopes

Dabbler
Joined
Feb 2, 2019
Messages
24
What is the exact error?
Which version of FreeNAS?

FreeNas Version: FreeNAS-11.2-RELEASE-U1


Error output summary: [EFAULT] Failed to update dataset: size is less than current used or reserved space

Error output FULL:

Error: Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/zfs.py", line 303, in do_update
dataset.properties[k] = prop
File "libzfs.pyx", line 370, in libzfs.ZFS.__exit__
File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/zfs.py", line 292, in do_update
prop.value = v['value']
File "libzfs.pyx", line 1065, in libzfs.ZFSProperty.value.__set__
libzfs.ZFSException: size is less than current used or reserved space

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 161, in call_method
result = await self.middleware.call_method(self, message)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1109, in call_method
return await self._call(message['method'], serviceobj, methodobj, params, app=app, io_thread=False)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1049, in _call
return await methodobj(*args)
File "/usr/local/lib/python3.6/site-packages/middlewared/service.py", line 283, in update
f'{self._config.namespace}.update', self, self.do_update, [id, data]
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1049, in _call
return await methodobj(*args)
File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 664, in nf
return await f(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/pool.py", line 757, in do_update
rv = await self.middleware.call('zfs.dataset.update', id, {'properties': props})
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1113, in call
return await self._call(name, serviceobj, methodobj, params, app=app, pipes=pipes, io_thread=True)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1049, in _call
return await methodobj(*args)
File "/usr/local/lib/python3.6/site-packages/middlewared/service.py", line 283, in update
f'{self._config.namespace}.update', self, self.do_update, [id, data]
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1063, in _call
return await run_method(methodobj, *args)
File "/usr/local/lib/python3.6/site-packages/middlewared/main.py", line 1009, in run_in_thread
return await self.loop.run_in_executor(executor, functools.partial(method, *args, **kwargs))
File "/usr/local/lib/python3.6/concurrent/futures/thread.py", line 56, in run
result = self.fn(*self.args, **self.kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/schema.py", line 668, in nf
return f(*args, **kwargs)
File "/usr/local/lib/python3.6/site-packages/middlewared/plugins/zfs.py", line 307, in do_update
raise CallError(f'Failed to update dataset: {e}')
middlewared.service_exception.CallError: [EFAULT] Failed to update dataset: size is less than current used or reserved space


That´s the error.

Best regards,

Rodrigo
 

Evertb1

Guru
Joined
May 31, 2016
Messages
700
You cannot set a quota to an amount less than is currently being used by a dataset. What you can do is create a new dataset with the desired size, copy the data to it and destroy the old dataset.
 

RodrigoLopes

Dabbler
Joined
Feb 2, 2019
Messages
24
You cannot set a quota to an amount less than is currently being used by a dataset. What you can do is create a new dataset with the desired size, copy the data to it and destroy the old dataset.


Oh damn, okay thanks for the help.

Best regards,

Rodrigo Lopes
 

Evertb1

Guru
Joined
May 31, 2016
Messages
700
Oh damn, okay thanks for the help.

Best regards,

Rodrigo Lopes
One tip: I have made it a habbit to set the quota for my datasets to "0". That way they can grow untill I am running out of space on my pool. I did it this way because I am not sure which of my datasets would grow the most or the fastest.
 

RodrigoLopes

Dabbler
Joined
Feb 2, 2019
Messages
24
One tip: I have made it a habbit to set the quota for my datasets to "0". That way they can grow untill I am running out of space on my pool. I did it this way because I am not sure which of my datasets would grow the most or the fastest.


Configuring it that way will allow you to take space from that dataset as well?
 

RodrigoLopes

Dabbler
Joined
Feb 2, 2019
Messages
24
One tip: I have made it a habbit to set the quota for my datasets to "0". That way they can grow untill I am running out of space on my pool. I did it this way because I am not sure which of my datasets would grow the most or the fastest.


By the way, to delete a Dataset what do i need to "stop" or unmount?
 

Evertb1

Guru
Joined
May 31, 2016
Messages
700
Configuring it that way will allow you to take space from that dataset as well?
Doing it that way, your dataset does not have a predefined size. It get space as long as that is available within in you storage.
 

RodrigoLopes

Dabbler
Joined
Feb 2, 2019
Messages
24
Doing it that way, your dataset does not have a predefined size. It get space as long as that is available within in you storage.

Ok i will do so

Thanks once again
 

Evertb1

Guru
Joined
May 31, 2016
Messages
700
By the way, to delete a Dataset what do i need to "stop" or unmount?
Before you destroy your dataset you should try if you can set the quota to 0. Never done that but it might work. If not, you can simply delete it within the GUI. See chapter 9.1.10 in the user manual. If you have shares on that dataset already I think you should delete those first.
 

Evertb1

Guru
Joined
May 31, 2016
Messages
700
One final thing. Please, if you need to post more questions on the forum read the guidelines for posting. There are a lot of members willing to help but they need to know some basic things about your systems hardware and software to help you find adequate answers.
 

RodrigoLopes

Dabbler
Joined
Feb 2, 2019
Messages
24
One final thing. Please, if you need to post more questions on the forum read the guidelines for posting. There are a lot of members willing to help but they need to know some basic things about your systems hardware and software to help you find adequate answers.


You can't redefine the quota unfortunatly.

Do you know where can i find those guidelines?

Thanks.
 

Evertb1

Guru
Joined
May 31, 2016
Messages
700
You can find the link to the Guidelines here.
 

RodrigoLopes

Dabbler
Joined
Feb 2, 2019
Messages
24

RodrigoLopes

Dabbler
Joined
Feb 2, 2019
Messages
24
Top