Moving Dataset in TrueNAS Scale

Is there a simple way to move a dataset within truenas scale, Dragonfish 24.04, to a new dataset/pool on the same system? In short I want to move my application config dataset to a new pool and point my apps to that new host path.

Currently everything is on a 2 disk mirror and I am slowly running out of space. I have 2 500gb SATA SSDs that I would like to use a mirror for my applications while keeping my media and backups on the bigger HDDs.

I could not find anything in the Truenas documentation about “moving datasets”. The new drives are not currently in the system. What would be the best way to accomplish this if there is no simple “move dataset” functionality? Is replication the best way?

I’d go with a replication.

Is there any underlying issues I may not be aware of by doing so? i.e. Scale looking for that dataset for some particular reason and a kernel task or process not running correctly? Or am I being paranoid because of my lack of knowledge?
If replication is the best way to accomplish this and just that easy then, awesome! I should just be able to point the applications to the new host path and good to go?

Replication works fine. All though I have not ever used to move the “ix-applications” folder I have moved the others with no issues.

I am glad you brought up the ix-applications, that is another dataset that I would like to move to the new drives as well. When I first started with my Truenas server I did not really understand data structure with ZFS and 1 or 2 applications are tied to that dataset.

I will give it a try and see what happens. Thank you both.

I am not sure if I am missing something with this. I tried running a replication task, but it did not replicate completely. There is about 3 gigs of data missing. (App Config dataset and children). It looks like the replication task is only replicating current snapshots and not the actual dataset. I tried editing the replication task and checked the entire file system check box, but had the same result.

Tested moving one applications host paths to the replicated dataset to ensure the app itself would or would not make up for the lack of data missing, this causes the app to stop functioning. I get Backoff errors and in the container logs I get duplication of user/credential errors. Tried to move the host paths back to the original dataset and the app is still giving the same errors.

UPDATE
I watched your video on replication so I understand it is only replicating the snapshots now. Which made me look at my snapshots and tasks…what a headache. Is it possible for me to delete ALL snapshots and start from scratch?

You can select all snapshots in the UI and delete them.

I was able to get all apps moved over with replication without issue except for Planka. I think Planka has something tied to the charts ix-values.yaml file that wont let it authenticate. Database access denied user “planka”. Tried everything I know to fix it.

I am going to try and figure out a way to move the ix-applications dataset next.
(I am keeping this updated as I go for anyone’s future reference. If this is not desired please let me know and I will discontinue)

1 Like

I am all for people putting detailed answers for reference in here.

2 Likes

OK, so I discovered the “Choose a Pool for Apps” option under apps. There is a checkbox to migrate apps to the new pool and it is currently halfway done migrating the ix-applications dataset. Fingers crossed I don’t brick all my apps.

1 Like

Joined the forums for this topic. About to replace my spinning drives with NVMe’s. Have apps and shares currently running on the spinning drives.

1 Like

Are you just replacing the drives and wanting to move everything from the HDDs to the new NVMEs? If you are doing a 1:1 replacement you might want to do pool import instead.

Hopefully someone here that is smarter than I will chime in.

Update: I have been running Electric Eel with everything that was replicated/migrated to the new drives and everything is running flawlessly so far. iX-Applications migrated without any issues. All replication and migration was done prior to the Electric Eel Update.

Update: I am unable to delete a few snapshots. “Snapshots must not have dependent clones”. I have tried to research this and I am now at a loss on how to fix this. There is no option to “promote” any of the datasets in reference to the clones and zfs commands do not work in the shell, i.e. “zfs promote”.

Again, any help will be greatly appreciated. (I also posted this question on Truenas Community Forums)

At some point you cloned a snapshot to be a data set, You can look at each dataset in the UI and there will be a “Promote” button that shows up on the ones that are cloned.

That’s the problem, there is no Promote option under any of the datasets. I followed the Official Docs from ix but it seems my situation does not apply. The snapshots have an option to clone to new dataset but that did not seem to do anything.


All 4 of the snapshots I cannot delete belong to this file path but, I cannot find this file path as “ix-apps” does not exist.

EDIT: I was able to find the path in the shell. This makes me think the only way to resolve this is via the shell. I am not sure what to promote at this point if I did use zfs promote. (I did not use sudo when I previously stated “zfs commands do not work in the shell”

/mnt/.ix-apps/app_mounts/jellyfin]$ ls
cache cache-ix-applications-backup-system-update–2024-11-07_14:38:57-clone config transcodes transcodes-ix-applications-backup-system-update–2024-11-07_14:38:57-clone)

UPDATE: I was able to follow this, How to delete snapshots with dependent clones? | TrueNAS Community, which I referenced earlier but being an idiot and not using sudo for zfs commands. All clones have been promoted and the respective apps seem to working fine. I didn’t break anything!

I am guessing that because these were tied to ix-apps/ix-applications they were hidden and I was not able to find them. I used -a when listing in the directories but that did not show the hidden paths?

Lesson learned again I guess. Data structure is very important.

EDIT: I am still unable to delete the snapshots. I keep promoting back and forth, i.e once I promote a dataset/clone the snapshot falls back to/says the previous dataset is a clone. I can also see more than one clone for some of the snapshots. I am totally lost now.