[SOLVED] Non-destructively turn 2-way mirror into 3-way mirror vdev?

Status
Not open for further replies.

Will Dormann

Explorer
Joined
Feb 10, 2015
Messages
61
Hi folks,

I've got a setup where a slot will be opening up in our storage array, and I'd like to turn a 2-way mirror vdev into a 3-way mirror vdev. The reasoning behind it is for multiple reasons:
  1. "hot spares" don't seem to make sense at all. At the point where a drive fails, wouldn't it be better to have a drive that is already populated and ready go go, as opposed to one that needs to be filled with data, thus stressing the existing drives in the process?
  2. ZFS should do round-robin reads on mirror vdevs, which should improve read performance slightly.
  3. Increased redundancy, obviously.
Now, the question of how to turn a 2-drive mirror into a 3-drive mirror. Conceptually, it seems pretty simple: just duplicate the data from either of the drives and then activate it so that it continues to participate in the mirror. However, I can't seem to find the way to do it with ZFS.

It won't be a problem to destroy and recreate the vdev (and subsequently zpool). However, if there's a non-destructive way to convert a 2-way mirror into a 3-way mirror, I'd obviously prefer that route. Also, if 3-way mirrors are a bad idea for some reason, I'd like to know why, and I can just use the extra drive bay in another way.

Thanks.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
The process should be the same as converting a single disk to a two-disk mirror. I haven't done it, but this post looks like it has instructions that should work.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
Using the Oracle docs is not a good idea... at all. If you can't shutdown now you should leave it as a 2-way mirror until you can do a shutdown.
 

danb35

Hall of Famer
Joined
Aug 16, 2011
Messages
15,504
given that those instructions involve shutting down the server, that's something I'm not willing to try.
You're willing to destroy and recreate the pool, but not shut down the server? Seems odd to me. In any event, though, as I read those instructions, the shutdown is just to make sure you don't inadvertently wipe the partition table of one of the disks that's already in your pool. If you trust yourself to not goof that up, I don't see any particular reason that the server has to be shut down. But if you wipe the wrong disk, it's on you.
 

Will Dormann

Explorer
Joined
Feb 10, 2015
Messages
61
I have multiple zpools. And yes, I'm fine with destroying the one in question. It's a small annoyance to migrate data off of and destroy the zpool in question and then re-create it. Shutting down the server, on the other hand, means that all storage provided by the server goes away. There's a pretty significant difference.
 
  • Like
Reactions: BoA
Status
Not open for further replies.
Top