Can't delete snapshot after Migration to new server

Rickinfl

Contributor
Joined
Aug 7, 2017
Messages
165
I was able to delete the other snapshots only this one will not delete.


Error: concurrent.futures.process._RemoteTraceback:
"""
Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/zfs.py", line 832, in do_delete
snap.delete(defer=options['defer'])
File "libzfs.pyx", line 369, in libzfs.ZFS.__exit__
File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/zfs.py", line 832, in do_delete
snap.delete(defer=options['defer'])
File "libzfs.pyx", line 3294, in libzfs.ZFSSnapshot.delete
libzfs.ZFSException: Cannot destroy DataStore/VM/Plex@auto-2020-09-12_18-46: snapshot has dependent clones

During handling of the above exception, another exception occurred:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/concurrent/futures/process.py", line 239, in _process_worker
r = call_item.fn(*call_item.args, **call_item.kwargs)
File "/usr/local/lib/python3.7/site-packages/middlewared/worker.py", line 97, in main_worker
res = loop.run_until_complete(coro)
File "/usr/local/lib/python3.7/asyncio/base_events.py", line 579, in run_until_complete
return future.result()
File "/usr/local/lib/python3.7/site-packages/middlewared/worker.py", line 53, in _run
return await self._call(name, serviceobj, methodobj, params=args, job=job)
File "/usr/local/lib/python3.7/site-packages/middlewared/worker.py", line 45, in _call
return methodobj(*params)
File "/usr/local/lib/python3.7/site-packages/middlewared/worker.py", line 43, in _call
return await methodobj(*params)
File "/usr/local/lib/python3.7/site-packages/middlewared/service.py", line 409, in delete
f'{self._config.namespace}.delete', self, self.do_delete, [id] + list(args)
File "/usr/local/lib/python3.7/site-packages/middlewared/worker.py", line 45, in _call
return methodobj(*params)
File "/usr/local/lib/python3.7/site-packages/middlewared/worker.py", line 45, in _call
return methodobj(*params)
File "/usr/local/lib/python3.7/site-packages/middlewared/schema.py", line 965, in nf
return f(*args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/middlewared/plugins/zfs.py", line 834, in do_delete
raise CallError(str(e))
middlewared.service_exception.CallError: [EFAULT] Cannot destroy DataStore/VM/Plex@auto-2020-09-12_18-46: snapshot has dependent clones
"""

The above exception was the direct cause of the following exception:

Traceback (most recent call last):
File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 130, in call_method
io_thread=False)
File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1081, in _call
return await self._call_worker(name, *args)
File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1101, in _call_worker
return await self.run_in_proc(main_worker, name, args, job)
File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1036, in run_in_proc
return await self.run_in_executor(self.__procpool, method, *args, **kwargs)
File "/usr/local/lib/python3.7/site-packages/middlewared/main.py", line 1010, in run_in_executor
return await loop.run_in_executor(pool, functools.partial(method, *args, **kwargs))
middlewared.service_exception.CallError: [EFAULT] Cannot destroy DataStore/VM/Plex@auto-2020-09-12_18-46: snapshot has dependent clones
 

Rickinfl

Contributor
Joined
Aug 7, 2017
Messages
165
Ok so how do I fix this?
 

hescominsoon

Patron
Joined
Jul 27, 2016
Messages
456
you don't..it stays. That snapshot forms the basis of whatever dataset/zvol it's referencing. If you REALLY want to get rid of it you will have to manually copy all of the data out of that dataset/zvol..then delete said dataset/zvol, recreate said dataset/zvol, put all of the data back into it...and then that "error" goes away.
 
Last edited:

Rickinfl

Contributor
Joined
Aug 7, 2017
Messages
165
Anyone? I can't believe you can't delete a snapshot and WHY is it still attached to something? Is this a Bug?
 

hescominsoon

Patron
Joined
Jul 27, 2016
Messages
456
Anyone? I can't believe you can't delete a snapshot and WHY is it still attached to something? Is this a Bug?
look at my post above yours. It isn't a bug..it's by design. One of the zvols on my freeNAS here has that same "problem" but I do not want to copy all of the data out of that zvol and then delete the zvol..then recreate it..to get rid of that mesage. I also explained how to get rid of that snapshot if you really want it gone in the above message.
 
Top