Best way to upgrade storage?

Hello everyone,
First off, i’m a total noob who created a simple smb server for my company.

I created this server using 2*4To drives using mirroring thinking i could upgrade it adding two exact same drive later. I’m apparently wrong. I already have those two new drive. So my question is simple :
I have 3,5To of data. Can I :

  • Move all the data on one empty 4To drive
  • Recreate the pool using Raid5 with 3 drives
  • Copy the data on this new pool
  • Emptying the loose drive and adding it to the server

Or am I out of luck and need another drive to do that ?

You cannot use “raid5” with ZFS: Single parity array is “raidz1” here—and not really advised, consider raidz2 for better safety.

Since you have four drives, you could just offline one drive from the mirror, create a 3-wide raidz1 (or a degraded 4-wide raidz2…) and replicate data from the degraded mirror to the raidz.
Since there’s no redundancy, the process is at risk, so it would be best to have a backup… or indeed one more drive.

1 Like

You can upgrade it by adding 2 extra drives. By adding another mirror.

But I think what you want to do is go from a 2-way mirror to a 4-way raidz1 is that correct?

If so, this can be done, but you risk your data unless you have a backup.

You should have a backup anyway.

So, if you want to do it, you detach one of the disks in the mirror, then using the 3 disks (2 new + detached) you make a new pool as degraded 4-way raidz1

Then you replicate from the first pool to the new pool

Then you replace the sparse disk with the original pool disk. (After destroying it)

Then you rename the pool back to the original name.

If you have any errors during that process you can lose your pool.

Hence the backup.

And since you have a backup, you could just recreate pool and restore from backup.

But doing the former is actually safer because you only have to resort to the backup if something goes wrong, instead of relying on the backup.

1 Like

Oh I can add another mirror to the pool ? I thought it wasn’t possible. It might be the safest (with the lack of backup) to just add another mirror, wait untill I can actually do clean backups and then recreate this server not the stupid way.

Yes.

Just use the storage ui to add two drives to your pool.

Just ensure it’s going to add a second mirror data vdev to your pool, and not something else.

(That should be what it recommends if you just try to add two disks)

Sorry, I can’t provide screenshots :wink:

Edit: core is a bit less clever iirc. But it should be simple.

1 Like

Ok then, thanks for the help !