Adding unassigned disk to a pool

Hi folks,

Here’s the specs for the box:

Intel(R) Xeon(R) CPU E3-1230 V2 @ 3.30GHz
32GB RAM
Supermicro X9 scmf
25.10.4 - Goldeye

Server had 5x8TB drives on a Raidz1 pool and I added a drive to it. It shows under disks, and, in fact, storage sees it as unassigned with an option to add to a pool:

I click the option and select add to an existing pool in the next screen, click on add disks and go over the next screen options and it seems wants to add a vdev to the pool (At least 1 vdev is required to make an update to the pool), so:

  • Should I create a 1 disk vdev to be added to my main pool? If so why the option is offered in the GUI (add a DISK)?
  • Will that operation cause any data security issues (lose that 1 disk vdev and lose the entire pool)?

Thanks!

No

Yes

I think you want this section of the online docs. Guessing you want to make it a 6 wide Raid-Z1

Thanks.

Interesting why it shows that option in my OP (to add the disk to the pool).

The GUI needs to be flexible enough to handle most the situations you would do. It wouldn’t be much of a problem to make that type of mistake on a single stripe drive pool or a Mirror VDEV as you can back out of those mistakes without having to destroy and recreate the pool. If the original pool is a Raid-Z(1,2,3) that is where the mistakes happen.
It’s best to try to work through the procedures using a VM for testing, if possible. I have to do it every so often when giving advice just to make sure I have it correct.
If something isn’t clear on the online documentation, you can always ask questions to the forum or give feedback directly on the online documents pages. There is a little, blue button on the right side, Feedback.
ZFS is a bit complicated on what can be done with the pools / VDEVs and the terminology

1 Like

Thanks for your reply.

I’ve been running ZFS on FreeBSD before FreeNAS → TrueNAS. Adding a disk to a ZFS pool is a new feature, year or two old, and I’m not familiar with it.
In fact as always I ran a full backup to another server before playing with it.
Regarding GUI I don’t agree a function becames available in it if you are not supposed to execute that function and further more if an error occurs has to be displayed to the user.
For now I’m adding the disk and will check status tomorrow.

…and how does the GUI decide if you’re “supposed to” execute that function?

Yeah, Free/TrueNAS has always been weak in this regard–it’s always been way too easy to get a stack trace out of it. It’s better than it used to be, but still lots of room for improvement.

The same way it found unasigned disk: logic. That same function can me modified to be improved for couple scenarios like: (1) Is there an existing pool? If yes add to it or create a new; (2) No pool exists - create a new?; etc, but that’s a question to be asked to TN Development team.

I know and I do think this is one of the best solutions out there. I did my own with FreeBSD years ago, but you guys did a better job than me.

The logic is doing exactly what you say it should be doing–if you have an existing pool, you can add an unassigned disk to that pool, you can create a new pool with that disk, or of course you can do nothing at all with it. If you try to add a single-disk vdev to a RAIDZn pool, it will warn you that it’s a dumb thing to do, but it will still allow you to do it, because it’s a technically-valid (albeit almost always stupid) configuration.

It didn’t do it for me. Anyways I’m doing my rewrite after adding the disk using other options. Thanks for your reply as aways.

You’re meant to extend a RAIDZ vdev from a different section in the UI. “Add to Pool” is only for adding new vdevs.

I might have missed that in the screen on my GUI, that said add to NEW or EXISTING pool. See my OP please.

Adding a vdev to an existing pool is still adding a new vdev. Extending a mirror or RAIDZ vdev is different.

There might be room for improvement as the current way for adding a VDEV (creating new pool or adding to existing), Raid-Z Expansion (Extend button) or adding a drive to a Mirror or to make a Mirror (Extend button) from a single drive (stripe) VDEV. The logic or flow of the menus is a bit off, especially for users that don’t work with ZFS very often. I can find and work out what I need but I still work through items in a VM when giving advice on the forums

Maybe three main menus or options off of the Unassigned Disks, Add to pool option?
Add a pool or VDEV
Raid-Z Expansion
Mirrors

1 Like

In Core, you go to the pool’s “status” page if you want to extend a vdev. It’s not intuitive.

In SCALE or CE, I think there’s a VDEV menu that is separate from the “Add to Pool” button on the Storage Dashboard page.

I agree with @SmallBarky that it could be designed better.

I’d say that the “Add to Pool” button from listing disks should not exist.

Better to force users through either “Add Pool” or “Add Vdev” to an existing pool. There is no good case to add a single drive as a new data vdev to an existing pool: Certainly not for a raidz# pool, and not even for a mirror pool, as one should really add a (2+)-mirror rather than a single drive. Single drive non-data vdev (SLOG, L2ARC) are already a specialised case, and single drive special/dedup vdev should be a big NO. (The legitimate edge case is adding a new data drive to a stripe pool, but creating the stripe in the first place should come with a warning.)

This button just looks to me as an invitation to make mistakes—especially irreversible mistakes.

1 Like

I’ll just leave this here. :wink:

It gives the impression of working like Unraid. “Add as many drives as you want. If you need protection from losing 1 or 2 drives, just add 1 or 2 parity drives that are at least as big as a data drive.”