Is it possible to strip a raidz array after it has data on it?

Status
Not open for further replies.

typoknig

Dabbler
Joined
Apr 13, 2013
Messages
16
I have a 3TBx8 raidz2 array (24TB, 18TB usable) which is nearly filled to capacity. As much as I would like to upgrade to 6TB drives or 8TB drives the 3TB drives are a better bang for the buck.

I was thinking about adding a strip to my array as is described here:

http://www.zfsbuild.com/2010/06/03/howto-create-striped-raidz-nested-zpool/

I only want to do this if the following points are true:

1.) The data that currently exists on my array is safe and will not be deleted during the process.
2.) The end result will be that my array (tank) will have 48TB, 36TB usable.

Can anyone confirm?

Thanks in advance!
 

Fuganater

Patron
Joined
Sep 28, 2015
Messages
477
Why not just add a few more drives to existing array?
 

Bidule0hm

Server Electronics Sorcerer
Joined
Aug 5, 2013
Messages
3,710
Yes, you can do that, no problem.

Use the GUI, do NOT use the CLI. Go to Storage --> Volume Manager and on front of "Volume to extend" chose your pool you want to extend then select the drives and the proper RAID type.

Why not just add a few more drives to existing array?

This is what he wants to do.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
I have a 3TBx8 raidz2 array (24TB, 18TB usable) which is nearly filled to capacity. As much as I would like to upgrade to 6TB drives or 8TB drives the 3TB drives are a better bang for the buck.

I was thinking about adding a strip to my array as is described here:

http://www.zfsbuild.com/2010/06/03/howto-create-striped-raidz-nested-zpool/

I only want to do this if the following points are true:

1.) The data that currently exists on my array is safe and will not be deleted during the process.
2.) The end result will be that my array (tank) will have 48TB, 36TB usable.

Can anyone confirm?

Thanks in advance!

Many people abuse the term "stripe" here. Let me straighten you out.

What happens is that you add a second vdev to your pool. This is an irreversible operation; once added, it cannot be removed.

When writing, ZFS will look at your vdevs to determine which one to write a block to. It is mainly looking at free space. So, given two vdevs that have the same amount of free space, it tends to write a little data to one, then the other one has "more" free space, so it writes a little data to the other, and back and forth. People like to think of this as striping, but it isn't, it's intelligent load balancing. In your case, when you add the second vdev, ZFS ois going to see a massive size imbalance and will promptly start writing all new data to the second vdev. Until they're approximately equal.

Yes, adding a second vdev has no impact on your existing data, and (to predict a question here) no, ZFS will not automatically try to move data onto the new vdev to balance things out.
 

typoknig

Dabbler
Joined
Apr 13, 2013
Messages
16
Why not just add a few more drives to existing array?
1.) I didn't think you could just grow raidz arrays like that.
2.) If it is possible to grow like that I would be on the wrong side of a probably URE by adding 8 drives (3TBx16 in raidz2).
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
You cannot add drives to an existing vdev; the current vdev you have will remain the way it is. You can increase the size of all the drives in that vdev, which is the only way to grow a vdev's size.

You can add more drives to the pool in the form of another vdev. When you extend a pool with the GUI, you're adding another vdev.
 

typoknig

Dabbler
Joined
Apr 13, 2013
Messages
16
Many people abuse the term "stripe" here. Let me straighten you out.

What happens is that you add a second vdev to your pool. This is an irreversible operation; once added, it cannot be removed.

When writing, ZFS will look at your vdevs to determine which one to write a block to. It is mainly looking at free space. So, given two vdevs that have the same amount of free space, it tends to write a little data to one, then the other one has "more" free space, so it writes a little data to the other, and back and forth. People like to think of this as striping, but it isn't, it's intelligent load balancing. In your case, when you add the second vdev, ZFS ois going to see a massive size imbalance and will promptly start writing all new data to the second vdev. Until they're approximately equal.

Yes, adding a second vdev has no impact on your existing data, and (to predict a question here) no, ZFS will not automatically try to move data onto the new vdev to balance things out.
Thanks for the info. It seems like you think this might be a bad idea. Is that correct? If so I'm open to suggestions, even if the suggestion is to buy bigger drives.
 

jgreco

Resident Grinch
Joined
May 29, 2011
Messages
18,680
Thanks for the info. It seems like you think this might be a bad idea. Is that correct? If so I'm open to suggestions, even if the suggestion is to buy bigger drives.

No. There's no harm in adding a second vdev. In normal use, it increases performance.

The problem comes from when someone doesn't quite understand all of what is going on and tries to add a single disk to their existing pool, and suddenly they have a pool that consists of their original RAIDZ2 and then a second vdev which is a single drive. When the single drive eventually fails, it kills the pool because there's no redundancy.

It is *very* worth it to understand what's going on before you make changes.

Buying larger drives and then replacing them one at a time is an alternative strategy. The downside to this is that it leaves you with a stack of unused drives.
 

cyberjock

Inactive Account
Joined
Mar 25, 2012
Messages
19,526
All of this is explained in my noobie presentation. ;)
 
Status
Not open for further replies.
Top