RAID Setup for Time Machine

Discussion in 'Mac Basics and Help' started by AxoNeuron, Feb 15, 2016.

  1. AxoNeuron, Feb 15, 2016
    Last edited: Feb 15, 2016

    AxoNeuron macrumors 65816

    AxoNeuron

    Joined:
    Apr 22, 2012
    Location:
    The Left Coast
    #1
    Hey everyone,

    I recently bought a two-bay NAS with two 4TB WD Red NAS drives. I want the drives to mirror each other exactly. I did some reading about RAID1, but it seems that write performance is equal to only one drive. That is weird.

    Is there some RAID setup that splits the write equally across both disks, and then when the write is done, merges the data between the disk to make it match up again? This way, you get doubly fast read AND write performance, and they still mirror each other. Is this possible? Thanks!
     
  2. macs4nw, Feb 15, 2016
    Last edited: Feb 15, 2016

    macs4nw macrumors 601

    macs4nw

    #2
    If you must have the speed of Raid 0 without being willing to forego the security of Raid 1, there's Raid 10 (also referred to as 1+0) which gives you the speed of striping, while simultaneously giving you the security of mirroring, however a minimum of 4 discs are required.

    And needless to say, any mirroring requires double the storage space of simple back-up.
     
  3. Mikael H macrumors 6502

    Joined:
    Sep 3, 2014
    #3
    @OP:
    Also, remember that RAID is not something you use instead of a backup: It won't protect you from inadvertently deleting files or from possibly replicating corrupted blocks from one pair of disks to the other. It just gives you the ability to keep your systems running while re-creating a trashed drive.

    In other words: Unless you need the uptime, it may be more sensible to run a RAID0 for size and speed (striped drives, no mirroring) and just have good and regular backups to another set of drives.
     
  4. Alrescha, Feb 17, 2016
    Last edited: Feb 17, 2016

    Alrescha macrumors 68020

    Joined:
    Jan 1, 2008
    #4
    No, you cannot cut the number of stripes in half and maintain the same I/O rate.

    "... in most cases RAID 10 provides better throughput and latency than all other RAID levels except RAID 0..."

    from: https://en.wikipedia.org/wiki/Nested_RAID_levels

    A.
     
  5. chown33 macrumors 604

    Joined:
    Aug 9, 2009
    #5
    It's not weird at all. It's completely logical. Mirrored write speed is determined by the slowest drive. Why? Because all writes must succeed in order for the data to be properly mirrored. If the data hasn't been written twice, it hasn't been safely written.

    And you might want to read this before choosing the drives to use:
    https://www.backblaze.com/blog/hard-drive-reliability-q4-2015/
     
  6. phrehdd macrumors 68040

    phrehdd

    Joined:
    Oct 25, 2008
    #6
    There seems to be a bit of confusion - RAID 1 with DAS is not the same as RAID 1 on NAS. A properly set up RAID 1 DAS certainly can be used as a backup. The question is how data is handled to create the mirror (bifurcation with checks). However given this is NAS, I am in full agreement with you that it is not the best option for a backup.

    To the OP -
    1) If you stripe the NAS (RAID 0) be sure to do backups. You will need to see what connections are available for your NAS for backups - eSATA, USB2 or USB3 are often the options provided.
    2) If you are able, check to see if your NAS is listed on Smallnetbuilder site and see what the network connectivity speeds are for uploads and downloads. You might be surprised to find that some NAS are relatively "slow" and thus the striped (RAID 0) set up offers very little if any improvement on speed. If this proves to be the case for your NAS, you might just want to set them up as separate drives and backup one to the other.
    3) Some NAS units allow you to upgrade the RAM. I find this particularly useful if there if the option is significant in size. At minimum, it helps with the burst rate duration of uploads and downloads.

    I am sure some folks will disagree with my statements and suggestions and that is okay. I tend to just approach it based on my experiences and resource study that dates back to when the only real game in town was SCSI for this purpose.
     
  7. Mikael H, Feb 17, 2016
    Last edited: Feb 17, 2016

    Mikael H macrumors 6502

    Joined:
    Sep 3, 2014
    #7
    Sorry if my post was unclear:
    Of course you can use RAID storage as a backup medium (and for that purpose it doesn't matter if it's on direct attached storage or on a NAS, as long as the throughput is large enough for your needs). My point was that having a mirroring or otherwise data protecting RAID set as your primary data storage (inferred from the OP's request for high write AND read speeds) only protects your data from a very narrow set of data damage; namely that of (the most obvious cases of) hard drive malfunction. That's what I meant by saying that RAID isn't something you use instead of a backup: You'll want regular backups in addition to the RAID set. Anything else is simply naïve.
     
  8. AFEPPL, Feb 17, 2016
    Last edited: Feb 17, 2016

    AFEPPL macrumors 68030

    AFEPPL

    Joined:
    Sep 30, 2014
    Location:
    England
    #8
    RAID is not backup regardless of where it is, it should never be described as such.
    It's Redundant Array of Inexpensive/independent Disk, its purpose is to provide either protection against sector corruption or to increase performance. As you say an action on one side of the mirror is impacted on the other. But yes, you should still back it up, a mirror is not a backup.

    in terms of the original question writes at the hardware level are generally to a cache first before getting committed to disk, so they are dual operations, a stipe set is a volume over two disks which spreads the load equally between the two. Raid 0 doesnt provide redundancy, it simply spans the two disks to provide capacity. To span and mirror you need a strip set 0, mirrored 1, (it's not 1 + 0, it's 0 + 1) commonly called RAID 10. You need a min of 4 drives for a RAID 10 set.
     
  9. AxoNeuron thread starter macrumors 65816

    AxoNeuron

    Joined:
    Apr 22, 2012
    Location:
    The Left Coast
    #9
    One would think you could do RAID10 with two disks. It could split up the write between both disks, and then when the write is done, it could merge the data between the two disks. I suppose there could be issues with this though, if one of the drives dies before it finished merging the data that data would be gone forever, so I suppose I can see why 4 drives are necessary.
     
  10. chrfr macrumors 603

    Joined:
    Jul 11, 2009
    #10
    You can't stripe AND mirror 2 drives. There's zero redundancy if the array is only writing to one disk first, or writing part of the data to each disk.
     
  11. Alrescha macrumors 68020

    Joined:
    Jan 1, 2008
    #11
    If you are willing to put up with risks like that, there are already other means to accomplish your purpose: RAID controllers often support write-caching which reports 'I did that' back to the OS immediately. Of course if you lose power before the writes actually complete your data is gone (write-caching controllers can have battery backup, but still..)

    A.
     
  12. phrehdd macrumors 68040

    phrehdd

    Joined:
    Oct 25, 2008
    #12
    Mikael - I think we are on the same page here.

    AFEPPL - In general, using RAID is not considered an appropriate practice for backup. We concur. Where we part ways is the use of 2 storage container RAID 1 under specific conditions. The practice has been around for a long time and dates back to the use of tapes. As I gather, you already know there is more than one way to created redundant copies that have either 2 none associated drives or two drives that have at least one dependent on the other. The dependency is where issues can arise with unsuccessful mirroring. There is an overhead with quality mirroring to ensure continued proper copy of data. Sadly, I don't find most modern NAS capable of this or they are rather minimal in practice. However, DAS operations allow for excellent relational mirroring with the dependency. Data is written to both drives and one is considered the primary while the secondary compares its store with the primary. There really isn't much more to this. If the drives match, either is an acceptable backup. If the don't match then only the primary is considered the acceptable backup. A better set up the secondary drive would be corrected to match.

    In my estimates, a non-mirrored use of two drives is a better fit where the source is set up to "copy" out and then bifurcation takes place. The two target disks have nothing to do with each other and are only relational to the source.

    I'll just say that back in the day of programmable SCSI, both mirrored and copy to two sources worked very well.
     
  13. AFEPPL macrumors 68030

    AFEPPL

    Joined:
    Sep 30, 2014
    Location:
    England
    #13
    But you are mixing two slightly different things..
    RAID is redundancy at a hardware level, multiple copies of data is simply best practice for data storage. if you want to use old analogies like tape, a 30day cycle (or choose a number you want) and you can still have parallel writes or copies too so that would be 2 x 30day cycles to allow for a tape that can not be read. A backup is pointless if it cant be restored remember...

    I work in the highend/leading edge enterprise space, and you still see copy to multi sources as a strategy, in fact it pretty much a standard with database logs for example. SSD (not a disk, but Save/Save/Delete) this is around putting multiple copies of the same data in multiple places be that tape of old (or disk based storage arrays which is where it all goes these days).

    All modern hardware NAS devices have capabilities that go well beyond what you can expect from software RAID.
    There's clear reasons why enterprises use NAS or SAN with hardware based RAID and not software over DAS, arguably the logical retort to that is "well this is a home machine", true, but that doesn't negate the fact that one is much better than the other so the fact it's a home device is not really of any importance when you look to compare the two as we are doing. Remember the hardware for RAID existing to do one of two things, put or get the data from the drive and calculate and monitor/maintain parity consistency across the set - it doesnt need the same processor as you have in your rMBP.

    Be it DAS or NAS, one disk is alway the primary member and the other secondary, (assuming RAID 1, clearly different for other levels, be that 5,6,10 or even 50 and 60). With DAS you are more likely to get data integrity issues due to system crashes, software or hardware problems and with no local write backcaching this is also a problem. NAS boxes offload the work of storing and maintaining the data from the client, clearly the NAS boxes are built for a set or given performance level and it's important to understand your workload requirements and get a solution that fits it. 130MBps shouldn't be a problem and at that level you'll hit the limits of 1GBe anyway (no chance of getting close to that on wifi). NAS is not faster or slower, but ethernet is slower than USB3 or eSATA connections as a rule but the spinning disks can only hit around 140IOPs on the read and 160IOPs write.... Then you need to be aware of the block size 4k, 8k, or larger 128k? then you need to understand is it Random or Sequential, its ok bragging I'm packing lots of SSDs and have a large 128k Sequential workload because you just blown a ton of money and HHDs would give you 95% of the same performance.. difference discussion, but be it NAS or DAS the drives are equal.

    If you want to keep swapping out the secondary, it's not really a backup... which is what you are hinting or pointing towards. Be it NAS or software RAID you can still keep swapping the secondary member regardless; but to what end? The RAID set will simply be rebuilt from primary to the mirror every time you swap, but what you are not considering is what the impact of that is. Your chances of failure (statistically - and you can look that up) are far greater during a rebuild than any other time. Also your system will be very slow during the rebuild, so why bother? You are not saving or reducing data movements (it's still a read and then a write to the 2nd drive or place, it's not parallel), so you are putting the first drive under full load during an extended time and more often. Simply keep your RAID set in place, have something like a rsync command to copy net new changes from the DAS or NAS to an external drive. if you want to take full backups, thats cool too but will take much longer vs a differential approach as its a full copy - but it halves the load on the master disk as those reads are distributed evenly over the RAID 1 set. Again be it DAS or NAS, you simply put the 3rd drive into a USB port or point at a remote mount point and let it go.. if you are doing this on a NAS, that doesn't ever impact the running of your host device, it's offloaded and will only result in slower fetch or save times if you are pushing/pull data to it while the operation is running.

    I forget what the original question was, oh yes. Raid 10 (0 + 1) no, you have to have 4 drives.
    Remember a stripe (0) is a min of a pair of drives (so 2 in this case) and to mirror that (1) would also require the same number of drives again. so 2+2 = 4.

    You have to pick Raid 0 - a stripe set, better performance - no redundancy. Or Raid 1, Redundancy with reduced performance (compared to 0).
     
  14. macs4nw macrumors 601

    macs4nw

    #14
    I don't believe I made any such claim, in fact I specifically stated a minimum of 4 discs are required for Raid 10, which is the part you omitted when quoting me.

    At today's (relative) bargain-basement prices of HDDs, for the average home user who wants speed with security, Raid 10 is an excellent choice, as long as it's part of an overall back-up strategy comprising at a minimum, additional redundant back-ups, as well as off-site back-ups and cloud storage.
     
  15. Alrescha macrumors 68020

    Joined:
    Jan 1, 2008
    #15
    I was referring to this:

    You do not get the speed of RAID 0 with RAID 10, all other things being equal.

    A.
     
  16. macs4nw macrumors 601

    macs4nw

    #16
    Alright, but how is that cutting the number of stripes in half? You still end up with two mirrored stripes (thus the usual minimum of 4 discs), and although technically speaking Raid 10 is slower than Raid 0, the marginal difference in throughput is for most people a small price to pay for the added layer of security.
     
  17. Alrescha, Feb 17, 2016
    Last edited: Feb 17, 2016

    Alrescha macrumors 68020

    Joined:
    Jan 1, 2008
    #17
    If you have four drives in RAID 0, you have 4 stripes. If you convert that to RAID 10 you have 2 stripes. If I remember my arithmetic lessons, two is half of four. Hence my comment.

    But that statement was merely seasoning for my point, which was that RAID 10 is not as fast as RAID 0. I thought your statement "If you must have the speed of Raid 0 without being willing to forego the security of Raid 1, there's Raid 10" implied that RAID 10 was indeed as fast as RAID 0. I felt it was worth clarifying.

    Sorry for any confusion,

    A.
     
  18. macs4nw macrumors 601

    macs4nw

    #18
    No problem, I now get your original logic.
     
  19. phrehdd macrumors 68040

    phrehdd

    Joined:
    Oct 25, 2008
    #19
    Thanks for your comment. I think we are not that far apart on most matters of this sort however I'll simply say that RAID is not defined has hardware based only. Software RAID exists as we both know.

    The topic is interesting in that we are only discussing a 2 drive scenario and all the permutations/combinations possible to copy a source to two target disks. For a home system, DAS is just as viable as NAS. Some DAS enclosures have your "hardware" included within as opposed to directly driven by the OS plus installed software RAID. The only real question I see of discussion is whether one of the two drives is aware of the other or data is placed exclusive of one another. The latter technically is not a RAID as you mentioned while the former is. The rest is whether proper accounting is done to make sure the two drives match with respect to data or if true block copies are done.

    I've dealt with NAS, SAN and other types of storage for networks and DAS is strictly a single machine operation while NAS and SAN serve potentially multiple clients.
     
  20. throAU, Feb 17, 2016
    Last edited: Feb 17, 2016

    throAU macrumors 601

    throAU

    Joined:
    Feb 13, 2012
    Location:
    Perth, Western Australia
    #20
    Write performance is that of one drive because whilst you have 2 (or more drives) any data you write needs to be written to both of them at the same time to keep in sync.

    Read can be faster (depending on the implementation) because different data can be read from each drive at the same time.

    Sometimes read is single speed as well though because unless the NAS does some sort of checksum on the data it may need to read from both drives to detect errors.

    Decent NAS implementations run file system checksums to detect corruption and then read from the second copy if required.

    Splitting writes as you suggest would fragment data and reduce reliability as there would be no guarantee that data written to one disk was on both. You'd also need to keep track of block allocations independently on both disks somehow. And if under heavy load - well the data still needs to be written to both drives eventually anyway.

    If you want to speed up writes run raid 10 or add cache. Or use faster drives. RAID 1 is for data integrity not speed.
     
  21. Mikael H macrumors 6502

    Joined:
    Sep 3, 2014
    #21
    You could simulate RAID10 in software, with four partitions on two disks. In practice that would be a useless exercise, though, since it would give you neither the speed of RAID0 nor the resiliency of RAID1.

    This thread is quickly getting technical, but here are your realistic options:
    1) Run your two drives in a RAID0 (striped) set if you want speed. Get at least one secondary drive or set of drives for backup purposes.
    2) Run your two drives in a RAID1 (mirrored) set if you want resiliency. Get at least one secondary drive or set of drives for backup purposes.
    3) Return your 2-drive storage box and get an (at least) four-drive one, with RAID10 if you want speed AND resiliency. Get at least one secondary drive or set of drives for backup purposes.

    Option 1 is the cheap choice if you want high speeds, and can live with being unable to access your data until you've restored it from backup.
    Option 2 is the cheap choice if you primary objective is not to have downtime in case of a hard drive malfunction, but will cost you in terms of performance.
    Option 3 is the premium choice if you want both higher speeds (albeit a bit slower than pure RAID0) but still don't want to experience downtime.

    (There is a fourth common choice, RAID5, which generally speaking will give you good read speeds, a bit worse write speeds (depending on a bunch of circumstances), and still gives you the ability to keep functioning with the loss of a single drive. RAID5 requires at least three drives, so with a four-drive enclosure, you could for example use one of the drives as a hot spare (which, if your software or controller supports it, can "step in" automatically if one drive would fail), or just spread your volume across all four drives, giving you a larger storage volume and slightly better performance than with three drives. And don't forget to get yourself a good backup target.) :)
     
  22. AxoNeuron thread starter macrumors 65816

    AxoNeuron

    Joined:
    Apr 22, 2012
    Location:
    The Left Coast
    #22
    Thanks to you and everyone else for your help, I appreciate it a lot. This RAID/NAS stuff is pretty fun and very useful.

    One last question: I see that you (and others) say that even with two drives in RAID1 that I should have another backup, I assume offsite. I can understand that if my house were to burn down and destroy my NAS and all my hardware, this would be critical. But assuming my NAS is physically secure, is there another reason for this? Is it common for some disk failures to wipe out both drives in a two-disk RAID1 system, or is the house-burning-down situation pretty much the only reason a secondary backup of the NAS is important?
     
  23. AFEPPL, Feb 18, 2016
    Last edited: Feb 18, 2016

    AFEPPL macrumors 68030

    AFEPPL

    Joined:
    Sep 30, 2014
    Location:
    England
    #23
    RAID is hardware redundancy (disks), not that it can only be implemented at the hardware level. if thats how it reads, that wasn't my intention to give that impression. I only talked about 2 disks as thats all the OP has, so the chat around RAID 10 or anything else other than 0 or 1 is pretty meaning less (other than for background info) as it can't be used. I'd say DAS is single use to workgroup type scenarios, its certainly not limited to singe machine operations.

    The number of disks or RAID level has no relevance on the number of stripes. The number of stripes is based on the stripe size used/selected and the capacity of the disks across which it's to be laid. Stripes are accessed in parallel. The stripe "width" however is equal to the number of disks in the set.

    A stripe is the smallest chunk of data within a RAID set that can be addressed. People often also refer to this as "block size". Many RAID controllers allow you to define the stripe size because it alters the performance characteristics of a RAID set - but that's a complete other discussion..

    RAID doesn't stop you, someone else or the application from pressing/triggering a delete...
    Disks have a MTF, what if the second drive failed during the rebuild? unlikely but statistically possible.

    I just do my second copy on payday - just because its easy to remember when...!
     
  24. Mikael H macrumors 6502

    Joined:
    Sep 3, 2014
    #24
    Let me give you a few concrete examples to think about:
    a) If you work on your NAS and decide to delete or overwrite a file there, the write operation is immediately replicated across mirrors in a RAID. The file is gone or changed. In other words: data destruction caused by yourself is nothing a RAID will protect you from. Backups are the only way to avoid this scenario.
    b) When you buy your disks, you're likely to buy disks of the same brand and from the same manufacturing batch. In many ways, this is a good thing. But suppose there is a manufacturing error (or you're just plain unlucky) and two drives fail in quick succession? A backup would have saved you.
    c) Imagine that it isn't the disks that fail, but the controller. Are you quite sure that another controller will be able to understand that the disks were parts of a RAID set and how to combine them to retrieve the information? Otherwise backups may be a good idea.

    I work with these things, so I may be a bit damaged, but here's my experience:
    Scenario "a" happens literally on a weekly basis, if you have enough users on a system.
    Scenario "b" is less common, but I actually have had a RAID set die before my eyes because a second drive failed before the rebuild initiated by the first drive failure had finished. (And yes, I did have backups.)
    To be honest, I haven't had scenario "c" happen to me yet, but I'm not taking any chances.

    Conclusion:
    If you mean to use your NAS only as a backup target, then that's probably good enough, as long as you don't have irreplaceable data on your computer. Family pictures and similar should also be stored off-site.
    If you do actual work on your NAS and you don't have a high-speed Internet uplink, you should at least have a local backup separate from the NAS, and preferably an off-site backup in addition to this, if you store irreplaceable data.
     
  25. throAU macrumors 601

    throAU

    Joined:
    Feb 13, 2012
    Location:
    Perth, Western Australia
    #25

    All the RAID in the world does not protect against accidentally deleting things, theft, fire, virus encrypting your stuff, etc.

    Offline and ideally off site backups are essential if you care about your data.

    RAID is about reliability and availability despite hardware failure. It is not in itself a backup mechanism.
     

Share This Page