*New 11.3 series Release:
2019-10-05: XigmaNAS 11.3.0.4.6928 - released, 11.2 series are soon unsupported!

*New 12.0 series Release:
2019-10-05: XigmaNAS 12.0.0.4.6928 - released!

*New 11.2 series Release:
2019-09-23: XigmaNAS 11.2.0.4.6881 - released!

We really need "Your" help on XigmaNAS https://translations.launchpad.net/xigmanas translations. Please help today!

Producing and hosting XigmaNAS costs money. Please consider donating for our project so that we can continue to offer you the best.
We need your support! eg: PAYPAL

Add Old SoftwareRAID Workflow.

Software RAID information and help
Forum rules
Set-Up GuideFAQsForum Rules
Locked
al562
Advanced User
Advanced User
Posts: 221
Joined: 12 Dec 2012 08:02
Location: New Jersey, U.S.A.
Contact:
Status: Offline

Add Old SoftwareRAID Workflow.

#1

Post by al562 » 12 Mar 2013 07:52

Add old SoftwareRAID workflow
Last Updated: 02/2013 on 9.1.0.1-636 by Al562

This workflow was originally posted in the old forum by Danmero. I have restored, edited / updated the content including archived copies of the reference links.
This workflow is periodically reviewed and updated and is used as a guide for anyone needing to move / migrate SoftRAID arrays created with gmirror (not vinum). This was originally published 11/2008, before we had the "Import Software RAID Disks" and "Clear Config and Import Software RAID Disks" buttons in the WebGUI. Since version 9, those buttons essentially automate this process and generally work well with clean, undamaged arrays.
Sometimes your arrays may not be clean or may have been damaged and may not work as expected. In these situations it is helpful to understand this manual process since it may help recover / rebuild some damaged SoftRAID arrays. If you are not an expert with NAS4Free, seek help / guidance from one before you make any attempt to fix a damaged SoftRAID array. Most arrays are recoverable in one way or another, but many people panic and take actions that destroy or make it harder to recover their data, in the mistaken belief they are fixing the problem or because they have misdiagnosed what is wrong. Don't be one of those people, become an expert or get help from one.

Warning: Do not try this on your production system.
Case: What do we need to do to add an old SoftwareRAID array to a different / new NAS4Free system? Now we have the "Import" buttons in the WebGUI to make this easy, so the short answer is push one of the buttons. In the old days we didn't have the "Import" buttons so we did it manually, which is good to know in case the buttons don't work for some reason.
Here is the manual way:

On my test box I run the following experiment.
  1. Start from a newly created SoftwareRAID array.
    1. Format array.
    2. Mount array.
    3. Fill array with data.
  2. Remove array.
    1. Umount array.
    2. Delete array from SoftwareRAID|Management.
      Here I get: Warning: You are going to delete a RAID volume. All data will get lost and can not be recovered. :!:
      Apply to confirm and the array is gone.
  3. Re-create the array
    1. Re-create the array using the same members and the same name but not selecting Create and Initialize RAID. The array is in "Stopped" status. Re-create the array using the same members and the same name but selecting Create and initializeRAID. Even if the WebGUI shows a warning:
      This will erase ALL data on the selected disks! Do not use this option if you want to add an already existing RAID again. :!:
    2. Apply and the status shows that my array is UP.
    3. OK, so I don't format the array since it should already be formatted and have data on it, just mount the array.
    4. Check my data on array and everything is there and the checksum matches for all files.
Conclusion: We must initialize the old RAID arrays so they prior to mounting, please confirm.

My results per geom:
  • JBOD came UP immediately, I checksummed the files and everything looks OK
  • gconcat came UP immediately, I checksummed the files and everything looks OK
  • gRAID1 came UP immediately, I checksummed the files and everything looks OK
  • gRAID5 starts rebuilding, however I can mount the volume and checksum the files immediately, everything OK.

Re: Add old SoftwareRAID workflow
by powerofpi» Thu Jul 02, 2009 2:36 pm
So please correct me if I'm wrong...

What you're saying is if I have an existing software RAID5 array and something happens to the NAS4Free installation (eg. reset to defaults or fresh install), what I should do is the following:

1. Create a new RAID5 array with the old members and create and initialize the array.
2. Mount the array without formatting, and the data that was contained on the old array should in theory still be there.

I recently built a NAS4Free system with software RAID5, and I'm wondering what I would do in the case that something with the OS goes sour so that I would not lose data. Thanks.
Re: Add old SoftwareRAID workflow
by danmero» Thu Jul 02, 2009 4:24 pm
powerofpi wrote:So please correct me if I'm wrong...
I will.
powerofpi wrote:I recently built a NAS4Free system with software RAID5, and I'm wondering what I would do in the case that something with the OS goes sour so that I would not lose data. Thanks.
If you take the following measures you don't have to worry about recovering your SoftRAID array.
  • Backup your configuration. I've seen users who did not backup the configuration for 3+ years.
  • Backup your system partition. Before any updates on production systems I always backup my system partitions. If something goes wrong I can restore the system partition.
  • Backup your USB/CF disk. USB/CF are cheap today, you can create a duplicate or your system USB/CF disk just in case the running one will fail suddenly.
  • Backup your data. In case of a real catastrophe.
powerofpi wrote:What you're saying is if I have an existing software RAID5 array and something happens to the NAS4Freeinstallation (eg. reset to defaults or fresh install), what I should do is the following:
Only if you don't have a backup (config or system partition).
powerofpi wrote:2. Mount the array without formatting, and the data that was contained on the old array should in theory still be there.
It should be, if the data is clean / undamaged, if the array is clean / undamaged. Sometimes servers crash for various reasons (power spike fries motherboard, power supply overheats, CPU overheats) which may cause damage to the data or arrays. In these cases, additional troubleshooting / repair may be necessary before an array will mount.
Re: Add old SoftwareRAID workflow
by powerofpi» Mon Jul 06, 2009 5:06 pm
Danmero wrote:If you take the following measures you don't have to worry about recovering your SoftRAID array. . . .
Great! So your response is essentially to keep my configuration file backed up, and then the array will still exist after a restore, right??
Danmero wrote:It should be, if the data is clean / undamaged . . . .
So in theory, would the process I stated in my original post be able to recover an array in the case that the configuration file was not backed up? I understand that the data would still be there, but would NAS4Free be able to "see" the existing array and its data?
Re: Add old SoftwareRAID workflow
by danmero» Mon Jul 06, 2009 5:24 pm
Correct.
In case you are unsure, I just re-verified the work flow few days ago, read the following for more details and examples of troubleshooting: Read these for more discussion on how to handle SoftRAID arrays in different situations:

Locked

Return to “Software RAID”