jebusfreek666 Posted February 6, 2018 Share Posted February 6, 2018 Ok, so I have read over all the info I can find. I feel like I have a fairly good grasp on how parity works in unraid. I have also seen that it is recommended by most to do monthly parity checks to help diagnose a bad disk. But no where have I seen how/when parity is actually created after data is added to the array. What I mean is, I added cache and data disks and loaded my array with all the data I had to start with. Then I added a parity disk, and it calculated parity based on what was on the drives at that time. Now, after this is done, I add sonarr and radarr and download media. We'll say that I add 3 files a day to my cache, then then gets moved to the array by mover. Doesn't this completely change what the parity calculation should be for these sectors? And if I have it setup to do monthly parity checks, does that mean everything I added between the last check and the next one is essentially not protected? That sounds completely wrong to me. If that was how unraid worked, I don't think anyone would use it. So, the only thing I can imagine is that it is doing checks and changing the parity disk at the same time as it is writing to the array to keep them all in sync? I have not seen this documented in my reading, but I don't see any other way for it to work. If this is the case, then wouldn't monthly parity checks really be more of a "double check", not really essential but not a bad idea? I get that they can protect you from a disk with a sector that is not being used silently going bad and trashing the disk entirely. But, aside from this unlikely (and rare I imagine) scenario, parity checks are just kind of a safety net? Also, IF this is how parity works (writing to array and parity at the same time), then how does it work with dual parity since the dual parity calculation is completely different? The one must have to wait until the first parity and data disk are in sync, then do a separate check on its own? Sorry if these are simple, dumb questions. I am trying educate myself as much as possible on this, since I have dove in head first. I am one of those people that, for me, it is not good enough that something works. I have to know why it works too. Quote Link to comment
bob_stan Posted February 6, 2018 Share Posted February 6, 2018 The parity check is just that - it checks that the parity is correct. It has nothing to do with updating the parity disk when files are added. Parity is calculated whenever a file is added, or if you are using a cache drive, when the file is moved from the cache drive to a disk in the array. I am unsure exactly how dual parity drives work, other than a different type of parity calculation is done for the second disk. However, I am sure that this parity is also calculated at the time the file is moved into the array. Quote Link to comment
trurl Posted February 6, 2018 Share Posted February 6, 2018 Any write to the parity array updates parity at the same time. And everything that isn't a read is a write. Write is a write, copy is a write, delete is a write, move is a write, and format is a write. Parity checks can be correcting or noncorrecting. Quote Link to comment
trurl Posted February 6, 2018 Share Posted February 6, 2018 Parity is not at the file level. Parity knows nothing at all about files. It is about bits. Parity2 is similar, just a different calculation. It is still about bits. Everything about how unRAID operates makes much more sense if you understand parity. It isn't complicated. Here is a wiki explaining parity: https://lime-technology.com/wiki/UnRAID_6/Overview#Parity-Protected_Array Quote Link to comment
trurl Posted February 6, 2018 Share Posted February 6, 2018 Parity and parity2 are written simultaneously with the data write. There are 2 methods of writing parity, both explained here: 1 Quote Link to comment
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.