Increasing redundancy in mirror-pool

rakor

Dabbler
Joined
Sep 8, 2021
Messages
22
Hey there,

i build my TrueNAS with a two-disk mirror:
Code:
  pool: tank
 state: ONLINE
  scan: resilvered 994G in 02:21:10 with 0 errors on Sat Sep 11 10:48:18 2021
config:

        NAME                                            STATE     READ WRITE CKSUM
        tank                                            ONLINE       0     0     0
          mirror-0                                      ONLINE       0     0     0
            gptid/d484df9e-10d4-11ec-a6fe-b47af1dc529c  ONLINE       0     0     0
            gptid/49d200af-12c9-11ec-9db7-b47af1dc529c  ONLINE       0     0     0

errors: No known data errors


I would like to increase redundancy in near future. So I was looking how to zpool attach a new drive but couldn't find an option in the GUI. As I found an detach-Option I thought there should also be an attach. To be honset I think increasing redundancy is no fancy stuff.

I already learned that replacing a disc is better done by gui. I first did a replace (by doing an attach which should be followed by detach) and found the new disc as part of the pool in the pool-view in the gui, but in des disc-view it was not connected to the pool (maybe just a thing of gui, but could be irritating). Also the new swap-partition was not used.... After doing the replace by gui it worked as expected.

That's just said to explain why I'd like to have a way uing the gui.

So, is there a way using gui to attach a new disc to a mirror-pool?

Thanks
 
Joined
Jun 2, 2019
Messages
591
Short answer, not possible
 

rakor

Dabbler
Joined
Sep 8, 2021
Messages
22
Thanks for your reply. But the thread you linked is about switching the pool-layout, which is indeed not possible with ZFS. What I want ist just add another disc to a mirror-pool. Thats totally possible using cli zfs attach does this. But I'd like True-NAS-way that does not conflict with the gui and the config-db.

Code:
ZPOOL-ATTACH(8)         FreeBSD System Manager's Manual        ZPOOL-ATTACH(8)

NAME
     zpool-attach – Attach a new device to an existing ZFS virtual device
     (vdev).

SYNOPSIS
     zpool attach [-fsw] [-o property=value] pool device new_device

DESCRIPTION
     zpool attach [-fsw] [-o property=value] pool device new_device
             Attaches new_device to the existing device.  The existing device
             cannot be part of a raidz configuration.  If device is not
             currently part of a mirrored configuration, device automatically
             transforms into a two-way mirror of device and new_device.  If
             device is part of a two-way mirror, attaching new_device creates
             a three-way mirror, and so on.  In either case, new_device begins
             to resilver immediately and any running scrub is cancelled.

             -f      Forces use of new_device, even if it appears to be in
                     use.  Not all devices can be overridden in this manner.

             -o property=value
                     Sets the given pool properties. See the zpoolprops(8)
                     manual page for a list of valid properties that can be
                     set. The only property supported at the moment is ashift.

             -s      The new_device is reconstructed sequentially to restore
                     redundancy as quickly as possible.  Checksums are not
                     verfied during sequential reconstruction so a scrub is
                     started when the resilver completes.  Sequential
                     reconstruction is not supported for raidz configurations.

             -w      Waits until new_device has finished resilvering before
                     returning.

SEE ALSO
     zpool-detach(8), zpool-add(8), zpool-import(8), zpool-initialize(8),
     zpool-online(8), zpool-replace(8), zpool-resilver(8)

FreeBSD 12.2-RELEASE-p9          May 15, 2020          FreeBSD 12.2-RELEASE-p9
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
Joined
Jun 2, 2019
Messages
591
So you want a 3-way mirror? If you are that concerned about your data, you should be following a 3-2-1 backup strategy.
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401
So you want a 3-way mirror? If you are that concerned about your data, you should be following a 3-2-1 backup strategy.

You are right that there is no level of redundancy that can compensate for backups. As such, backups are always required. Still, a single 2-way mirror is the lowest level of redundancy possible and 3 drives do not offer much more options, RaidZ1 being discouraged. So a 3-way mirror does make sense.
 

sretalla

Powered by Neutrality
Moderator
Joined
Jan 1, 2016
Messages
9,700
The only thing is that you can not do this from GUI and must turn to CLI for that.
Short answer, not possible
Not correct. It has been possible since TrueNAS, but wasn't in FreeNAS. I see the OP mentions TrueNAS, so...

It is possible under Pool Status from the 3 dots next to the mirror VDEV itself (Extend is the option you want)

1631463037118.png
 

Heracles

Wizard
Joined
Feb 2, 2018
Messages
1,401

rakor

Dabbler
Joined
Sep 8, 2021
Messages
22
extend extends the pool by another vdev. So you can add another mirror to the existing mirror giving you something like this:
Code:
        tank    
          mirror-0
            ada0
            ada1
          mirror-1
            ada2
            ada3

So it does not increase redundancy, but increases available space.

Of course I have at a minimum one online-backup and one offline-backup (after having switched to TrueNAS I have to implement a new backup strategy... A new Thread will be started ;)). But backups are another thing. Having a disc-failure in a 2-way mirror gives you no more redundancy. The time you resilver your new disc gives high load to the only disc holding your data and the possibility of a total lost is significant higher than normal.
Building all from backup is a job I want to avoid.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
extend extends the pool by another vdev.
That's correct, but (since the release of TN 12.0, at least) it isn't the only thing extend does--it also does exactly what @sretalla says it does, which is add a disk as a mirror. Or did you think he was just making it up?
time you resilver your new disc gives high load to the only disc holding your data

So just like a scrub, which runs regularly? Or like a SMART self-test, which also runs regularly? What are disks for, if not to be read from?
 

rakor

Dabbler
Joined
Sep 8, 2021
Messages
22
That's correct, but (since the release of TN 12.0, at least) it isn't the only thing extend does--it also does exactly what @sretalla says it does, which is add a disk as a mirror. Or did you think he was just making it up?

Ahh... right... The ui is still confusing me :) Seems this is what I was searching for :) Yesterday I found an extend which does only add new vdev... But now I don't find it anymore :D
Well thats the solution

So just like a scrub, which runs regularly? Or like a SMART self-test, which also runs regularly? What are disks for, if not to be read from?
Shure are hdd made to be used. But while running a scrub or SMART you have redundancy left and so the posibillity to run in dataloss is less.
 
Top