Beginner question: how easy is it to re-organise my datasets?

Hello All

This is what I set up two years ago, when I knew even less than I do now:

I can now see a better bet would have been something like (example names only in this mock-up):

image

Is this something I could easily do in a few minutes inside my TrueNAS Scale UI ?

Alternatively, would it require a “start from scratch” approach and delete the existing structure and then - via quite a lengthy process - upload from my backups into the new dataset tree structure?

EB

To the extent that the datasets already exist and already contain the data you want, this is just a few zfs rename calls away.

1 Like

Hello Eric and thanks for the reply.

So it would simply be the ZFS equivalent of

# mkdir shares
# mv mainraid/documents /shares

# mkdir docker
# mv mainraid/scripts /docker

etc.? If so, that’s within my grasp.

I hesitate to say “equivalent”, datasets are much more than just directories, but broadly speaking it is that simple to do.

The main catch is with inherited properties, which will now inherit from the new parent, so be sure to review those - compression, recordsize, …

Also, you may not be able to move ix-applications which is a TrueNAS internat dataset.

got it - I see the idea of moving/renaming to suit and certainly ensuring that I check out the inherited aspects of the datasets prior to just jumping in.

Thanks!

EB

And unless you specifically wish to use inheritance or to group datasets for recursive snapshots or recursive replication (i.e. it is just for aesthetics) personally I wouldn’t bother for the relatively small number of root datasets.

It is just for aesthetic reasons plus a simple-to-grasp structure. One branch of the tree would be destined for recursive tiered snapshots (so I don’t have to exclude loads of stuff) whilst the other is something which I can afford to lose.
I’d need to work out how to move things so that ix-applications stays put and everything else moves around it.
Perhaps it is too much bother, a good point; I’ll ponder on it for a while.

Thanks for the help.

1 Like

zfs list

Shows you all the datasets

Then zfs rename oldname newname

So make the shares dataset then

zfs rename mainraid/documents mainraid/shares/documents

Can’t rename a dataset that’s in use. So may need to turn off shares, stop apps, and make sure you don’t have the directory open on shells etc.

Ix-Apps has to stay where it is

1 Like

that is a neat approach! Thanks … more stuff to play with!