Attach mirror drive to pool

Joined
May 11, 2021
Messages
2
Hi,

purely from the curiosity of hobby'ism, I managed to pick up a Microserver Gen8 for a good price to replace my Rpi4+external USB drive.

The setup atm is as follows:
-Microserver Gen8 with Celeron 1610T (will upgrade to one of the Xeon E3's soon)
-12gb ram
-Running ESXi with Truenas Core VM
-1x 4TB WD Red (/dev/da1) with data in stripe pool called Red4

I now got another empty 4TB WD Red that I want to mirror my data to from Red4.


After doing some reading there seem to be several ways to do it and i'm a little confused. Some say to attach the new drive to my existing pool via shell by using zpool attach, some suggest creating a new pool via GUI and proceeding from there.
I haven't yet tried either of those as I'd like to get it right the first time. I suppose the best option would've been having both drives in from the beginning, however one of them had the data and I had no way to backup to be able to start off with 2 clean 4TB drives.

Thanks for your advice
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
If I understand you well, you want both disks in the same pool (in a mirrored configuration), holding the same data.

There's nothing wrong with that happening after pool creation (it's only with RAIDZ pools that it's a problem).

You can do it in the GUI:

(having first installed the second disk in the machine and rebooted if necessary... maybe you have hot-swap)

Under Storage | Pools

Click the cogwheel for the Red4 Pool, select Status

Click the 3 dots to the right of the existing disk in the pool and select Extend (that's really the wrong word here... it should be attach... , but it's the right option)

Then select the new empty disk and confirm... then your new disk will become part of a mirrored VDEV together with the existing one and resilvering will start (to make the disks equal in content).
 

spg900ny

Dabbler
Joined
Feb 10, 2012
Messages
28
...then your new disk will become part of a mirrored VDEV together with the existing one and resilvering will start (to make the disks equal in content).

I just wanted to say thanks for your reply to OP. It was a huge help to me as I knew I had read somewhere that you could do this now in the GUI, but I couldn't find info on it anywhere else. For that reason I was a little leery about trying this (also because I had stupidly in the past accidentally expanded a volume when meaning to add a mirror), but I had a backup, so I figured I'd try it. Made me really happy to see that "MIRROR" label when it was done. Cheers, and thanks again.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,419
Click the 3 dots to the right of the existing disk in the pool and select Extend (that's really the wrong word here... it should be attach... , but it's the right option)

Still a stupid name for the option. Just got bitten again "no, I don't want to extend the stripe... I want to add a mirror disk to it... where's the attach option, afterall I just used 'detach' and want to reverse it...
 

Frank Collins

Explorer
Joined
Apr 10, 2019
Messages
53
Still a stupid name for the option. Just got bitten again "no, I don't want to extend the stripe... I want to add a mirror disk to it... where's the attach option, afterall I just used 'detach' and want to reverse it...
Did you ever get a fix for this?
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,703
Did you ever get a fix for this?
No fix is really required since the menu option is there (just labeled in a way that may confuse some people).
 
Top