[SOLVED] Is ZFS scrub required/needed in a VM if the host already does scrubbing?

May 13, 2020
13
4
8
44
Hi all,

This one has been on the back of my mind for a while.
So we have our hosts with ZFS RAID10 arrays which do their scheduled ZFS scrub every month.
On top of those arrays we have FreeBSD VMs using ZFS again, however the scrubbing schedule there is disabled.

Is there any benefit from doing ZFS scrubs in the VMs themselves given that they usually have 1 disk (no raid/z in the VM itself) and that the host is already doing regular ZFS scrub?

Bonus question, is there any benefit of doing ZFS scrubs at all in RAID10 (usually 2 groups of 2 disks each) given that this configuration doesn’t have parity?

Thank you for your time!
 
Is there any benefit from doing ZFS scrubs in the VMs themselves given that they usually have 1 disk (no raid/z in the VM itself) and that the host is already doing regular ZFS scrub?

You use ZFS on top of ZFS? Why not scrub? Data can also be corrupt in your VM, but maybe less likely.

Bonus question, is there any benefit of doing ZFS scrubs at all in RAID10 (usually 2 groups of 2 disks each) given that this configuration doesn’t have parity?
Does not depend on parity. If there is something corrupt it will be fixed (due to partiy or due to an extra copy). Also not all data is read constantly, so a scrub is always good.
 
  • Like
Reactions: Stoiko Ivanov
You use ZFS on top of ZFS? Why not scrub? Data can also be corrupt in your VM, but maybe less likely.
Yes, mostly for snapshots and as a nice volume manager in a VM. Scrubbing costs resources, mainly CPU, that is why I am wondering how the ZFS scrubbing works for zvols which are the VMs disks? So my thought is that if the host scrub repairs the zvol itself (and also does regular read hence prevents bit rot) there would be little point in doing the same in the VM?
 
So my thought is that if the host scrub repairs the zvol itself (and also does regular read hence prevents bit rot) there would be little point in doing the same in the VM?
IMHO: You have to decide if you want to be informed about errors (not bit-rot, but maybe virtio bug disk writes) on a scrub or on a read. Problem in a VM is that, you normally don't have redundancy (redundancy is outside), so you have to restore from backup. Therefore we scrub our ZFS-on-ZFS VMs regularly at night in order to have a better controlled window to find errors on the ZFS. However, we did not encounter any error inside of the VM up to now, so you may get away with not scrubbing.
 
  • Like
Reactions: clickbg
IMHO: You have to decide if you want to be informed about errors (not bit-rot, but maybe virtio bug disk writes) on a scrub or on a read. Problem in a VM is that, you normally don't have redundancy (redundancy is outside), so you have to restore from backup. Therefore we scrub our ZFS-on-ZFS VMs regularly at night in order to have a better controlled window to find errors on the ZFS. However, we did not encounter any error inside of the VM up to now, so you may get away with not scrubbing.
Excellent, I will look into scheduling scrubs on our important VMs. Thanks for the explanation.
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!