So I gave up on the Ubuntu/Asterisk/FreePBX from packages system that was just plain trouble and decided to try the FreePBX distro. The phone servers I install have no CD-ROM drives (why would they, honestly?) so I used unetbootin to put the installer on a USB drive (thumb drive in my case, but I would assume any USB drive would have the same issue).
Booted from the USB just fine… but I began to wonder why the install process was taking solong* and switched to the interactive shell and found that the installer script had decided to use my USB drive as a member of the md RAID array. Not good. So now I have two 2TB drives that are members of an 8GB array as the thumb drive I am using is only 8GB.
I marked the USB drive as failed, grubbed around with grub to switch the boot drive and record and now I can boot the system without the USB drive (the installer even managed to set it as the boot drive…). Then I had to grow /dev/md2 to include the 1.7TB left on the drives and a few hourse later… a somewhat happy system.
SO… I have one suggestion and one question.
Suggestion: the installer should be available as a thumb-drive image that takes said thumb-drive into account when creating a RAID. Or, better yet, there is just a little interaction in the kickstart script that asks whether or not to create a RAID array and what disks to include, and finally what drive is boot.
Question: how do I permanently get rid of the missing USB drive from the md array? I have:
Number Major Minor RaidDevice State
0 8 1 0 active sync /dev/sda1
1 8 17 1 active sync /dev/sdb1
2 0 0 2 removed
(and similar for the other two arrays) but want to once and for all to forget drive 2.
I’m a BSD guy and know Linux pretty well but haven’t messed with md much.
Any help is appreciated.
Ok let me do some tweaking to the auto raid setup and see what we can come up with. I have been swamped the last 2 weeks with OTTS. I plan on doing a final release this coming week and will get this addressed in the next build.
Can I just edit /etc/mdadm.conf
mdadm.conf written out by anaconda
DEVICE partitions
ARRAY /dev/md2 level=raid1 num-devices=3 …
ARRAY /dev/md0 level=raid1 num-devices=3 …
ARRAY /dev/md1 level=raid1 num-devices=3 …
MAILFROM
MAILFROM
MAILADDR root
and change it to
mdadm.conf written out by anaconda
DEVICE partitions
ARRAY /dev/md2 level=raid1 num-devices=2 …
ARRAY /dev/md0 level=raid1 num-devices=2 …
ARRAY /dev/md1 level=raid1 num-devices=2 …
MAILFROM
MAILFROM
MAILADDR root
(Emphasis is mine)
You can increase or decrease the number of members in a RAID1 array with --grow
After you remove the faulty device
use --grow like this
Thanks mrgoblin, that worked great.
We are looking at adding the option in the setup screen to pick if you want to use raid or not. We will keep you informed as we start looking at this
This was a helpful thread - but my problem was I purchased a Zotac MAG from Amazon. It’s essentially a netbook as a desktop, atom processor with only one hard drive. It’s so cheap, instead of RAID I just bought a second one that I’m going to setup identical to the first (small office install) in case of failure, they can just swap it out.
So here’s the problem - installing from USB was creating a raid with the hard drive and the USB as the two members. Not ideal. After a lot of toying around, I figured out the solution. You’ll need to download the latest Knoppix live cd and use unetbootin to make a bootable Knoppix cd. Then do the following steps:
- Boot with Knoppix onto the target computer. Remember, any information on the target computer’s hard drive(s) is going to be deleted anyway.
- Use gparted in Knoppix to erase all of the partitions on the main hard drive (probably /dev/sda1 maybe /dev/sdb1) if the usb is getting picked as sda.
- You may need to reboot to refresh the partition table. If not you’re good.
- Create a small (200mb) partition on /dev/sda. Make it a fat 32 partiton, format and make bootable. Why 200mb? Well, the freepbx is only about 18mb, 200mb is a safe number, it’s going to be erased anyway later.
- Mount the new /dev/sda1 (or whatever you created).
- Go to a terminal and do “sudo apt-get update” then “sudo apt-get install unetbootin”
- Fire up the iceweasal browser and download the latest freepbx iso (it’s about 18mb)
- From the terminal: sudo unetbootin
- Select the iso you downloaded (hint /home/knoppix is where it most likely is)
- Check the box to show all partition types, not just usb.
- Select the /dev/sda1 partition and create the “bootable usb”.
- Shut down your computer, unplug your usb stick and reboot.
What this will do is load the ISO directly off the hard drive - there will be no usb stick needed at this point. The installer will proceed as normal, and will wipe the 200mb partition and create the needed partitions for freepbx. Because you are no longer using a USB two things will happen: it won’t be part of any created RAID arrays, and the install will go about 8 times faster since USB drives are slow and it’s no longer installing to/on one. Thanks!
Just to chime in here… I just got bit by this same prob.
I managed to borrow a usb cdrom drive … because while the Knoppix solution is pretty slick, I am low on time. 