Adding 2 more drives to 4 disk mirror

VioletDragon

Patron
Joined
Aug 6, 2017
Messages
251
Hi,

I'm currently using 4x 1TB disks I have 2 1TB disks spare I'm wondering if I can add these to the mirror? This array is for ISCSI so adding space isn't the key just another two drives incase one drive or 2 drives die. Is this even possible or do I have to Re-build the miror?

Thanks.

Jack.
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
It's helpful if you post the output of zpool status. That way we can see your existing layout.

In some cases of read mostly, having 2 vDevs of 3 disk mirrors can improve performance. But for writes, it's slower since all 3 disks in the mirror have to be written before a write is complete. In general, the more vDevs the better iSCSI responds.
 

VioletDragon

Patron
Joined
Aug 6, 2017
Messages
251
It's helpful if you post the output of zpool status. That way we can see your existing layout.

In some cases of read mostly, having 2 vDevs of 3 disk mirrors can improve performance. But for writes, it's slower since all 3 disks in the mirror have to be written before a write is complete. In general, the more vDevs the better iSCSI responds.

Hi thanks for your reply, this is what my configuration looks like.

Screenshot from 2020-10-04 23-59-47.png
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
Yes, you can add a disk to each "mirror" vDev for greater redundancy. This can also increase read performance because of the potential for 3 parallel reads to occur.

In general, iSCSI does better with more vDevs, so adding the 2 spare disks as another mirrored vDev is an option. (Of course, you loose the spare nature of these 2 "spare" disks. And you can't remove the vDev easily...) Also note that any existing data will still remain where it is, across just 2 of the 3 vDevs.
 
Last edited:

VioletDragon

Patron
Joined
Aug 6, 2017
Messages
251
Yes, you can add a disk to each "mirror" vDev for greater redundancy. This can also increase read performance because of the potential for 3 parallel reads to occur.

In general, iSCSI does better with more vDevs, so adding the 2 spare disks are another mirrored vDev is an option. (Of course, you loose the spare nature of these 2 "spare" disks. And you can't remove the vDev easily...) Also note that any existing data which still remain where it is, across just 2 of the 3 vDevs.

So that means 3 disks per vDev am i correct?
 

VioletDragon

Patron
Joined
Aug 6, 2017
Messages
251
Yes, you can add a disk to each "mirror" vDev for greater redundancy. This can also increase read performance because of the potential for 3 parallel reads to occur.

In general, iSCSI does better with more vDevs, so adding the 2 spare disks are another mirrored vDev is an option. (Of course, you loose the spare nature of these 2 "spare" disks. And you can't remove the vDev easily...) Also note that any existing data which still remain where it is, across just 2 of the 3 vDevs.

How exactly do i add two drives to each of the existing mirrors? Im guessing i dont setup another Mirror?

Screenshot from 2020-10-05 05-10-22.png
 
Last edited:

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
So that means 3 disks per vDev am i correct?
Yes.

How exactly do i add two drives to each of the existing mirrors? Im guessing i dont setup another Mirror?

View attachment 41850
Some of the more advanced features, (and less commonly used), may have to be done on the command line. The GUI has changed a bit, so I don't know if it is possible from the GUI.

And correct, if you want to increase your redundancy, (and not increase the amount of storage), you don't want to setup another mirror.
 

VioletDragon

Patron
Joined
Aug 6, 2017
Messages
251
Yes.


Some of the more advanced features, (and less commonly used), may have to be done on the command line. The GUI has changed a bit, so I don't know if it is possible from the GUI.

And correct, if you want to increase your redundancy, (and not increase the amount of storage), you don't want to setup another mirror.

I rather have redundancy than increasing storage. What do I need to do in command line? What command?
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
The tricky part is the partitioning. You want the 2 new disks to look like the existing disks, (unless they are slightly smaller). I don't have good instructions on how to do that for FreeBSD. (Basically I'd fumble through it because I would know what the result should be... but I can't recommend that to others :smile:.

Whence that is done, the ZFS command is pretty trivial;
Code:
zfs attach iSCSI OLD_DISK_MIRROR0 NEW_DISK1
zfs attach iSCSI OLD_DISK_MIRROR1 NEW_DISK2

It won't mater which of the disks you select from the mirror vDevs. But, you have to select only one per vDev.
 

VioletDragon

Patron
Joined
Aug 6, 2017
Messages
251
The tricky part is the partitioning. You want the 2 new disks to look like the existing disks, (unless they are slightly smaller). I don't have good instructions on how to do that for FreeBSD. (Basically I'd fumble through it because I would know what the result should be... but I can't recommend that to others :smile:.

Whence that is done, the ZFS command is pretty trivial;
Code:
zfs attach iSCSI OLD_DISK_MIRROR0 NEW_DISK1
zfs attach iSCSI OLD_DISK_MIRROR1 NEW_DISK2

It won't mater which of the disks you select from the mirror vDevs. But, you have to select only one per vDev.

They're all the same size disks and same make model. Is this safe to do? Or should I power down all my VMs?
 

VioletDragon

Patron
Joined
Aug 6, 2017
Messages
251
The tricky part is the partitioning. You want the 2 new disks to look like the existing disks, (unless they are slightly smaller). I don't have good instructions on how to do that for FreeBSD. (Basically I'd fumble through it because I would know what the result should be... but I can't recommend that to others :smile:.

Whence that is done, the ZFS command is pretty trivial;
Code:
zfs attach iSCSI OLD_DISK_MIRROR0 NEW_DISK1
zfs attach iSCSI OLD_DISK_MIRROR1 NEW_DISK2

It won't mater which of the disks you select from the mirror vDevs. But, you have to select only one per vDev.

Hi,

I got the drives added to the vDevs and up and running.
Screenshot from 2020-12-05 12-42-45.png
Screenshot from 2020-12-05 08-58-24.png
Screenshot from 2020-12-05 07-01-55.png
 

Arwen

MVP
Joined
May 17, 2014
Messages
3,611
The final result looks good. You have your 3 disks per vDev mirror. The pool iSCSI can loose up to 2 disks per vDev, (for a total of 4 disks), without data loss.

2 things. First, if you used the command line to add the 3rd mirrors, the GUI may be confused on your iSCSI pool's layout. Every thing else should still be okay. A reboot tends to fix that. Or manual export and import of the pool, (from the GUI).

Second, if you got the partitioning wrong, you can have trouble. As I said, I am no expert in FreeBSD / NAS. But if you print out the partition table of the old disks, and compare to the new, if they are same, great. Otherwise you may have to fuss with it some more, (you can remove a mirror disk on a mirror vDev live).
 
Top