Zettelkasten Forum


[Zettel Feedback] Notes on NAS, SHR and RAID

Hey all!

First time poster here (and long-time lurker). Over the weekend I went through the upgrade process for my Synology NAS (4TB to 12TB!), and I took some notes while doing so. I ended with 4 notes, which I'm really happy with but open to feedback :smile: I developed it through Google, Synology Knowledge Center and some ChatGPT.

Note 1: How to replace and upgrade drives in Synology NAS

Context: I previously used a single 4TB drive. I have bought 2x 12TB drives and want to completely replace the old drive with the new ones.

  1. Insert 12TB drive into an empty bay.
  2. In Storage Manager, add the 12TB drive to the current storage pool.
  3. The SHR will be rebuilt to add the drive. This will take several hours. As it was previously single drive, it will now introduce 1-disk fault tolerance as there are now 2 drives.
  4. Once completed, you can now deactivate the 4TB drive in Storage Manager and physically remove the drive. The system will now show that your storage pool is degraded, but this is expected and safe as long as SHR was configured with 1-disk fault tolerance.
  5. Insert the other 12TB drive into an empty bay (presumably where the 4TB was).
  6. In Storage Manager, add the 12TB drive to the current storage pool.
  7. Again, the SHR will be rebuilt to add the additional drive. This will take several hours.

See also

  • [[How does redundancy work in RAID-1 and SHR]]
  • [[Benefits of SHR vs traditional RAID]]

Note 2: How does redundancy work in RAID-1 and SHR

Redundancy means the your data is spread across multiple drives in such a way that if one drive fails, no data is lost.

In RAID-1 (mirror):

  • Data is mirrored 1:1 on each drive
  • Usable storage will be the smallest drive size
[ Drive A ]    [ Drive B ]
+--------+     +--------+
| Data   |     | Data   |
| Data   |     | Data   |
+--------+     +--------+

In SHR (Synology Hybrid RAID) with 1-disk fault tolerance (also RAID-5):

  • Data is split into blocks and parity information
  • If one drive fails, the system can rebuild the missing data using parity ([[Parity is a mathematical backup that allows the system to rebuild lost data if a drive fails]])
  • Usable storage will be the smallest drive size (for 2 drive setup) or total size of all drives minus the size of the largest drive (for 3+ drive setup).
[ Drive A ]    [ Drive B ]    [ Drive C ]
+--------+     +--------+     +--------+
| Data   |     | Parity |     | Data   |
| Data   |     | Data   |     | Parity |
+--------+     +--------+     +--------+

See also

  • [[Benefits of SHR vs traditional RAID]]

Note 3: Parity is a mathematical backup that allows the system to rebuild lost data if a drive fails

Parity is a concept for storage management that allows for redundancy without wasting too much space (such as RAID-1). It stores parity blocks rather than data blocks across the drives.

It is like a formula to recreate the data rather than the actual data itself. In digital systems, parity is usually calculated using XOR (exclusive OR) operations:

  • A ⊕ B = P (parity)
  • If B is lost, P ⊕ A = B

In ELI5 fashion, say you and two friends are trying to remember how many beans are in a jar.

  • Friend 1 remembers 3 beans
  • Friend 2 remembers 5 beans
  • You don’t remember any specific number, but you have the total as 8

If one friend forgets their number, you can subtract from the total and figure it out.

See also

  • [[How does redundancy work in RAID-1 and SHR]]

Note 4: Benefits of SHR vs traditional RAID

  1. SHR (Synology Hybrid RAID) makes it easier to maximize storage capacity compared to traditional RAID while using different drive sizes.
  2. SHR also makes it easier to increase storage pools without replacing all drives at once with larger drives (incremental upgrade).

Maximizing storage capacity

In general, classic RAID bases its storage creation on the smallest drive in the storage pool. As shown in the image below, if the smallest drive in a classic RAID storage pool is 500 GB, all other drives in the storage pool can each only contribute 500 GB. As a result, the storage pool ends up with 2 TB of usable storage and 4.5 TB of wasted storage.

Unlike classic RAID, SHR divides each drive's storage space into smaller chunks and creates additional redundant storage. Using the same example as before, SHR is able to divide the 4.5 TB of unavailable storage into smaller usable chunks and maximize the storage capacity of each drive.

Storage expansion

SHR also outperforms classic RAID in terms of storage expansion. As shown in the image below, classic RAID does not allow a storage pool to be expanded until all its drives have been replaced with larger drives.

SHR, on the other hand, allows a storage pool to be expanded as soon as two of the drives are upgraded and can form a redundant storage array.

See also

  • [[Benefits of SHR vs traditional RAID]]

References

Comments

  • Welcome!

    I believe I see what your intent was when you wrote Note 2: How does redundancy work in RAID-1 and SHR. You started somewhere around that topic and the comparison felt natural. The title form of "how X and Y work" can be an indicator that you may benefit from splitting this up into two, because the "how ... works" title itself doesn't give away a lot about the content. Because it's a comparison between two approaches, you also cannot achieve much in the title apart from mentioning that you do a comparison.

    So with splitting this up, you could end up with Note 2': RAID-1 mirror creates redundant data blocks (my attempt at summarizing what RAID-1 does based on your note alone). Likewise for Note 2'', left as an exercise for the reader ;)

    Then you can link to both from the actual comparison in Note 4: Benefits of SHR vs traditional RAID. That does a great job at pulling both approaches together into a comparison, whereas the original Note 2 merely lumped together related topics into a single file.

    Usually, I refactor by extracting pieces from a larger note, but leave a link from the larger note to the extracted piece. Here, it looks like you wouldn't benefit from the "how X and Y works" note, and thus I would rather replace that one note with two, leaving no trace of the original behind.

    I hope you'll find such a change beneficial and discover an increase in ergonomics by having more revealing (revelatory?) title phrases and also individual pieces to play around with (which the original note didn't easily allow)

    Author at Zettelkasten.de • https://christiantietze.de/

Sign In or Register to comment.