Ubuntu Servers :: Getting Md Raid To Auto Assemble On Boot
Jun 20, 2011
I have Ubuntu 10.10 (maverick) and I'm using mdadm 3.1.4. I have created a RAID 10 using imsm as the metadata, and this runs successfully if I assemble the RAID from the command line. My question is: How do I get the RAID to auto assemble when I boot the system? I would like to be able to mount the RAID when the system starts up (but the OS is on a separate disk altogether). What I've found out so far is that I must do a Code: update-initramfs -k all -u AFTER I've modified the /etc/mdadm/mdadm.conf file. This is what I've got in my configuration file:
BUT what happens is that when I reboot my server, and then do "ls -l /dev/md*" there is no listing at all for any RAID devices. I actually have to run the assemble command on command line and that is when I see listings for RAID devices under /dev. What am I missing?
Could any RAID gurus kindly assist me on the following RAID-5 issue?I have an mdadm-created RAID5 array consisting of 4 discs. One of the discs was dropping out, so I decided to replace it. Somehow, this went terribly wrong and I succeeded in marking two of the drives as faulty, and the re-adding them as spare.
Now the array is (logically) no longer able to start:
mdadm: Not enough devices to start the array.Degraded and can't create RAID ,auto stop RAID [md1]
Code: mdadm --create --assume-clean --level=5 --raid-devices=4 /dev/sda2 /dev/sdb2 /dev/sdc2 /dev/sdd2 As I don't want to ruin the maybe small chance I have left to rescue my data, I would like to hear the input of this wise community.
I recently installed a server with Software RAID. I tested by powering it down, unplugging one drive and powering it up. Magically, it worked!I found out later that I have to manually add individual devices like md1 to sda2 md2 to sda4. I got all of them added and rebuilt but my question is: Is there a way to make it so that if I "removed" a drive and put it back, the system will senses the new drive and rebuilds based on some internal table?
Forgive the terseness. I'm frazzled with this issue, perhaps I should have asked earlier. Every weekend for the past 2 months has been an endless cycle of 'repair broken system' off the install disk.
Installed from Ubuntu server 10.04LTS x86_64, + xfce-desktop Here is uname -a Linux ournas 2.6.32-25-server #45-Ubuntu SMP Sat Oct 16 20:06:58 UTC 2010 x86_64 GNU/Linux If I add my raid + lvm to the fstab file, the boot stalls, (no error it, just hangs waiting, forever). So that's a not very user friendly to start with.
I've tried the suggestions about UUID in fstab tried using LABEL instead, or even /dev/xxx. Every time it hangs. I've googled this endlessly and not found a solution. So don't ask why... since I seem to have tried every odd suggestion to fix this, I've lost track. There seems to be some consensus that whoever gave us plymouth laid an egg. Forgive me if I'm wrong, but did we need a better graphical boot if it breaks everything else?
I was having this issue with my server when I tried upgrading (fresh install) to 10.04 from 9.04. But to test it out after going back to 9.04 I installed 10.04 server in a virtual machine and found the same issues. I was using the AMD64 version for everything. In the virtual machine I chose openssh and samba server in the initial configuration. After the install I ran a dist-upgrade and installed mdadm. I then created an fd partition on 3 virtual disks and created a RAID5 array using the following command:
This is the same command I ran on my physical RAID5 quite a while ago which has been working fine ever since. After running a --detail --scan >> mdadm.conf (and changing the metadata from 00.90 to 0.90) I rebooted and found that the array was running with only one drive which was marked as a spare. On the physical server I kept having this issue with one drive which would always be left out when I assembled the array and would work fine after resyncing until I rebooted. After I rebooted the array would show the remaining 6 drives (of 7) as spares.
I updated mdadm to 3.1.1 using a deb from debian experimental and the RAID was working fine afterward. But then the boot problems started again. As soon as I added /dev/md0 to the fstab the system would hang on boot displaying the following before hanging:
I have been working in my spare time over the last few days, Had problems with the whole grub2 not installing on RAID 1. Then I found out that I had to have a separate non raid Ext4 partition on one drive with "/Boot" as mount point and install went though fine.
My question is, will the developers FIX this. I mean if I only have 2 x 2tb drives in teh pc as RAID 1, and the one fails with the boot partition the whole machine goes down. Kinda defeats the whole RAID feature huh.
I USED to run a windows network with RAID 5 servers, and windows never had a problem installing everything on the RAID. Or even setting up RAID 1 in the bios on the PC and installing XP or NT4 on the RAID 1. There was never a need for a separate non raid boot partition.
Do we need a separate RAID friendly/enabled Grub? I guess for now I will get a 250gb drive and install the Server OS to it, and setup RAID1 manually after the server OS boots. Then will make a ghost type image of the server in case that drive fails so I can quickly install a new drive and restore the image and get it back up and running again.
Ran 'do-release-upgrade -d'on my server running Hardy.No problems during the upgrade.Rebooted after the upgrade completed, and I was presented with the new plymouth screen. This sucks for servers.It sat there displaying the logo for ~5 minutes.Hit CTRL+ALT+F1 through F8 and didn't see anything on the virtual consoles.Finally figured out that I had to hit ESC on the plymouth screen to actually see what was going on.It said /dev/sdi1 had problems along with /dev/md0.It sat there forever with no fsck status and no HDD lights blinking.
SysRq+REISUB and tweaked the boot parameter to remove 'quiet splash' and appended 'S' for single-user mode.Got the attached screenshot.The box has been sitting like this for ~15 minutes.Not entirely sure what to report a bug against at the moment. Plus the somewhat-new requirement of running 'ubuntu-bug' is pretty retarded in this situation. (Yeah, I know I can add some string to the URL to get around it.Why is it such a pain in the *** to report a bug?)I'm going to do some more digging to try and find out what is dying during boot.The new boot process is a bit of a mystery to me still, so if anyone has pointers or any devs want more detailed information,
i installed ubuntu server on a 4-hard disk system, i installed with the RAID 10 support that comes with 10.04 server optioon. my raid swap is /dev/md0 and my raid data partition is /dev/md1
hard drives are /dev/sda /dev/sdb /dev/sdc /dev/sdd
the instalation goes fine, from the 8TB im getting 4TB mirrored which is what i want, but the instalation setup goes up to the point where it asks me to install grub boot loader, There i choose the default option and it does a fatal error.
my main goal is just to make it bootable, any method is welcome. this went beyond my RAID knowledge (more conceptual than technical)
I've got a couple of new hard disks that I have partitioned (3 partitions per disk) and set up in a mirrored software raid array using mdadm. They've synced, I've put file systems on them (1 x ext4, 2 x luks + ext4) and I can mount them. I've checked the partitions using fdisk. I've checked the filesystems using fsck. So far so good. Next step is that I'd like mdadm to automatically assemble them on boot. (Not bothered about mounting and crypttabing yet.)
I've used sudo /usr/share/mdadm/mkconf to generate a new mdadm.conf with the appropriate UUIDs for the new partitions. I've checked that this matches the output of sudo mdadm --detail --scan
I have tried different methods to auto start wpa_supplicant at boot on Ubuntu Lucid server on a laptop which can't be connected to Ethernet.
The only thing that worked is adding the wpa_supplicant command before exit0 in rc.local. It solve my problem of wpa_supplicant auto start and annoyance on not be able to ssh before local login. But the screen stuck at Ubuntu Logo. How can i get pass Ubuntu logo screen to regular tty or xbmc in future?
I have installed Ubuntu on my m1530 since 8.04 and currently dual boot Win7 and 10.10. I would like to dual boot on my PC, but I have run into a problem. I am not a pro at Ubuntu, but this problem I can not solve by reading forums like I have in the past.
I realize this is a common problem, but I have noticed people having success.
I have a M4A87TD EVO MB with two Seagate drives in Raid 0. (The raid controller is a SB850 on that MB) I use the raid utility to create the raid drive that Windows7x64 uses. I have 2 partitions and 1 unused space. Partition 1 is Windows, partition 2 is for media, and the remaining unused space is for Ubuntu.
I am running ubuntu-10.10-desktop-amd64 off a Cruzer 16GB flash drive that was installed via Universal-USB-Installer-184.108.40.206.
My problem like so many others is that when I load into Ubuntu, gparted detects two separate hard drives instead of the raid. I read that this is because kpartx is not installed on 10.10. I then went in LiveCD mode and downloaded kpartx from Synaptic Manager. Gparted still reported two drives. I opened terminal and run a few commands with kpartx. I received an error. (Forgive me I didn't write it down, but I believe it said something about a communication error. I will try again later and see.)
Currently I am reflashing the Cruzer with a persistence of 4GB. I am not familiar with this process, but I understand that my LiveCD boot will save information I download to it. I decided to try this method because I was going to install kpartx and reboot to see if this made a difference.
I am looking for any suggestions on a different method or perhaps someone to tell me that the raid controller or some hardware isn't supported. I did install ubuntu-10.10-alternate-amd64 on my flash drive, but fail to get past detecting my CD-ROM drive since it's not plugged in. If this method is viable, I will plug it in. I also watched the ..... video were a guy creates Raid 0 with the alternated CD, but it wasn't a dual boot and didn't use a raid controller from a MB.
I updated my fc12 x86_64 server today, and one of the updated included kernel 220.127.116.11-174.2.3.fc12.x86_64 from the previous one of kernel-18.104.22.168-174.fc12.x86_64.When I boot with that kernel, it stops when my logical volumes that are built on a raid 5 array (linux software raid built using mdadm) are not there.I can start them afterward with mdadm --auto-detect which seemingly loads the appropriate modules and starts the array, but I have never had to do this before.
Reading the mdadm man page, it mentions that this is generally done by the initrd. So, I am guessing the initrd that came with the new kernel is missing something.
i have harddrive on which raid 5 is configure and no file system is configured.so i want to access the data on auto raid component harddisk.could any one telme how to access auto raid component hard drive.when im connectingto my laptop its not opening.when i check in disk analyzer its showing auto raid component harddrive.please helpme to access data inside the raid drive.
It's been a real battle, but I am getting close.I won't go into all the details of the fight that I have had, but I've almost made it to the finish line. Here is the set up. ASUS Z8PE-D18 mother board 2 CPU, 8 Gig Ram. I recently added an OCZ Agility SSD, defined a raid 1 virtual disk on the 1 terabyte WD HDD drives, which will holds all of my user data, the SSD is for executables.The bios is set to AHCI. Windows 7 installed fine, recognizes the raid VD just fine.
I installed Ubuntu 10.04 by first booting into try and mode, then opening a terminal and issuing a "sudo dmraid -ay" command. Then performing the install. I told it to install the raid components, and told it to let me specify the partitions manually. When setting up the partitions, I told it to use the free space I set aside on the SSD from the Windows 7 install as ext4 and to mount root there. Ubuntu installed just fine, grub2 comes up just fine, and Windows 7 boots with out a hitch, recognizing the mirrored partition as I indicated previously. When I tell grub to boot linux however, it pauses and I get the "no block devices found" message. It will then boot, but it does not recognize the raid array. After Ubuntu starts up I can run "dmraid -ay" and it recognizes the raid array, but shows the two component disks of the raid array as well. It will not allow the component disks to be mounted, but they show up which is annoying. (I can live with that if I have to)
I have fixed a similar problem before by setting up a dmraid script in /etc/initramfs-tools/scripts/local-top ... following the instructions found at the bottom of this blog:[URL].. To recap: My problem is that after grub2 fires up Ubuntu 10.04.1 LTS (Lucid Lynx), it pauses, and I get "no block devices found" It then boots but does not recognize the raid array untill I manually run "dmraid -ay". I've hunted around for what to do but I have not found anything. It may be some timing issue or something, but I am so tired of beating my head against this wall.
trying to troubleshoot an issue i'm having with MDADM I have a raid 5 array consisting of 5 2tb Western Digital Green drives. It has been working fine for the last 6-7 months but recently has stopped working. After rebooting i get an error something like "unable to mount /mnt/storage" which is the filesystem on the raid array the raid array is /dev/md0 when i do a " sudo mdadm --assemble --scan" i get the error mdadm: /dev/md0 assembled from 3 drives - not enough to start the array all the drives are there and i can see the correct partition information if i load them up in parted.
I cant seem to get my RAID 5 (consisting of 8 1tb hard drives) assembled for some reason and I have no idea why and cant find any solutions online. Ill go ahead and show what my problem is:
here is all my hard drives:
Code: server:~$ sudo fdisk -l Disk /dev/sda: 10.2 GB, 10242892800 bytes 255 heads, 63 sectors/track, 1245 cylinders Units = cylinders of 16065 * 512 = 8225280 bytes Disk identifier: 0x0004f041
So as you can see the array for those last four look fine however for the first four it marks the last four drives as faulty for some reason. I am kind of clueless to do from this point on honestly, I have data on this array that I'd really like to save.
trying to troubleshoot an issue i'm having with MDADM.I have a raid 5 array consisting of 5 2tb Western Digital Green drives.It has been working fine for the last 6-7 months but recently has stopped working.After rebooting i get an error something like "unable to mount /mnt/storage" which is the filesystem on the raid array the raid array is /dev/md0.when i do a " sudo mdadm --assemble --scan" i get the error mdadm: /dev/md0 assembled from 3 drives - not enough to start the array.all the drives are there and i can see the correct partition information if i load them up in parted.i didnt get an emails or notification on if the drives failed, so i'm running a smart check on them now
I have an mdadm/lvm2 volume with 4 HDs that I created in Ubuntu 10.04. I just upgraded the computer to Ubuntu 10.10.
I redid the mdadm commands to get volume up and running, did mdadm --detail --scan > /etc/mdadm/mdadm.conf to get the configuration file.
But now, every time I reboot, it tells me that the volume is not ready. /proc/mdstat says that I always have one disk of the volume "inactive" as md_d127. I need to stop this volume and reassemble the whole thing to get it working.
This is what I get out of mdadm --detail --scan and put inside /etc/mdadm/mdadm.conf:
And this is my /proc/mdstat on boot:
I need to do mdadm -S /dev/md_d127, mdadm -S /dev/md127, mdadm -A --scan to get this volume working again.
This did not happen with Ubuntu 10.04. I'm really fearing the loss of my raid5 data now.
I just changed the os on my media server from Windows Home Server to Unbuntu 10.4 server. I got most of it working (samba, twonkymedia)
The only thing i have left to get working is the backup of that server. I installed bacula as i beleive it will do the job (unless someone has a better and simpler to configure idea) and i would like it to backup to my external usb 1Tb hard drive. I am able to mount the drive manually but this server gets turn on and off often to save power (and cut the electric bill) when not in use. I tried adding a line to fstab but when a do that, the server gets stuck on the startup even with the drive turned on. I read somewhere that i should use the UUID of the drive as it could change from sbd1 to sbh1 on restart so i did, same result.
I have three WD 1.5 GB harddrives. 2 of them already in a linear RAID also called Concatenated i think. (the same as JBOD). Can i add the third drive to the RAID without losing data? Update "Using mdadm software raid."