Changing a from stripe to mirror in the System Dataset Pool

Sypho

Cadet
Joined
Mar 25, 2024
Messages
6
Hello Everyone!

In my TrueNAS instance Ive got one HDD only in the System Dataset Pool in ZFS stripe mode. Ive got 2 new SSDs I want to put in its place.
What I want to do is to smoothly move quite important business data across from that old HDD onto SSDs and leave them (the SSDs) in mirror mode.
How do I do it in a simple way ensuring safety and no data loss.

I dont want to take a risk with this data and also I dont want to go into rocket flight complicated exercise.
Can I do it right from the GUI by attaching vdevs to the pool and setting it to mirror?
Is this going to be fine for System Dataset Pool if I remove the old HDD right after the resilvering is done?

Great thanks for guidance!!!
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Are the SSDs the same size or greater than the HD?

If so, you should be able to attach one SSD as a mirror to the HD, the GUI.

That should transparently add redundancy.

Then you should be able to replace the HD with the other SSD... and now you have a 100% SSD pool.

You should probably enable auto-trim on it.

And finally, you now have a spare HD, which you can use to establish another pool, and setup automatic local replications as a backup if you want ;)
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
I dont want to take a risk with this data and
I read between the lines here: this is your only copy of the data?
If it's important business data, look into an off-site backup and as @Stux suggested, keep the HDD for local backups.
 

Sypho

Cadet
Joined
Mar 25, 2024
Messages
6
Great thanks Stux and chuck32 for the points!

Onto disk sizes - yeah, the HDD is 500GB while the SDDs are 2 x 2TB. I understand that when I add the 1st SDD in a mirror mode to the pool it will be limited to 500GB set-up. Then I replace the HDD with the other SDD and Ive got 2 x xxx (500GB or 2TB)?

I'm sure there's a way to make that mirror ~2TB in the end but will it happen automatically after having the physical limitation (the original 500GB HDD) removed? Or will I need to have some joy with extra work - and if so what exactly will I need to do - can you guide me on that (commands / operations)?

Re copy of the data - absolutely, will do that upfront the operation. I dont want to go into trouble with that data.
Yes, replication is my next step after having the pool tidied up.
 

Sypho

Cadet
Joined
Mar 25, 2024
Messages
6
I'm done with a replication to another HDD in the system.
Now, onto rearranging the pool. I seem to have 2 major options (there are more but rather beyond my interest and / or capabilities).

1. I could use a function in the pool status named 'replace' - is this a good way forward? Seems very simple which is what I like. I replace HDD with 1st SDD, then add 2nd SDD and make it a mirror, auto-resilver, done.
2. Alternatively, add the 1st SSD to the pool, make it a mirror, auto-resilver with HDD, add 2nd SSD to the pool, detach the HDD and repurpose it. I've got 2 SSDs in mirror mode.

Which one do you recommend keeping in mind HDD is 500GB and SSDs are 2TB each?
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
it happen automatically after having the physical limitation (the original 500GB HDD) removed? Or will I need to have some joy with extra work - and if so what exactly will I need to do - can you guide me on that (commands / operations)?
Maybe.

Usually it should work as described and after replacing the HDD the mirror should extend to its full capacity. Unfortunately there is a bug, it was present in 23.10.1 and should have been fixed in 23.10.2, but from I gathered that may not be the case.

So you may need to come back for guidance.

 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
I'm sure there's a way to make that mirror ~2TB in the end but will it happen automatically after having the physical limitation (the original 500GB HDD) removed? Or will I need to have some joy with extra work - and if so what exactly will I need to do - can you guide me on that (commands / operations)?

Its supposed to work automatically. In the recent past it was busted.

So, lets hope it works as its designed, and if it doesn't we'll cross that bridge later.


Yeah. What chuck said ;)
 

Sypho

Cadet
Joined
Mar 25, 2024
Messages
6
Final update: it worked like a charm!

I studied a bit about both the points we talked about and understood that disk 'replacement' wouldn't be the right choice.
Continued as you suggested.
It all went smoothly and what's the most beautiful in it is the data pool size is according to the new SSDs capacity :)

Glad to confirm the thread is closed!
BIG thank you to Stux and chuck32!
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
Happy to help :)

that disk 'replacement' wouldn't be the right choice.
To free the HDD from the pool you replaced it with the SSD didn't you?
 

Sypho

Cadet
Joined
Mar 25, 2024
Messages
6
Happy to help :)


To free the HDD from the pool you replaced it with the SSD didn't you?
I actually just detached it and expanded the pool by adding the other SSD.
Rebooted the system with HDD still plugged in. Should I expect issues if I unplug the HDD?
 

chuck32

Guru
Joined
Jan 14, 2023
Messages
623
I guess that works, too ;)

The HDD should show up as an unassigned disk / should not be associated with any pool under storage, so if you physically remove it, it's no problem.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Essentially replace is attach/detach. Sort of.

My point is replacing the hd with the 2nd ssd should’ve been just as safe.

Now setup backups.

RAID is not a backup, it’s a resilience technique.
 

Sypho

Cadet
Joined
Mar 25, 2024
Messages
6
Essentially replace is attach/detach. Sort of.

My point is replacing the hd with the 2nd ssd should’ve been just as safe.

Now setup backups.

RAID is not a backup, it’s a resilience technique.
Clear. Backup set up. Weeky replication configured pointing at another 750GB HDD :)
 
Top