Skip to content
View in the app

A better way to browse. Learn more.

Unraid

A full-screen app on your home screen with push notifications, badges and more.

To install this app on iOS and iPadOS
  1. Tap the Share icon in Safari
  2. Scroll the menu and tap Add to Home Screen.
  3. Tap Add in the top-right corner.
To install this app on Android
  1. Tap the 3-dot menu (⋮) in the top-right corner of the browser.
  2. Tap Add to Home screen or Install app.
  3. Confirm by tapping Install.

Why do writes involve all the disks?

Featured Replies

Here's maybe a dumb question: Why does the parity computation need to access all the drives when someone does a write to a single drive? It seems to me that once parity has been computed once, you can use it to infer what the other drives have without having to spin them up and read from them. For example, assume we have this data and are using even parity:

 

disk 1: 0

disk 2: 1

disk 3: 1

parity: 0

 

Now let's say I write a 0 to disk 3. If I first read the value, I'll know that I'm changing it. This means I have to change the parity as well:

 

disk 1: 0

disk 2: 1

disk 3: 0

parity: 1

 

There's no need to spin up disks 1 and 2. Reading just before a write should be pretty cheap, and would allow us to avoid having all the disks spinning, seeking, reading, etc.

I'm running 4.0 final and it seems to be doing that already. I'm copying files to my unraid machine, after awhile (past spin-down timer) I only see the parity+1 data drive running, the others have spun down.

Here's maybe a dumb question: Why does the parity computation need to access all the drives when someone does a write to a single drive?

 

You seem to have a misunderstanding.  Please refer Toms confirmation below from an earlier post.  I can also confirm, that when writing data only the drive being written to and the parity drive are spun-up.

 

In unRAID storage organization, bear in mind it's unusual to have more than a couple drives active at a time.  If you are reading a single file then only 1 drive is active, if writing then only 2 are active (data disk + parity disk).

For completion sake, these are the only times that unraid seems to spin up and access all the drives:

 

- Array start up

- Array shutdown

- Parity sync (Data read, parity write)

- Parity check (All read)

  • Author

Thanks! I guess I did misunderstand. It sounds like unRaid is doing exactly what I suggested.

  • 2 weeks later...

There are a few more cases where all the drives could spin up:

 

1. An unrecoverable Read Error occurs on a data disk.  In this case all the other drives will spin up and the s/w will "reconstruct" the data "on-the-fly".  (BTW, once the data is reconstructed, the s/w attempts to re-write to the disk that failed.  If this write operation fails, then the disk gets "disabled".)

 

2. Similar to 1, if an unrecoverable Write error occurs on a data disk, all the other drives will spin up and Parity disk will get written.

 

3. Any attempt to read/write a "disabled" data disk results in spin-up (if not already spun up) of all other drives in order to "reconstruct-read" or "reconstruct-write" the failed disk.

Archived

This topic is now archived and is closed to further replies.

Account

Navigation

Search

Search

Configure browser push notifications

Chrome (Android)
  1. Tap the lock icon next to the address bar.
  2. Tap Permissions → Notifications.
  3. Adjust your preference.
Chrome (Desktop)
  1. Click the padlock icon in the address bar.
  2. Select Site settings.
  3. Find Notifications and adjust your preference.