Proper procedure for rebuilding

stajo

Explorer
Joined
Jan 3, 2020
Messages
71
Hi

I have 3 Truenas storage machines, one for music storage, one for storage of movies and one that takes backups of the two main. A while ago I had to do a hw refresh on the music storage. An older Supermicro mobo with 10 SATA ports went south. So I replaced it with what I had, a newer Supermicro X10 SLM-F. That one had only 6 sata slots so I used all 8 ports from an IT Flashed M1015 and two from the motherboard and just moved all 10 disks over and ran. It worked fine in the beginning, but when a disk started to make warnings of unrepairable errors, I went to swap that. After resilvering it immediately said that another disk had unrepairable errors. After that it said the same once again and after that resilvering it was ok. I checked the two supposedly malfunctioning disks in SeaTools and it did not find errors on the first two, but on the third. Ok, I thought it was wierd but I let it run, maybe a one time strange behavior. But when this happened to me a second time, and I resilvered disks for days and days I realized that something is not helthy with the installation. TrueNas points out the wrong disk every time, maybe it has been mixed up in someway. At the end of the second time resilvering mania it wouldnt even find a name for the new disk (da7,ada7 etc) that i tried to mount as replacement, it only showed a (-). I dont know what might have been wrong, but I decided it was time for a fresh install. After all I have a backup.

Now to my real question. I have just reinstalled a new machine (same hw as the old but 6 shiny new larger disks, all on the built in sata connections) and I am up to for the first time do a replication from the backup to the to be new main music storage. It has been running a couple of hours and I thought its time to do a replication.

This is where I become uncertain, I have never read or seen a proper description on how to do this properly. I want to do a one time replication and when the data is replicated I want to reverse the process so that the new Pool replicates back to the backup on a nightly basis. If this works as I want it to work, it shouldnt need to replicate anything the first times, because the replication is incremental. Is this going to work as I want it, or can it happen that I have to make new datasets for the re-replication and the data will be doubled on the backup machine?

Could anyone describe how to do this, if its anything particular to think of when doing it?

PS. I tried a small replication from the backup. A dataset with only a few lossy music files called just Lossy. I tried to replicate that as a one timer to a newly created pool "Music" on the new machine. It didnt want to do that, it said it is data in the new (supposedly empty) pool, and it refuses to overwrite it. Do I have to create datasets in the pool to replicate datasets from the backup machine?

Many questions, but this ought to be a very standardized procedure, am I right?

Staffan
 

stajo

Explorer
Joined
Jan 3, 2020
Messages
71
An addition that I think I found out myself. If I created a dataset on the new machine called "Test" in the pool "Music" and replicated the dataset "Lossy" from the backup machine to that, it replicated the two folders and content inside that dataset. So apparently I shall create datasets, and maybe the pool itself with the same names on pool and dataset as it was before, and after that replicate dataset per dataset?

Even the permissions seems to have replicated.
 

stajo

Explorer
Joined
Jan 3, 2020
Messages
71
Well, an update. I deleted my pool on the new machine and created a new one named Music1, exacly the same as it was before, and then I made a dataset named Lossy, also as it was before. Then I Replicated the dataset Lossy on the backup machine to the dataset Lossy on the new machine. Went fine. Then I tried to reverse it and set up a Replication run once from the pool Music1 on the new machine to Music1 on the backup machine. I had hoped that it should just do a check and see that it was no incremental data to replicate, but it failed with No Incremental Base Error.

[2022/01/28 22:59:09] INFO [Thread-4] [zettarepl.paramiko.replication_task__task_1] Connected (version 2.0, client OpenSSH_8.4-hpn14v15)
[2022/01/28 22:59:09] INFO [Thread-4] [zettarepl.paramiko.replication_task__task_1] Authentication (publickey) successful!
[2022/01/28 22:59:09] ERROR [replication_task__task_1] [zettarepl.replication.run] For task 'task_1' non-recoverable replication error NoIncrementalBaseReplicationError("No incremental base on dataset 'Music1' and replication from scratch is not allowed")
 

stajo

Explorer
Joined
Jan 3, 2020
Messages
71
New update. If I make the replication on dataset level and not on pool level it works. I successfully replicated Music1/Lossy from the new primary to FromMusic1/Lossy on the backup machine. And it didnt build a new copy, it looks like and contains the same data as before for what I can see.

That should meen that I now can first create new datasets, exactly as they are on the backup, replicate all datasets, one on one to the new primary, and then set up periodic replications from the new primary to the back.

As far as I can remember, I had the replication on pool level before, meaning if I made new datasets in that pool, it replicated them as well. If I do it this way, creating the replication from dataset level, I have to remember to include new ones in the nightly replication as far as I can understand?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
As far as I can remember, I had the replication on pool level before, meaning if I made new datasets in that pool, it replicated them as well. If I do it this way, creating the replication from dataset level, I have to remember to include new ones in the nightly replication as far as I can understand?
Maybe you're looking for this option? (although I see you're in the FreeNAS/Legacy section here and didn't say what you're running, so I'm just assuming the latest TrueNAS version):
1643446546640.png


You will need to select the Advanced Replication Options to see this screen
 

stajo

Explorer
Joined
Jan 3, 2020
Messages
71
Thanks Sretalla, I saw that I posted on FreenasLegacy section, dont know why. Anyway, Im on latest yes.

I will look into that later, running a little bigger dataset from backup machine to new machine now.

On the backup machine all the data from the pool Music1 on the original primary is doing nightly backups to a dataset called FromMusic1 on the backup machine. Maybe thare is where it, or I, am having some problems on figuring out how to do this.
 

stajo

Explorer
Joined
Jan 3, 2020
Messages
71
Btw the Recursive checkbox is for eventual nested datasets, is it not?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
If you select that checkbox and have the source as the pool root dataset, you'll get all the child datasets in the pool (which should include new ones created after the task... unless you use the exclude option).
 

stajo

Explorer
Joined
Jan 3, 2020
Messages
71
If you select that checkbox and have the source as the pool root dataset, you'll get all the child datasets in the pool (which should include new ones created after the task... unless you use the exclude option).
Ok thanks! So what will happen if I replicate from pool level Music1 and check that one for all datasets in that pool and replicate to the backup machine dataset named FromMusic1. Will it create a new dataset named Music1 whith child datasets under FromMusic1 or will it just replicate the datasets directly to/under FromMusic1?
 

stajo

Explorer
Joined
Jan 3, 2020
Messages
71
I had to choose the folders, choosing the pool and recursive didnt do it. But it worked anyway. New main and backup are now aligned. Thank you!
 
Top