3 disk array

ilavisik

Cadet
Joined
Jul 14, 2021
Messages
2
Hi!
I have 3 disk of different sizes.
Can i make mirror of one 2tb and two 1tb disk?
I want use maximum capacity and mirroring. If i make raidZ I will not be able to use the entire disk space for 2TB disk
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
You can only mirror disks of equal size. You can't use 2 disks to make a mirror of a single disk.

What you're wanting to do won't be possible with ZFS/TrueNAS.

You may want to consider UNRAID or Xpenology if you want to go down the path of unequal disk sizes and using all capacity.
 

ilavisik

Cadet
Joined
Jul 14, 2021
Messages
2
I put it a little wrong.
I need mirror of stripe 2*1tb and 2tb disk. In other words, combine 2 disks into one kind of device and make a mirror with it.
If I make stripe manually Truenas Doesn't see the virtual device in /dev/stripe
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,702
I need mirror of stripe 2*1tb and 2tb disk. In other words, combine 2 disks into one kind of device and make a mirror with it.
I understood you the first time.

You can't do that with TrueNAS.

If I make stripe manually Truenas Doesn't see the virtual device in /dev/stripe
You can probably do it with some CLI messing around but I have no idea how TrueNAS would play with it, so you may need to go raw FreeBSD or Linux if you want to go there with no unexpected consequences.

The device probably isn't seen because TrueNAS is looking at whole drives like da1, da2, etc.

You may be able to manually partition your manual stripe and attach it as a mirror to the 2TB using zpool attach and the gptid of the partition.
 

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,737
What would work and what you could manually create is the following:
  • Partition the larger disk into two halves.
  • Create a pool from those two vdevs - unmirrored, a stripe.
  • Attach the two smaller disks as mirrored devices to the existing vdevs.
For this to work you will have to
  • Know how to create GPT partition tables.
  • Make sure to create some swap space on the disks in the first partition.
  • Carefully make sure the partition sizes all match.
  • Make sure to use the partitions' UUIDs, not the device names for ZFS commands.
The result will
  • Probably (!) work with TrueNAS.
  • Give you the desired 2TB capacity and single device redundancy.
  • Have really bad performance due to excessive seeks to access both halves of the larger disk.
I would not do it.
 

Stux

MVP
Joined
Jun 2, 2016
Messages
4,358
I have done similar shenanigans, but only as a temporary solution to create enough redundant space for a backup pool when transferring or changing the layout of another pool.

You don't actually need to do the swap space etc, just want to ensure that the partitions you create are smaller than the 1TB disks.

You need to use the command line to add/remove the partions because TrueNAS won't let you add partitions, and if you remove a partition it will try to format the disk.

I think it should work in TrueNAS.

And I've recently been playing with similar stuff in TrueNAS in order to split a SLOG device amongst multiple pools.

But you still only get 2TB available. You might as well just use all 3 disks in a RaidZ1. It will work from the GUI, you'll get the same 2TB, similar redundancy and the performance will probably be okay.
 
Last edited:

Patrick M. Hausen

Hall of Famer
Joined
Nov 25, 2013
Messages
7,737
But you still only get 2TB available. You might as well just use all 3 disks in a RaidZ1. It will work from the GUI, you'll get the same 2TB, similar redundancy and the performance will probably be okay.
Seconded. You get a supported setup, and 2 TB to use ...
 
Top