Is it possible to mirror a striped vdev by adding a 2nd striped vdev?

jagdtigger

Explorer
Joined
Jun 3, 2017
Messages
65
Hi all!

So i have a striped pool consisting of 2 SSD, it serves as system dataset and it stores the jails. Originally i used only 1 ssd but needed more space so i added a 2nd and striped them without thinking about the future... Now id like to add some redundancy by adding a 2nd identical vdev and mirroring the vdevs. Is this possible on truenas or i have to face the torture of moving jails?

Thanks in advance! :)
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Not exactly. But you can add a second mirrored SSD to each of your devices to create one striped vdev of two mirrors. Not sure if it can be done in the UI but definitely on the command line. Copy partition table, then use zpool attach ...
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
You could, but that would be overkill and a bit time consuming.
  • gpart backup olddrive | gpart restore newdrive
  • gpart list newdrive
  • look for the rawuuid of the partition with type freebsd-zfs
  • zpool status yourpool
  • look for the uuids of the devices in the pool
  • zpool attach yourpool gptid/uuid-of-olddrive gptid/uuid-of-newdrive
  • repeat for second new SSD but attach to the other old one
Use SSH and not the shell in the UI so you can reliably copy&paste those uuids.
 

jagdtigger

Explorer
Joined
Jun 3, 2017
Messages
65
Ok, if all goes well ill get the 2nd set of ssds tomorrow then i can try this.
 

jagdtigger

Explorer
Joined
Jun 3, 2017
Messages
65
Ugh, one of the ssd's in the pool is 119,24 GiB, the other is 111.79 GiB. The two new ssd is also 111.79 GiB..... :S Cant clone the bigger drive.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
IMHO you should buy identical models for mirror setups.
 

jagdtigger

Explorer
Joined
Jun 3, 2017
Messages
65
In an ideal world yes, but back when i created this pool i had different places to put the money so i used what i had lying around... :/ All of the drives state that they are 120 GB, i did not know manufacturers interpret that number this liberally..... :S
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
Maybe there is some wiggle room - please post the output of gpart show <119-disk>.
 

jagdtigger

Explorer
Joined
Jun 3, 2017
Messages
65
Here you go:
Code:
root@zenifer[~]# gpart show ada0
=>       40  250069600  ada0  GPT  (119G)
         40         88        - free -  (44K)
        128    4194304     1  freebsd-swap  (2.0G)
    4194432  245875208     2  freebsd-zfs  (117G)


And for reference the smaller drive in the pool:

Code:
root@zenifer[~]# gpart show ada2                       
=>       40  234441568  ada2  GPT  (112G)
         40         88        - free -  (44K)
        128    4194304     1  freebsd-swap  (2.0G)
    4194432  230247176     2  freebsd-zfs  (110G)
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,776
So even if we remove the swap partition, it will not be large enough. Sorry.
 

jagdtigger

Explorer
Joined
Jun 3, 2017
Messages
65
Thanks for trying to help, it seems i wont be able to dodge a backup-destroy-recreate-restore circle. This wont be pleasant thats for sure.....
 

HoneyBadger

actually does care
Administrator
Moderator
iXsystems
Joined
Feb 6, 2014
Messages
5,112
What version of FreeNAS/TrueNAS are you running? If you have the option of vdev removal, you could add your mirrored set of two new "110G" SSDs as a mirror vdev, then remove a single one of your stripe vdevs (migrating the data to the remaining stripe + the mirror) and then blank the removed "120G" drive and attach it to the stripe vdev. End result is 2x2-way mirrors, one of 2x120G and one of 2x110G. Might consume a little more memory for redirection tables though, but with the small amount of data I don't see it being a major issue.

If you do have to backup-destroy-recreate-restore, you can relocate system dataset in the UI - if you had to, it could probably live on your boot device temporarily. Jails though will be more of an issue of course.
 

jagdtigger

Explorer
Joined
Jun 3, 2017
Messages
65
I already destroyed the pool..... But now that im starting from scratch i set it up as raidz1.

/EDIT
Seems like the jails survived.....
 
Last edited:
Top