Drive Space


D-Nice

Recommended Posts

I watched a you tube vid that said the parity drive just needs be big as your largest drive. If that is true... just  want to make sure it can recover all of the drives I put in.

 

Example Parity Drive 8GB

 

Drive 1 - 8 GB (parity)

Drive 2 - 8 GB (data)

Drive 3 - 4 GB (data)

 

So total storage is  12 GB, 20 GB?  If so, how will a 8 GB drive restore all the data from my total storage per say if I have total storage of 12 GB? Sure if only the 8 GB drive died, only 8 GB needs to be recovered. However the parity drive will need to store the data from the 8 GB and 4 GB to do a full recovery. So if I lost a 8 GB drive it will do a full 8 GB recover to a new 8 GB drive? Just want to make sure I put the right drives in the first time. Let me know what I am missing.


Thanks,

 

Link to comment

It would be better if you refer to the first data disk as disk1 and just refer to parity as parity. That is how Unraid refers to it. So in your example your total storage is 12GB.

 

Parity doesn't contain any of your data, and parity by itself cannot recover any data. Parity plus ALL the other disks allow Unraid to calculate the data of a missing disk.

 

The parity calculation is quite simple and understanding it can help you better understand how Unraid operates. Here is a wiki:

 

https://wiki.unraid.net/UnRAID_6/Overview#Parity-Protected_Array

Link to comment

Yep it's the wiki is pretty much on point with the youtube vid: 

 

 

When I read the parity explanation it makes sense but still mind blowing to say 8 GB will recover 12 GB of data. Seems to make more sense if the data is always spread across multiple drives. However there are options to keep data on specific drives.

Link to comment
1 hour ago, D-Nice said:

still mind blowing to say 8 GB will recover 12 GB of data

That is the wrong way to think of it. And in your scenario, there is no way the 8GB could ever recover the 12GB. The 8GB parity plus the 8GB data disk could recover the 4GB data disk, or the 8GB parity plus the 4GB data disk (the remaining 4GB is assumed to be zero for the calculation) could recover the 8GB data disk. It could never recover both data disks at the same time since parity has none of the data and one of those disks must be present for the parity calculation.

 

(I have edited the example below to discuss TB disks instead of GB disks since GB disks aren't that relevant these days😉)

 

You could, for example, have a 1x8TB parity and 10x8TB data, so 80TB total of storage. That 8TB parity does not contain any data from any of the disks, and by itself it cannot recover anything. If one of the 10 data disks failed, then that 8TB parity plus the remaining 9x8TB data disks, would allow the missing data to be recovered.

 

Dual parity is supported by Unraid, and if you had 2 parity disks, then it could recover from 2 simultaneous failures, but neither parity would have any data from any of the disks.

Link to comment

Also, the parity calculation isn't that different from what is used for traditional RAID. The difference with Unraid is the data isn't striped, so each disk is an independent filesystem that can be read by itself and each file is stored completely on a single disk. If you ever did lose 2 data disks in a system with only one parity disk, those 2 disks could not be recovered, but the data from all the other disks would be fine since each disk can be read independently.

Link to comment

A follow-up to my last questions. If I have

 

Disk 1 (8GB) - Data

Disk 2 - (8GB) Data

Disk 3 - (8GB) Parity

 

Disk 1 has an img file that is 8GB. Disk 2 has a 8 GB iso file. I get the parity part as far as how it determines how to recover based on the bit. My question is where is the actual data (backup) stored? If drive 1 fails the parity drive will rebuild by solving the parity bit. So bit is solved, but where does it grab the data from to rebuild the entire 8GB img file if data is never stored on the parity drive. To my understanding, it's not stored either on drive 2.

Link to comment

The original contents of the parity drive was generated by doing a calculation (on a sector by sector basis) using the values of the corresponding sectors on disk1 and disk2,    If disk1 fails then unRAID can do a similar calculation using disk2 and parity to work out what each sector on disk1 should contain.   If you have more data disks then the same principle is applied.   There is a detailed description of how parity works in the online documentation.

 

This is why it is important that the health of ALL the drives is monitored.   In a recovery process all the drives other than the failed drive need to read without error to recover the contents of each sector on the failed drive.  

 

Also because it works at the physical sector this is why any recovered disk is an exact copy of the original including its file system type.  It is also the reason why a rebuild cannot correct any file system level corruption that occurred before the disk failed,

Link to comment
2 hours ago, D-Nice said:

I get the parity part as far as how it determines how to recover based on the bit. My question is where is the actual data (backup) stored?

The data to recover is calculated from parity and the rest of the disks as explained in the wiki and video. It doesn't need to be stored anywhere.

Link to comment

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.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.