Koozali.org: home of the SME Server

Restore RAID1 to RAID5

Offline p-jones

  • *
  • 594
  • +0/-0
Restore RAID1 to RAID5
« on: August 03, 2010, 01:19:31 PM »
Hi

I am just looking for some reassurance I am or am not about to hang myself.

Have a RAID1 (S/W) Server I want to change to RAID5 (S/W)
I use the inbuilt DAR backup to workstation to back this server up to a NAS Device

Is it safe to install new drives, reinstall SME in RAID5 config (Software RAID) then restore the RAID 1 Backup ?

My concern is that the restored files from a Software RAID1 system may break the Software RAID5. 

Thanks
Peter
...

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Restore RAID1 to RAID5
« Reply #1 on: August 03, 2010, 01:27:33 PM »
p-jones

Quote
Is it safe to install new drives, reinstall SME in RAID5 config (Software RAID) then restore the RAID 1 Backup ?

Yes.
Keep in mind you will need to reinstall contribs although the configuration for those will be restored.

Quote
My concern is that the restored files from a Software RAID1 system may break the Software RAID5.

Nothing to be concerned about, the backup does not contain information about the drive array configuration. 
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline p-jones

  • *
  • 594
  • +0/-0
Re: Restore RAID1 to RAID5
« Reply #2 on: August 05, 2010, 10:39:31 AM »
Mary, thank you for the confirmation / reassurance.

Another question for the more learned, there are a few documents circulating on the internet outlining procedures on how to convert from RAID1 to RAID5 'on the fly'.  eg  http://www.arkf.net/blog/?p=47
Has anyone done this for SME? Are there any traps? Other comments from experience ?

Thanks
Peter
...

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Restore RAID1 to RAID5
« Reply #3 on: August 05, 2010, 11:34:00 AM »
Another question for the more learned, there are a few documents circulating on the internet outlining procedures on how to convert from RAID1 to RAID5 'on the fly'.  eg  http://www.arkf.net/blog/?p=47
Has anyone done this for SME? Are there any traps? Other comments from experience ?

Hi

I've just discovered the --grow option, thank you :-)

I will test it on a virtual machine asap, I will report here

Offline p-jones

  • *
  • 594
  • +0/-0
Re: Restore RAID1 to RAID5
« Reply #4 on: August 05, 2010, 12:00:50 PM »
Quote
I will test it on a virtual machine asap, I will report here

I look forward to your results. I dont have a virtual machine, it will have to be a real machine. I intend to try it out but thought it useful to see if there was any experience to draw from first. Likewise I will report back but it could be a week or two.
...

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Restore RAID1 to RAID5
« Reply #5 on: August 05, 2010, 01:36:31 PM »
here I am

just tried, just failed.. and it failed for a simple reason.. the array to grow is mounted and in use (/dev/md2).

Code: [Select]
[root@testraid ~]# mdadm --stop /dev/md2
mdadm: fail to stop array /dev/md2: Device or resource busy

so the only way to achieve it is (maybe) via cd rom in rescue mode (does it start raid?)

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Restore RAID1 to RAID5
« Reply #6 on: August 05, 2010, 11:44:55 PM »
so the only way to achieve it is (maybe) via cd rom in rescue mode (does it start raid?)

It starts raid, but you can umount and then stop the raid.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Restore RAID1 to RAID5
« Reply #7 on: August 06, 2010, 12:00:56 AM »
It starts raid, but you can umount and then stop the raid.

I've tried..
after the " mdadm --create ..." step, SME did not boot anymore..

the error was:
Code: [Select]
mdadm: no devices found for /dev/md2

maybe raid5 module? how do I tell SME to load raid5 module? should't it be done automagically?

Offline CharlieBrady

  • *
  • 6,918
  • +3/-0
Re: Restore RAID1 to RAID5
« Reply #8 on: August 06, 2010, 12:31:35 AM »
maybe raid5 module? how do I tell SME to load raid5 module? should't it be done automagically?

Before you start, rebuild the initrd to include the raid5 module (raid456 in SME8).

Offline p-jones

  • *
  • 594
  • +0/-0
Re: Restore RAID1 to RAID5
« Reply #9 on: August 06, 2010, 08:49:00 AM »
Quote
Before you start, rebuild the initrd to include the raid5 module

I am not the sharpest knife in the draw with some of this low level  stuff but happy to learn. Is there a link or somewhere I can go to figure how to do this. I tried google, found heaps, but am not sure that it is all relevant to the build that V7.5 is using.
« Last Edit: August 06, 2010, 08:50:44 AM by p-jones »
...

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Restore RAID1 to RAID5
« Reply #10 on: August 07, 2010, 09:01:55 PM »
ok, here I am, after some testing  :-)

mdadm in SME7 doesn't support then change from raid1 to raid5 :-(

it might be possible with SME8 (I will test it in the next days)

Offline janet

  • *****
  • 4,812
  • +0/-0
Re: Restore RAID1 to RAID5
« Reply #11 on: August 08, 2010, 01:50:20 AM »
p-jones

Quote
Is there a link or somewhere I can go to figure how to do this.

Start by searching these forums on initrd or mkinitrd. The Search link is at the top of page.
Here is one such result that will/should get you started if you follow Charlies advice
http://forums.contribs.org/index.php/topic,41061.msg191087.html#msg191087
Please search before asking, an answer may already exist.
The Search & other links to useful information are at top of Forum.

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Restore RAID1 to RAID5
« Reply #12 on: August 10, 2010, 11:07:16 AM »
Hi all

after a bit of testing, I've edited the wiki page

HTH

Offline ldkeen

  • *
  • 403
  • +0/-0
Re: Restore RAID1 to RAID5
« Reply #13 on: August 12, 2010, 10:00:49 PM »
Hi Stefano
Quote
after a bit of testing, I've edited the wiki page
I dont think that will survive an upgrade. You also need to include the following in /etc/modprobe.conf
alias md-personality-4 raid5
I haven't tested yet, but if you put the above into modprobe.conf prior to rebuilding initrd you dont have to use the --preload option. In reference to Charlie's post above, is the module name called raid456 or raid5?, see http://ccforums.clearfoundation.com/showflat.php?Cat=0&Board=UBB5&Number=110549&Searchpage=1&Main=110549&Words=raid456.ko+FastLaneJB&topic=&Search=true for more info.
Regards, Lloyd

Offline Stefano

  • *
  • 10,894
  • +3/-0
Re: Restore RAID1 to RAID5
« Reply #14 on: August 13, 2010, 01:21:11 AM »
I dont think that will survive an upgrade.

it will.. just tested now.. from a SME8b4 raid1 -> raid5, upgraded to latest 8b5

Quote
You also need to include the following in /etc/modprobe.conf
alias md-personality-4 raid5

no
I have no such line in any server of mine with software raid5

Quote
I haven't tested yet, but if you put the above into modprobe.conf prior to rebuilding initrd you dont have to use the --preload option.

the mkinitrd is necessary only the first time
if you prefer, you can do
Code: [Select]
modprobe raid5
mkinitrd /boot/initrd-`uname -r`.img `uname -r`

Quote
In reference to Charlie's post above, is the module name called raid456 or raid5?,

I've tested both successfully


Quote
see http://ccforums.clearfoundation.com/showflat.php?Cat=0&Board=UBB5&Number=110549&Searchpage=1&Main=110549&Words=raid456.ko+FastLaneJB&topic=&Search=true for more info.

thank you, but I sincerely prefer searching CentOS/RH documentation :wink: