Page 1 of 1
Does ZFS stripe if multiple VDEV in Pool?
Posted: 07 Sep 2014 17:16
by c71clark
Assuming drives of the same size:
If I make a VDEV out of a single drive. Then put it and 2 other's VDEV's just like it into a Pool, does ZFS stripe between them? Or does it fill up each VDEV sequentially?
Would it be better to make the 3 drives into a single 'stripe' VDEV then Pool? Does data get written evenly between all 3 drives in this case?
Does ZFS have any issue if one of the 3 drives is a USB3 external drive? By that I mean that with a slower write speed, could this cause a problem?
How does either method handle very small files? Does it split a 1,000 byte file between 3 disks?
I'm just looking to see if it is possible to recover anything at all if you are missing one of a striped set of disks.
Re: Does ZFS stripe if multiple VDEV in Pool?
Posted: 08 Sep 2014 02:29
by substr
It will spread blocks across the three, but it doesn't sub-divide the blocks themselves. With equal speed drives, they would be spread pretty evenly.
If the vdevs are unequal in speed, there is a possibility the writes may be diverted away from the slower vdev.
In the case of a very small file, it ends up on one drive.(one block) Anything greater than one block, ZFS can do whatever it likes. It may put a small series of blocks on the same vdev, so that IOPs are reduced..
Without mirrors, or raidz, one drive missing means you lose everything.
Re: Does ZFS stripe if multiple VDEV in Pool?
Posted: 09 Sep 2014 05:05
by c71clark
So then let me put together an extreme example: I make a 3-vdev Pool: 1 vdev is a single large HDD, 1 vdev is a single mid-sized SSD, and 1 vdev is a 16gb usb3 thumb drive.
I write some misc files to this Pool. Say I write 5 GB worth of MP3 files, averaging 5mb each. Presumably, the SSD would get a larger percentage of the blocks due to it's speed. But what happens if I pull the thumb drive out and drop it in lava (heh)? Will ALL of the data in this Pool become garbage? Or is there any way at all that I can recover the data sitting on the other 2 vdev's in this pool?
Re: Does ZFS stripe if multiple VDEV in Pool?
Posted: 09 Sep 2014 05:57
by substr
The practical effect is that the pool will be inaccessible.
In theory, you might be able to scrape some files out of the other two remaining devices and reassemble them, or portions of them.
Re: Does ZFS stripe if multiple VDEV in Pool?
Posted: 09 Sep 2014 06:06
by c71clark
Thanks for the info. I have another one for you. I've been reading the documentation, but my mind works in weird ways that isn't covered, heh. Also, I'm trying to get a feel for the boundaries of this system.
Is this pretty much a silly thing to do? : 1 stripe vdev consisting of 2 HDD. 1 mirror vdev consisting of 2 HDD. Both vdev in the same Pool.
Is this essentially a RAID 0+1 setup? : 1 mirror vdev with 2 HDD. A second mirror vdev with 2 HDD. Both mirrored vdev into a single Pool.
It won't write perfectly across all 4 disks, but if any one of them fails, it can be replaced and you shouldn't lose anything.
Re: Does ZFS stripe if multiple VDEV in Pool?
Posted: 09 Sep 2014 06:26
by raulfg3
c71clark wrote: 1 stripe vdev consisting of 2 HDD. 1 mirror vdev consisting of 2 HDD. Both vdev in the same Pool.
this have no redundancy, you have a stripe of 2 disk in mirror and 2 disk in stripe
c71clark wrote: 1 mirror vdev with 2 HDD. A second mirror vdev with 2 HDD. Both mirrored vdev into a single Pool.
this is good and recomended, is a stripe of mirrors, you can grow you stripe adding more mirrors to it.
Re: Does ZFS stripe if multiple VDEV in Pool?
Posted: 11 Sep 2014 04:35
by c71clark
Is there a way to tell N4F to 'balance' all the data in the Pool so it is evenly (as possible) split between vdev's? Similarly, is it possible to tell N4F to move all data OFF a specific vdev so you cant remove/replace/upgrade it?
Re: Does ZFS stripe if multiple VDEV in Pool?
Posted: 11 Sep 2014 07:42
by b0ssman
no there is not.