Issues with FreeNAS -> TrueNAS Scale Migration

Hi there!

I am currently in the process of reactivating my homeserver, which was still running FreeNAS, but I’ve encountered a problem that I’d like to get some input on:
What I’ve done so far:

  • Export my old Pool
  • Move the HDDs to a newer System with TrueNAS Scale installed
  • import the Pool

So far everything seems to have gone well. However, previously I shared mnt/Storage, when I try to do the same now, I get the following warning:

Configuring SMB exports of root-level datasets may lead to storage reconfiguration issues. Consider creating a dataset instead.

From what I read on the forums so far, this is not recommended.

The only option I seem to have is to share each folder under mnt/Storage seperatly, which would also prevent me from easily adding a new folder.

Is there a cleaner solution to this? Perhaps I can move the folders into a new Folder which I could then share?

Thanks in advance!

You’re basically running into your old bad habits catching up to you. I’d say a reasonable solution is:

Create a new dataset, share or whatever you want to call it, on your Storage pool

mv all your data from /mnt/Storage to /mnt/Storage/share. You’ll need to be a little careful as there may also be things under /mnt/Storage that are system or other datasets that you do not want to move - hard to say without seeing your dir layout, but it should be obvious to you. I’d say mv the relevant folders one by one.

As you’re on the same top dataset, this should be quite fast.

And now share /mnt/Storage/share.

For future use, make it a habit that all data goes into a dataset. The root dataset has one function and one function only, and that is to hold child datasets.

2 Likes

Hi yorik, thank you for the quick reply.
Can you be more specific on what I may not want to move here? The only thing that I see when I excecute “ls” in the directory is thumbs.db which I cannot quite place. Anything else I should look out for?
Thanks!

Try a sudo zfs list from TrueNAS CLI and look for any additional datasets such as iocage (CORE), ix-apps (SCALE), ix-applications (earlier SCALE), .system (any TrueNAS or FreeNAS), .ix-virt (Fangtooth).

You don’t want to move the contents of those datasets, that’d create havoc. You want to narrowly just move your shared data into the new share dataset.

2 Likes

Cant seem to find anything related to the mentioned names, I guess I’m in the clear?

In the directory Storage/ there’s another subdirectory “.system” with several files: configs, cores, nfs, samba4, webui, … all of them marked as “legacy”.
There’s 2 share Folders: “Storage”, “configs”, which i’ve created in Truenas.
Finally theres a subdirectory called “boot-pool” with references to what I think is the current Truenas Version.

Thanks again!

Sorry for asking these stupid questions, just making sure I’m not messing up:
I’ve started the process of moving the directory one at a time, by doing:

mv subdir Storage/subdir
The process took quite a while (56 files, 57GB total) and spat out some errors about permissions that could not be transferred (?). I was expecting the transfer to be very quick as I didn’t think the files would “physically” move on the HDDs. Did I mess up somewhere?f

Datasets are separate filesystems, so moving data between them is slower than it would be than moving within the same dataset (it’s effectively copying and then removing the original).
Could you show us the output of zfs list -r Storage?

1 Like

Please place results using Preformattted Text (</>) or Ctrl+e on the reply toolbar

2 Likes
NAME                                                          USED  AVAIL  REFER  MOUNTPOINT
Storage                                                   4.28T  2.84T  4.23T  /mnt/Storage
Storage/.system                                            200M  2.84T   104K  legacy
Storage/.system/configs-1e9984bcf13340bcb68bc263ecb0a902   169M  2.84T   169M  legacy
Storage/.system/configs-ae32c386e13840b2bf9c0083275e7941   172K  2.84T   172K  legacy
Storage/.system/cores                                       88K  1024M    88K  legacy
Storage/.system/netdata-ae32c386e13840b2bf9c0083275e7941  17.7M  2.84T  17.7M  legacy
Storage/.system/nfs                                        112K  2.84T   112K  legacy
Storage/.system/rrd-1e9984bcf13340bcb68bc263ecb0a902      5.62M  2.84T  5.62M  legacy
Storage/.system/samba4                                     360K  2.84T   360K  legacy
Storage/.system/syslog-1e9984bcf13340bcb68bc263ecb0a902   6.82M  2.84T  6.82M  legacy
Storage/.system/webui                                       88K  2.84T    88K  legacy
Storage/Storage                                           57.7G  2.84T  57.7G  /mnt/Storage/Storage
Storage/configs                                             96K  2.84T    96K  /mnt/Storage/configs

This is the output.
Apparently there’s no edit button here, or perhaps im blind …

That this didn’t recreate permissions is worrisome.

Do not touch .system, that’s needed by TrueNAS.

Don’t move anything else right now … you may need to manually fix those permissions. I hope you still have the list of files where permissions didn’t come across.

And then maybe someone smarter than me can opine whether it’d better to use rsync with the right parameters and maybe even as sudo to copy the files over and remove the originals.

If it helps: I still have access to the files (short videos). And they work perfectly fine.
The only strange bit is, if I play a video, VLC automatically wants to play the next video, which runs into an error as that “next video” is a reference to a video at the previous location it was stored at.

Assuming you are in CLI as a non-root user, this should move files over with ownership intact. ACLs however won’t come over, unfortunately. You’d need to look at those on the source directory and recreate them on the target, if you use them

sudo rsync -axvvES --remove-source-files source_directory /mnt/Storage/Storage/

If you are in the shell as root, leave off sudo.

Maybe get a sanity check from someone else before trying this. I don’t want to be the source of metadata corruption for you.

1 Like
  • I’m in the Shell via the TrueNAS WebUI, which I’d consider a Command Line Interface
  • I’m accessing the CLI as the default truenas_admin
  • I don’t mind losing or recreating my ACL so much as I hadn’t configured much in that regard anyway. With FreenNAS I only had one user which I used myself to access my data.

Thank’s for all the help, I hope that someone else chimes in.