ViciBox v.9.0.2 build with Linux MD RAID1 - May 9th 2020

Support forum for the ViciBox ISO Server Install and ISO LiveCD Demo

Moderators: enjay, williamconley, Staydog, mflorell, MJCoate, mcargile, Kumba

ViciBox v.9.0.2 build with Linux MD RAID1 - May 9th 2020

Postby Kumba » Wed Oct 02, 2019 1:43 am

Here is a link to a ViciBox V9 build which installs the root file system to a degraded linux MD RAID 1. The idea being that after you install the ISO, you would then login and add a second drive to it to get the redundancy. You could also manually reconfigure the RAID array at this point into anything else you wanted too, like a RAID10.

ISO: http://download.vicidial.com/iso/vicibo ... 0.2-md.iso
MD5: http://download.vicidial.com/iso/vicibo ... 0.2-md.md5


Once you get the ISO installed, you can run 'vicibox-mdraid1' and it should setup the rest of the RAID array for you. By default it assumes /dev/sda is the drive you installed the ISO to and /dev/sdb is the drive you want to setup the RAID array on. Ideally you will want to wipe the drives clean so there's no stale left-over data on the drives like previous Linux installs or RAID configs, but it should be able to handle that.

Enjoy!
Kumba
 
Posts: 871
Joined: Tue Oct 16, 2007 11:44 pm
Location: Florida

Re: ViciBox v.9.0.0 experimental build with Linux MD RAID ar

Postby mariusmarais » Wed Oct 02, 2019 7:23 am

I've been playing with this all morning and it mostly works for me for the root partition, but I still cannot install to 1 disk, complete RAID setup, and then remove the first disk with a working system.

Biggest issue is because /boot is not also on a RAID1. Would it be possible to setup 2x RAID1 arrays using this method:
md0: /boot
md1: /

Is it feasible for me to "edit" the ISO scripts so I can do my own testing and then report back? I've been trying to extract the ISO, then the squashfs, but I can't find anything that looks like an install script :)
Edit: Oh I see... It's a full system image, not an installer.

FWIW, it looks like this will be extremely difficult to setup using UEFI, so to anyone else trying this, boot in Legacy / BIOS mode.
mariusmarais
 
Posts: 16
Joined: Mon Aug 19, 2019 8:24 am

Re: ViciBox v.9.0.0 experimental build with Linux MD RAID ar

Postby Kumba » Wed Oct 02, 2019 3:35 pm

That's a linux issue. You cant MD RAID the EFI boot partitions. You have to create duplicate partitions on the second boot drive and copy over the info.

I also don't have the ability to specify the exact boot partition layout. My option was to tell it to set-up a RAID1 MD array only.
Kumba
 
Posts: 871
Joined: Tue Oct 16, 2007 11:44 pm
Location: Florida

Re: ViciBox v.9.0.0 experimental build with Linux MD RAID ar

Postby mariusmarais » Thu Oct 03, 2019 2:17 am

OK, thanks, I'll see what I can do from here.

Might be able to contribute a script to complete MD setup after the first boot, or at least instructions.
mariusmarais
 
Posts: 16
Joined: Mon Aug 19, 2019 8:24 am

Re: ViciBox v.9.0.0 experimental build with Linux MD RAID ar

Postby Kumba » Sun Oct 06, 2019 12:46 am

On Monday I'll paste in the test script I came up with that was to allow you to convert the regular ViciBox v.9.0 iso to an MD RAID. They need to be tuned and there's still the same issue with it booting and using the /dev/md as root. Grub keeps passing it /dev/sda for root. Perhaps between what you've been looking at and what I have a complete working script can be made out of it.
Kumba
 
Posts: 871
Joined: Tue Oct 16, 2007 11:44 pm
Location: Florida

Re: ViciBox v.9.0.0 experimental build with Linux MD RAID ar

Postby mariusmarais » Sun Oct 06, 2019 2:47 am

Late on Friday I managed to get RAID1 working for both / and /boot in BIOS mode in VirtualBox. Still need to test replacement of disks in the arrays, but removing either of the two works as expected. Will also see what I can do with EFI mode, but the /boot/efi partitions will never be RAID, as you pointed out.
mariusmarais
 
Posts: 16
Joined: Mon Aug 19, 2019 8:24 am

Re: ViciBox v.9.0.0 experimental build with Linux MD RAID ar

Postby Kumba » Sun Oct 06, 2019 3:02 am

mariusmarais wrote:Late on Friday I managed to get RAID1 working for both / and /boot in BIOS mode in VirtualBox. Still need to test replacement of disks in the arrays, but removing either of the two works as expected. Will also see what I can do with EFI mode, but the /boot/efi partitions will never be RAID, as you pointed out.


Was that using the MD image to start?
Kumba
 
Posts: 871
Joined: Tue Oct 16, 2007 11:44 pm
Location: Florida

Re: ViciBox v.9.0.0 experimental build with Linux MD RAID ar

Postby mariusmarais » Sun Oct 06, 2019 3:04 am

Yes. /dev/md4 was hosting / and /dev/md3 was hosting /boot.
mariusmarais
 
Posts: 16
Joined: Mon Aug 19, 2019 8:24 am

Re: ViciBox v.9.0.0 experimental build with Linux MD RAID ar

Postby mariusmarais » Mon Oct 07, 2019 8:44 am

Hi Kumba

Just ran the attached script on 3x machines in my new cluster. They can all boot successfully with either of two drives. Supermicro MB in BIOS mode using the "MD" experimental installer.

You're welcome to use the script however you see fit, I've tried to make it easy to follow. It doesn't do a lot of error checking and it's not safe to run more than once. A companion "replace-disk.sh" script will probably be useful to whomever uses this, but that does not exist yet. I think the GRUB "diskfilter mdraidx" pieces is what you've been missing up to now. (You may want to use `sgdisk /dev/sdb --zap-all` & reboot before starting to play around if the disk isn't clean.)

Let me know how it goes, it would be great to have an "official" RAID1 setup available.

TO EVERYONE ELSE READING THIS IN THE FUTURE: Please be extremely careful with the attached script. It is highly experimental and likely to destroy all your data!

https://pastebin.com/zTg8usc1

Regards
Marius
mariusmarais
 
Posts: 16
Joined: Mon Aug 19, 2019 8:24 am

Re: ViciBox v.9.0.0 experimental build with Linux MD RAID ar

Postby Kumba » Mon Oct 07, 2019 11:59 am

I've attached the script I was working on to convert the standard installer to a Linux MD RAID array without needing the special MD build image. I got to the point where grub should be booting off the newly created MD RAID array but it doesn't. Perhaps I'll find the missing magic in your script and we can have one image with one script that will fit all installs. That would be the ideal at least.

Worst case scenario I can just have alternate/experimental build with the MD array to parallel the primary release. It might lag a few days in release since I have to specifically build it, but it's at least a workable solution.

https://pastebin.com/MR24qxKk

For anyone looking at the script I have in that link please note that it's not functional. Use the script from mariusmarais above since it's a complete working script with an expected outcome. Please also post back here with your experiences so that if you run into any issues they can be corrected in future script. It might just be the easier approach to have a main target build and a software raid target building if I can't get my approach to a Linux RAID working. Hopefully I'll have more time soon to work on further testing.
Kumba
 
Posts: 871
Joined: Tue Oct 16, 2007 11:44 pm
Location: Florida


Return to ViciBox Server Install and Demo

Who is online

Users browsing this forum: No registered users and 20 guests