"Extend" should be "Attach" for a stripe or mirror vdev

In ZFS terminology, to convert a single-disk to a 2-way mirror vdev, you “attach” another disk to it. To convert a 2-way mirror vdev to a 3-way mirror vdev, you “attach” another disk to it.

To go backwards, you “detach” a disk from the mirror vdev.

There is no such thing as a zpool extend subcommand. There is zpool attach, which affects the redundancy (not capacity) of a mirror vdev.

The TrueNAS UI, since as far back as Core and possibly FreeNAS, refers to the “Attach” function of stripes and mirrors as “Extend”. This can cause confusion with new users and is sometimes conflated with “RAIDZ expansion”, which actually does increase the capacity.

Not only is “Extend” misleading for a stripe or mirror, as it makes one think they are extending the capacity of their pool, but it doesn’t align with the actual terminology used by ZFS. If you read online how to manage mirror vdevs, you will read about “Attach” and “Detach”. The only references to “Extend” are from TrueNAS guides.

EDIT: @SmallBarky brought up a good point about the wording used for a RAIDZ vdev. The official ZFS terminology is also “attach” for RAIDZ vdevs, but it behaves differently than with a mirror vdev. Rather than increase the vdev’s redundancy, it increases its capacity. In this case, leaving it as “Extend” or renaming it to “Expand” might benefit the TrueNAS end-users, even if it deviates from the official ZFS terminology.

Is this proposed change just for the Mirror config or Raid-Z(1,2,3) also? I made a 3 wide Raid-Z1 and it looks to use the same Extend button and terminology for adding a drive (Raid-z expansion).

I think I had suggested adding tool tips to the buttons in the past. Maybe single drive stripe VDEV should show in the window like a Mirror or Raid-Z(1,2,3) with the VDEV and then the drive(s) listed below it.

Three VDEV types. Maybe Single Stripe should behave like Mirror and have VDEV drop down, even with a single drive, to match other two VDEV types and buttons.



Mirrors and stripes (single drives) only. They are the only types of vdevs that can have additional disks “attached” to affect its redundancy without any change to capacity.

single drive → 2-way mirror
2-way mirror → 3-way mirror
3-way mirror → 4-way mirror

No matter how many times you “attach” an additional disk to an existing single-drive stripe or mirror vdev, you only increase its redundancy. This does not increase its capacity or the pool’s capacity.

With the new RAIDZ expansion, you’re actually increasing the capacity of the vdev, which affects the capacity of the pool.

I didn’t have SCALE or CE to test that out. It’s technically the incorrect term, but at least “Extend” is closer in function to RAIDZ expansion.

This might be an oversight by the devs or it could be intentional? If it is left as “Extend” or renamed to “Expand”, it would deviate from official ZFS terminology, but at least it would be intuitive for what it does. I’m not sure if using the official “Attach” term for a RAIDZ vdev would benefit the end-user of TrueNAS. I’m split on this one.

I’ll avoid ranting about this. I have my issues in how ZFS was originally designed with its presentation to the end-users. It’s not just what you pointed out (which isn’t unique to TrueNAS), but the way the pool and root dataset are fused is another point of contention.

You’re right though. Even a single-drive stripe should be presented as a (non-redundant) vdev. It makes it more obvious that it can be “upgraded” into a redundant mirror vdev. You could make the argument that a single drive in a pool is actually a non-redundant 1-way mirror vdev that has potential to become redundant. :wink: It should be presented as a vdev to the user.

I want to be clear that if this change is implemented, it should only be available to members of the TrueNAS YouTube channel.

I like the idea of using Attach and Detach for Mirrors. (But, am out of votes… sorry.)

However, I think Expand for RAID-Zx instead of Extend, would be better.

The best resolution would be to use “Attach” for a stripe or mirror vdev and use “Extend” or “Expand” for a RAIDZ vdev.

“Attach” makes sense for stripes and mirrors because it only affects redundancy, not capacity. “Extend” or “Expand” makes sense for RAIDZ because the redundancy remains the same, but it increases the capacity of the vdev.

Pool expansion is not related to this. While it is true you can replace every disk in a vdev with a larger capacity disk, this is a matter of replacing existing disks, not attaching additional disks to the vdev.


Stripes and Mirrors → Rename “Extend” to “Attach”.

RAIDZ → Leave it as “Extend” or rename it to “Expand”, since people know about RAIDZ “expansion”.

I’m tempted to close this just for the use of that thumbnail. :laughing:

Let me see if there’s a logic behind it, but I imagine it’s in the concept that @SmallBarky brought up w.r.t the terminology differing.

That is exactly what it is. The “stripe” language is confusing imo. There is no “stripe” vdev. ZFS always stripes between vdevs, whether those be single drive (special case of a mirror), n-way mirror, or raidzN.