Can't delete folder/dataset from the CLI nor the GUI

bullerwins

Dabbler
Joined
Mar 15, 2022
Messages
43
Hi!

I started making a zfs send recv from one dataset to another in the same pool, to remove dedup. I had to stop it and now I have a folder with the name of the new dataset in the /mnt/pool/newdataset but it doesn't show on the storage GUI.
I can't create a dataset with the same name, and I can't delete from the shell terminal as root.
What can I do to clean it up?

TrueNAS-SCALE-22.02.3:

Screenshot 2022-08-14 at 19.35.14.png


Screenshot 2022-08-14 at 19.35.38.png

Screenshot 2022-08-14 at 19.35.23.png
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
ZFS won't allow rm to remove datasets, even partial ones. Use zfs destroy bigboi/dataset0 instead.
 

bullerwins

Dabbler
Joined
Mar 15, 2022
Messages
43
ZFS won't allow rm to remove datasets, even partial ones. Use zfs destroy bigboi/dataset0 instead.
I tried that too... :(

It says that the dataset doens't exist when trying to destroy it. But it says it exists when trying to create one with the same name, weird

Screenshot 2022-08-14 at 19.46.45.png
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Reboot and try again.
 

bullerwins

Dabbler
Joined
Mar 15, 2022
Messages
43
I tried 2 times already, I've tried again now doing the zfs destroy command the first thing after a fresh restart. Same result.
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
So the issue is now that you can't name a new dataset the same as an old destroyed dataset?

Its seems likely that ZFS has remembered the name of the old dataset because it has lots of metadata and doesn't actually delete everything due to its copy-on-write nature.

.... I would just recommend using a new dataset name.
 

bullerwins

Dabbler
Joined
Mar 15, 2022
Messages
43
So the issue is now that you can't name a new dataset the same as an old destroyed dataset?

Its seems likely that ZFS has remembered the name of the old dataset because it has lots of metadata and doesn't actually delete everything due to its copy-on-write nature.

.... I would just recommend using a new dataset name.
I didn't manually destroy the dataset, it's one that is created automatically while doing the zfs send, I had to stop the process, the dataset was disappeared from the GUI, but a folder still exists in the path.

I can't destroy the dataset, and I can't remove the folder.

I can use a new name, I just wanted to clean up the folder from the path.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Your pool is locked from the aborted zfs send. The only way I know to fix this is to destroy the pool and start over.
 

morganL

Captain Morgan
Administrator
Moderator
iXsystems
Joined
Mar 10, 2018
Messages
2,694
Well, bad news then... I'll start moving the stuff out...
While that might be the best short term solution, it would be reasonable to report a bug on this. Its obviously not ideal that this user error requires a pool to be rebuilt. Perhaps someone knows of a better solution or it can be made better in the future.
 

bullerwins

Dabbler
Joined
Mar 15, 2022
Messages
43
While that might be the best short term solution, it would be reasonable to report a bug on this. Its obviously not ideal that this user error requires a pool to be rebuilt. Perhaps someone knows of a better solution or it can be made better in the future.
I'll make my way to learn the jira system to try my best to report this. Thanks!

Opened a report: https://ixsystems.atlassian.net/browse/NAS-117668
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
You might check and see if their is a snapshot on that dataset. If their is, you can't destroy the dataset until you destroy the snapshot first.

As for not being able to create a new dataset with a different name, don't know why that would happen. Seems to be a bug in the GUI, in which it won't let you create a new dataset if their is already a directory with that name. The GUI should give a nice popup warning / failure explaining the issue.
 

bullerwins

Dabbler
Joined
Mar 15, 2022
Messages
43
You might check and see if their is a snapshot on that dataset. If their is, you can't destroy the dataset until you destroy the snapshot first.

As for not being able to create a new dataset with a different name, don't know why that would happen. Seems to be a bug in the GUI, in which it won't let you create a new dataset if their is already a directory with that name. The GUI should give a nice popup warning / failure explaining the issue.
I checked and there wasn't any snapshot on the "destionation dataset" that I wanted to delete. There was one on the "origin dataset" as that's needed to do the zfs send command.

I didn't try to create a dataset using the CLI to be honest (i don't know if that's possible, I guess it is, I just have never done it). The GUI gave me an error, it's the pastebin i posted in #8 when trying to create a new one with a different name. Seems like the pool is borked, I don't know the mecanism of how that happened...

But now I even have a bigger problem. I have done anything else but the system rebooted and it's stuck in a bootloop. It starts loading truenas as usual but before ending I get this message:
IMG_4832.JPG
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
Sorry, I can't help with that boot loop.

Part of the problem with TrueNAS is that in depth or detailed trouble shooting requires command line work. Lots of less experienced or newish users don't have much ZFS command line knowledge. (Or perhaps even Unix / Linux in general.) So when they get bitten, it takes longer to solve. If even possible for those of us in the forums to do so remotely.
 

Samuel Tai

Never underestimate your own stupidity
Moderator
Joined
Apr 24, 2020
Messages
5,399
Yeah, the boot loop is because it's trying to import the borked pool, and running into a circular reference. You'll have to pull all your pool disks to see if you can finish booting. If not, your boot pool also corrupted.
 

bullerwins

Dabbler
Joined
Mar 15, 2022
Messages
43
To update my situation.

I tried to install CORE instead of SCALE. Core installed fine but then first trying to boot it was trying to read the nfs pool that was present in the disk installed and got an error.
Surprisingly i tried to install Scale again, and for some reason scale doesnt seem to check if there is a pool when first booting I guess, as it booted just fine, with a default instalation. I tried to import the pool and it worked, but got the same error as in #8.
I deleted the pool and created a new one.
I tried to install Core again and this time worked, so its confirmed that there was a problem with the pool.

Im going to use Core now and restore my pool from backups to see if I get a more stable system.
 
Top