Use mdraid to restore a volume after a NAS server wipeout












1















I own a NAS, which I'm trying to upgrade by installing - most likely - Debian Stretch on it. In itself that's a relatively straightforward task, but there's one thing I'm a bit uncertain about. My NAS has 2 drives in RAID1 configuration, it's an mdraid setup as far as I can tell and because it's configured by some proprietary software currently running on that NAS I'd like to wipe it clean and start anew. I backed up as much data as I could from the NAS on other media, but there's still some stuff I will no doubt lose if I just wipe everything out "the windowsy way". So I started to explore what I can do with my drives to avoid that loss.



My question is this - is it possible to carry out operations in the following way:




  1. remove one of the drives (let's call it HDD2) from the RAID1 array (does this require any mdraid operations - in theory (marketing theory anyways) the drives in my NAS are hot swappable, but I have not needed to put that assertion to test)

  2. install Debian on a drive that's not part of the RAID array - let's say an SSD. Wipe out the remaining HDD1 drive and partition it to my liking without yet setting it up as a RAID1 array.

  3. put the HDD2 back in, and copy whatever I need from that drive to the newly partitioned HDD1

  4. remove the HDD2 again

  5. configure mdraid as if HDD1 was the sole drive in a RAID1 array, source which any additional drives would be mirrored from.

  6. reinsert HDD2 again, this time expecting mdraid to wipe it out and make it a mirror of HDD1.


Does the above make any sense at all? I'm a software developer and not a sysadmin by trade, so I haven't really done any serious administration, but from a purely logical point of view the above scenario should be feasible. Unless of course there's stuff I don't know.



I know that any such operations come with a risk of data loss, but as I said - I've backed up all I could and even borrowed some drives from friends to be able to hold more, but there's still a fair bit I can't cover. Not life-critical stuff so I'd probably take the risk if there was a chance that the above idea could work out fine. Any help and insight will be much appreciated.










share|improve this question







New contributor




Chris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
Check out our Code of Conduct.

























    1















    I own a NAS, which I'm trying to upgrade by installing - most likely - Debian Stretch on it. In itself that's a relatively straightforward task, but there's one thing I'm a bit uncertain about. My NAS has 2 drives in RAID1 configuration, it's an mdraid setup as far as I can tell and because it's configured by some proprietary software currently running on that NAS I'd like to wipe it clean and start anew. I backed up as much data as I could from the NAS on other media, but there's still some stuff I will no doubt lose if I just wipe everything out "the windowsy way". So I started to explore what I can do with my drives to avoid that loss.



    My question is this - is it possible to carry out operations in the following way:




    1. remove one of the drives (let's call it HDD2) from the RAID1 array (does this require any mdraid operations - in theory (marketing theory anyways) the drives in my NAS are hot swappable, but I have not needed to put that assertion to test)

    2. install Debian on a drive that's not part of the RAID array - let's say an SSD. Wipe out the remaining HDD1 drive and partition it to my liking without yet setting it up as a RAID1 array.

    3. put the HDD2 back in, and copy whatever I need from that drive to the newly partitioned HDD1

    4. remove the HDD2 again

    5. configure mdraid as if HDD1 was the sole drive in a RAID1 array, source which any additional drives would be mirrored from.

    6. reinsert HDD2 again, this time expecting mdraid to wipe it out and make it a mirror of HDD1.


    Does the above make any sense at all? I'm a software developer and not a sysadmin by trade, so I haven't really done any serious administration, but from a purely logical point of view the above scenario should be feasible. Unless of course there's stuff I don't know.



    I know that any such operations come with a risk of data loss, but as I said - I've backed up all I could and even borrowed some drives from friends to be able to hold more, but there's still a fair bit I can't cover. Not life-critical stuff so I'd probably take the risk if there was a chance that the above idea could work out fine. Any help and insight will be much appreciated.










    share|improve this question







    New contributor




    Chris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
    Check out our Code of Conduct.























      1












      1








      1








      I own a NAS, which I'm trying to upgrade by installing - most likely - Debian Stretch on it. In itself that's a relatively straightforward task, but there's one thing I'm a bit uncertain about. My NAS has 2 drives in RAID1 configuration, it's an mdraid setup as far as I can tell and because it's configured by some proprietary software currently running on that NAS I'd like to wipe it clean and start anew. I backed up as much data as I could from the NAS on other media, but there's still some stuff I will no doubt lose if I just wipe everything out "the windowsy way". So I started to explore what I can do with my drives to avoid that loss.



      My question is this - is it possible to carry out operations in the following way:




      1. remove one of the drives (let's call it HDD2) from the RAID1 array (does this require any mdraid operations - in theory (marketing theory anyways) the drives in my NAS are hot swappable, but I have not needed to put that assertion to test)

      2. install Debian on a drive that's not part of the RAID array - let's say an SSD. Wipe out the remaining HDD1 drive and partition it to my liking without yet setting it up as a RAID1 array.

      3. put the HDD2 back in, and copy whatever I need from that drive to the newly partitioned HDD1

      4. remove the HDD2 again

      5. configure mdraid as if HDD1 was the sole drive in a RAID1 array, source which any additional drives would be mirrored from.

      6. reinsert HDD2 again, this time expecting mdraid to wipe it out and make it a mirror of HDD1.


      Does the above make any sense at all? I'm a software developer and not a sysadmin by trade, so I haven't really done any serious administration, but from a purely logical point of view the above scenario should be feasible. Unless of course there's stuff I don't know.



      I know that any such operations come with a risk of data loss, but as I said - I've backed up all I could and even borrowed some drives from friends to be able to hold more, but there's still a fair bit I can't cover. Not life-critical stuff so I'd probably take the risk if there was a chance that the above idea could work out fine. Any help and insight will be much appreciated.










      share|improve this question







      New contributor




      Chris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.












      I own a NAS, which I'm trying to upgrade by installing - most likely - Debian Stretch on it. In itself that's a relatively straightforward task, but there's one thing I'm a bit uncertain about. My NAS has 2 drives in RAID1 configuration, it's an mdraid setup as far as I can tell and because it's configured by some proprietary software currently running on that NAS I'd like to wipe it clean and start anew. I backed up as much data as I could from the NAS on other media, but there's still some stuff I will no doubt lose if I just wipe everything out "the windowsy way". So I started to explore what I can do with my drives to avoid that loss.



      My question is this - is it possible to carry out operations in the following way:




      1. remove one of the drives (let's call it HDD2) from the RAID1 array (does this require any mdraid operations - in theory (marketing theory anyways) the drives in my NAS are hot swappable, but I have not needed to put that assertion to test)

      2. install Debian on a drive that's not part of the RAID array - let's say an SSD. Wipe out the remaining HDD1 drive and partition it to my liking without yet setting it up as a RAID1 array.

      3. put the HDD2 back in, and copy whatever I need from that drive to the newly partitioned HDD1

      4. remove the HDD2 again

      5. configure mdraid as if HDD1 was the sole drive in a RAID1 array, source which any additional drives would be mirrored from.

      6. reinsert HDD2 again, this time expecting mdraid to wipe it out and make it a mirror of HDD1.


      Does the above make any sense at all? I'm a software developer and not a sysadmin by trade, so I haven't really done any serious administration, but from a purely logical point of view the above scenario should be feasible. Unless of course there's stuff I don't know.



      I know that any such operations come with a risk of data loss, but as I said - I've backed up all I could and even borrowed some drives from friends to be able to hold more, but there's still a fair bit I can't cover. Not life-critical stuff so I'd probably take the risk if there was a chance that the above idea could work out fine. Any help and insight will be much appreciated.







      raid raid1 nas






      share|improve this question







      New contributor




      Chris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.











      share|improve this question







      New contributor




      Chris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      share|improve this question




      share|improve this question






      New contributor




      Chris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.









      asked 4 hours ago









      ChrisChris

      61




      61




      New contributor




      Chris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.





      New contributor





      Chris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






      Chris is a new contributor to this site. Take care in asking for clarification, commenting, and answering.
      Check out our Code of Conduct.






















          0






          active

          oldest

          votes











          Your Answer








          StackExchange.ready(function() {
          var channelOptions = {
          tags: "".split(" "),
          id: "106"
          };
          initTagRenderer("".split(" "), "".split(" "), channelOptions);

          StackExchange.using("externalEditor", function() {
          // Have to fire editor after snippets, if snippets enabled
          if (StackExchange.settings.snippets.snippetsEnabled) {
          StackExchange.using("snippets", function() {
          createEditor();
          });
          }
          else {
          createEditor();
          }
          });

          function createEditor() {
          StackExchange.prepareEditor({
          heartbeatType: 'answer',
          autoActivateHeartbeat: false,
          convertImagesToLinks: false,
          noModals: true,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          imageUploader: {
          brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
          contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
          allowUrls: true
          },
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          });


          }
          });






          Chris is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f505714%2fuse-mdraid-to-restore-a-volume-after-a-nas-server-wipeout%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown

























          0






          active

          oldest

          votes








          0






          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes








          Chris is a new contributor. Be nice, and check out our Code of Conduct.










          draft saved

          draft discarded


















          Chris is a new contributor. Be nice, and check out our Code of Conduct.













          Chris is a new contributor. Be nice, and check out our Code of Conduct.












          Chris is a new contributor. Be nice, and check out our Code of Conduct.
















          Thanks for contributing an answer to Unix & Linux Stack Exchange!


          • Please be sure to answer the question. Provide details and share your research!

          But avoid



          • Asking for help, clarification, or responding to other answers.

          • Making statements based on opinion; back them up with references or personal experience.


          To learn more, see our tips on writing great answers.




          draft saved


          draft discarded














          StackExchange.ready(
          function () {
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f505714%2fuse-mdraid-to-restore-a-volume-after-a-nas-server-wipeout%23new-answer', 'question_page');
          }
          );

          Post as a guest















          Required, but never shown





















































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown

































          Required, but never shown














          Required, but never shown












          Required, but never shown







          Required, but never shown







          Popular posts from this blog

          Loup dans la culture

          How to solve the problem of ntp “Unable to contact time server” from KDE?

          ASUS Zenbook UX433/UX333 — Configure Touchpad-embedded numpad on Linux