Dataset and sub dataset removal

Drifting

Dabbler
Joined
Jun 11, 2013
Messages
13
Hope someone can help, and please do bear with my, I am new to Truenas, and also I am partially sighted, bit confused at the moment.
Anyway, have been running a basic FreeNas for quite a while without issue. I decided that I would wish to upgrade the machine, and second puit more storage in.
Having read that replication was the way to go, I thought I had set this up right. Seems not.
Old FreeNas had this structure \pool\store\store which has all my data in. No idea how I got the duplicate \pool\store\Store and would prefer all the data moved from \pool\store\store to just \pool\store. But also I do not want the last empty Store.
Hope that makes sense, very confused at the moment as I thought all I had to do was to go into the shell and remove the \pool\store\Store, then copy the contents of \pool\store\store to \pool\store.

So what I need to know is how to copy the contents of \pool\store\store to \pool\store and to remove the dataset \pool\store\Store

Hope that made sense to someone, I am exausted trying to get a crash course in Truenas, love the product, find it very confusing.

Kidest regards Pul
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
OK, so let's take it one at a time:

remove the dataset pool\store\Store
zfs destroy pool\store\Store

copy the contents of pool\store\store to pool\store
I think the easiest here is just to move the first store out of the way and move the second one into place...

zfs rename pool/store pool/temp-store
zfs rename pool/temp-store/store pool/store

You could (depending on what you wanted done with the additional level) then destroy temp-store also (after you confirm that pool/store has what you want in it)
zfs destroy pool/temp-store
 

Drifting

Dabbler
Joined
Jun 11, 2013
Messages
13
Thank you so much for the reply. I seemed to have other permission issues after replication. So bit the bullet in the end and wiped the pool and started again..

Thank you for your help
 
Top