NETGEAR is aware of a growing number of phone and online scams. To learn how to stay safe click here.

Forum Discussion

Learning2NAS's avatar
Nov 09, 2015
Solved

X-RAID 2 Operation and Downsizing

I've tested answers in other posts on my NAS and found some of them to be incorrect, so please cite when you can to support your response.

 

Questions:

(1) If I lose a disk in a RAID-5 and don't have an equal capacity replacement on hand, can I use a smaller disk to fill in the dead disk's place until the new disk arrives? (This would downgrade the RAID volume to a lower capacity for the interim).

 

(2) Since X-RAID 2 works by creating layers, does the answer to (1) change if my array was originally created on smaller disks, and my temporary disk is the size of the original disks that my volume used to be made of? Or do those layers disappear each time the volume expands?

 

(3) I currently have disks of varying sizes in my array and the ReadyNAS is utilizing 100% of their capacity. If it can do this as they're added to the array, regardless of what order their added, why can't it downsize if there is free space to do so? Please explain this in detail, rather than saying that XRAID is meant to be expandable only (a common answer I've found to similar questions).

 

(4) If anyone knows where there is a full technical specification breakdown for X-RAID 2, please post it. It would be helpful to have an X-RAID bible around for future reference.

 

Thanks for your time!

 

NOTE: For others who are curious the best discussion I've found on X-RAID is at the link below, but it doesn't directly address the questions posted above.

https://community.netgear.com/t5/ReadyNAS-in-Business/Expansion-with-X-Raid2-resulting-sizes-and-different-reported/m-p/969415#U969415.

  • StephenB's avatar
    StephenB
    Nov 09, 2015

    Learning2NAS wrote:

    Hey Stephen,


    Thanks for answering my questions. You addressed everything in my original post, but I have a clarification to your response to #2 (quoted below). Using your hypo, if I have a base layer of 1TB that is always there and my current array is 1x1TB (original disk that hasn't died yet) and 2x3TB, can I replace the 1x1TB with another 1TB? Additionally, can I replace the 3TB with a 1TB if it fails? It sounds like the answer to that second question is no, because there might be data stored somewhere in the 2TB layer, but I just want to verify this.

     


    You can replace the 1 TB drive with another 1 TB drive.  But you can't replace the 3 TB drive with a 1 TB drive.

     


    Learning2NAS wrote:

     

     

    If that's true, that brings me full circle back to what I'm having such a hard time understanding: when you have a failure in RAID 5 there is enough redundancy to rebuild an effected file from the remaining drives (that's the point, right?). With this being so, I don't understand why the RAID can't rebuild the missing files on any size drive I stick in, so long as it is at least large enough to support the amount of data that needs to be striped to the new drive. 



    The RAID software sits between the physical disks and the file system - and has no idea about how the file system is organized (e.g., where files are stored, and where there is free space; or even what the file system is).  When you replace a drive, the RAID software reconstructs all the disk blocks on the drive from the blocks on the other drives (whether there is data in them or not).  Likewise, a resync always takes the same amount of time, no matter if the file system is full or empty.  So RAID treats all data blocks on the drives identically (used or not).

     

     

    There potentially are some advantages to fully integrating RAID-like redundancy into the file system itself - then features like the ones you are envisioning would be easier to do.  The BTRFS team is working on a design like that, but it is still experimental - so Netgear (wisely) isn't using it.  If they were to switch to it, it would likely require a factory reset.

10 Replies

Replies have been turned off for this discussion
  • I tried another experiment and got a positive result. This one is not as interesting as the original, but it is worth letting the community know about in case this ever helps someone in the future.

     

    I created an XRAID2 volume using wildly different sized drives (40GB, 300GB, and 500GB). XRAID, predictably, decided to create several different layers. It ended up doing the following:

    1 40GB layer that ran across all three drives (RAID 5)

    1 260GB layer shared between the two largest drives (RAID 1)


    That decision left 200GB of unused space on the largest disk in the array. I have been repeatedly told that you cannot replace a disk with a smaller disk, but in this situation it would seem silly not to allow a smaller disk to fill in for the 1/3 empty 500GB drive.

     

    I pulled out the 500 after the array finished bulding and hot-swapped for a 320 disk (which was 20GB larger than it needed to be to accommodate all of the data on the 500). Although I had just swapped a larger disk for a smaller disk, the ReadyNAS unit accepted it and rebuilt the array onto the smaller disk. I don't know how often this will be helpful, but it is good to know that the drive looks for the necessary capacity, rather than an exact replacement. Makes sense, but it's good to have confirmation.

  • StephenB's avatar
    StephenB
    Guru - Experienced User

    Learning2NAS wrote:

     

     

    (1) If I lose a disk in a RAID-5 and don't have an equal capacity replacement on hand, can I use a smaller disk to fill in the dead disk's place until the new disk arrives? (This would downgrade the RAID volume to a lower capacity for the interim).

    No.  One exception might be if some of the disk wasn't actually in the array.  For instance if you had 3x2TB+3TB, you might be able to replace the 3 TB drive with a 2 TB drive.  I haven't tried this, so I don't know for sure what would happen.


     

    (2) Since X-RAID 2 works by creating layers, does the answer to (1) change if my array was originally created on smaller disks, and my temporary disk is the size of the original disks that my volume used to be made of? Or do those layers disappear each time the volume expands?

     

    The layers never disappear.  So if you start with 3x1TB, the array will always have a 1 TB base layer.  If you then expand to 1x1TB+2x3TB, the array will aways have a second 2 TB layer.  It doesn't change the answer to (1).



     

     

    (3) I currently have disks of varying sizes in my array and the ReadyNAS is utilizing 100% of their capacity. If it can do this as they're added to the array, regardless of what order their added, why can't it downsize if there is free space to do so? Please explain this in detail, rather than saying that XRAID is meant to be expandable only (a common answer I've found to similar questions).

     

    I think it is theoretically possible to downsize.  Basically you need to make sure that any file data that is in the section you want to remove is moved to a new safe area before you destroy it.   In principle, this could be done.  In practice I think it would be hard to make it reliable.  In any event, Netgear hasn't chosen to invest the amount of work needed to do it.  

     

    If they did do it, it would almost certainly need to be done off-line (with the data not available).

     

    Expanding is much simpler, since you know for certain that there is nothing in the newly added space.



     

     

    (4) If anyone knows where there is a full technical specification breakdown for X-RAID 2, please post it. It would be helpful to have an X-RAID bible around for future reference.

     


    I haven't seen a full specification. I think that it is better to think of it as a collection of expansion features, which are implemented in somewhat different ways on different platforms.

     

    For instance, XRAID-2 in NAS running 4.2.x uses a combination of lvm and mdadm and the ext file system.  In NAS running 6.x.x, it uses mdadm and btrfs (and no longer uses lvm).   

     

    So I don't think there is a single technical specification, rather it is a set of behaviors that various generations of ReadyNAS implement in somewhat different ways.

    • Learning2NAS's avatar
      Learning2NAS
      Tutor

      Hey Stephen,


      Thanks for answering my questions. You addressed everything in my original post, but I have a clarification to your response to #2 (quoted below). Using your hypo, if I have a base layer of 1TB that is always there and my current array is 1x1TB (original disk that hasn't died yet) and 2x3TB, can I replace the 1x1TB with another 1TB? Additionally, can I replace the 3TB with a 1TB if it fails? It sounds like the answer to that second question is no, because there might be data stored somewhere in the 2TB layer, but I just want to verify this.

       

      If that's true, that brings me full circle back to what I'm having such a hard time understanding: when you have a failure in RAID 5 there is enough redundancy to rebuild an effected file from the remaining drives (that's the point, right?). With this being so, I don't understand why the RAID can't rebuild the missing files on any size drive I stick in, so long as it is at least large enough to support the amount of data that needs to be striped to the new drive. Ex: Assume the array above only has 200gb of data on it, for whatever reason. Sticking in a 1TB replacement for a 3TB drive shouldn't cause a problem, as no data in the "new" 2TB layer is missing (yet) because it can be rebuilt from the other drives, and whatever the rebuilt stripes look like will easily fit on a 1TB replacement disk. So why wouldn't this be possible? A rebuild is a rebuild, right?


      StephenB wrote:

       

      (2) Since X-RAID 2 works by creating layers, does the answer to (1) change if my array was originally created on smaller disks, and my temporary disk is the size of the original disks that my volume used to be made of? Or do those layers disappear each time the volume expands?

       

      The layers never disappear.  So if you start with 3x1TB, the array will always have a 1 TB base layer.  If you then expand to 1x1TB+2x3TB, the array will aways have a second 2 TB layer.  It doesn't change the answer to (1).

      • StephenB's avatar
        StephenB
        Guru - Experienced User

        Learning2NAS wrote:

        Hey Stephen,


        Thanks for answering my questions. You addressed everything in my original post, but I have a clarification to your response to #2 (quoted below). Using your hypo, if I have a base layer of 1TB that is always there and my current array is 1x1TB (original disk that hasn't died yet) and 2x3TB, can I replace the 1x1TB with another 1TB? Additionally, can I replace the 3TB with a 1TB if it fails? It sounds like the answer to that second question is no, because there might be data stored somewhere in the 2TB layer, but I just want to verify this.

         


        You can replace the 1 TB drive with another 1 TB drive.  But you can't replace the 3 TB drive with a 1 TB drive.

         


        Learning2NAS wrote:

         

         

        If that's true, that brings me full circle back to what I'm having such a hard time understanding: when you have a failure in RAID 5 there is enough redundancy to rebuild an effected file from the remaining drives (that's the point, right?). With this being so, I don't understand why the RAID can't rebuild the missing files on any size drive I stick in, so long as it is at least large enough to support the amount of data that needs to be striped to the new drive. 



        The RAID software sits between the physical disks and the file system - and has no idea about how the file system is organized (e.g., where files are stored, and where there is free space; or even what the file system is).  When you replace a drive, the RAID software reconstructs all the disk blocks on the drive from the blocks on the other drives (whether there is data in them or not).  Likewise, a resync always takes the same amount of time, no matter if the file system is full or empty.  So RAID treats all data blocks on the drives identically (used or not).

         

         

        There potentially are some advantages to fully integrating RAID-like redundancy into the file system itself - then features like the ones you are envisioning would be easier to do.  The BTRFS team is working on a design like that, but it is still experimental - so Netgear (wisely) isn't using it.  If they were to switch to it, it would likely require a factory reset.

NETGEAR Academy

Boost your skills with the Netgear Academy - Get trained, certified and stay ahead with the latest Netgear technology! 

Join Us!

ProSupport for Business

Comprehensive support plans for maximum network uptime and business peace of mind.

 

Learn More