[arch-general] Why Is My RAID Installing Failing?
OK - I am once again attempting to use Arch install for 2010 on my system which has two identical hard drives and I simply want to mirror both drives in a RAID1 array. I have read the Wiki so much at this point it has become memorized. I am NOT using LVM or anything, just a Arch user who wants RAID1, very simple, right? Well wait, it gets easier. I am not even attempting to add my MBR /dev/sda1 (/boot) to the RAID1 array. Crazy simple, huh? You might even ask well why am I even asking for help then...well because I hate the Arch installer and not because its CLI only. No, I love the simplicity of the installer and not being graphical but the RAID configuration is a complete mess. I am booting from a fresh 2009.08 Netinstall ISO disk. I select the 1st option and login as root (requires no password). Before I just junp into the installer (/arch/setup), I need to configure a few things: 1 - I use 'cfdisk' to configure /dev/sda & /dev/sdb. - /dev/sda1 = 4096 MB (bootable) 83 - /dev/sda2 = The rest of the disk (selecting 'fd' type) - /dev/sdb1 = 4096 MB (SWAP) 82 - /dev/sdb2 = The rest of the disk (selecting 'fd' type) 2. I need to load my RAID1 modules using the following command: #modprobe raid1 3. Now I need to create my RAID1 mirror using the following command: #mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2 4. Check to make sure the RAID is rebuilding and both devices show [UU] #cat /proc/mdstat So now everything is working fine and going as it should be via the Wiki. Now the Wiki in my opinion is way too bloated and tries to do too much so I am cutting and pasting what I feel applies to me. Which is why I am showing you everything I am doing here in this email to see why I am failing. Now I need to update the /etc/mdadm.conf file with my new RAID1 I created with the following command: #mdadm -D --scan >> /etc/mdadm.conf And I also verify that my info was correctly populated into the /etc/mdadm.conf file using the following command: #cat /etc/mdadm.com So now I am ready to run the /arch/setup command from the CLI to begine configuring the install / my new system. 1 - Select Source = I configure my install method and all my network variables 2 - Set Clock = I configure my Time Zone and stuff 3 - Prepare Hard Drive(s) = Here I can skip to section sub menu 3 since I already did most of this above. I simply now just select mount points for my existing partitions: sda1 = /boot (ext3) sdb2 = swap (swap) md0 = / (ext4) 4 - Select Packages = I select the base packages and what I feel is required for my setup. 5 - Install packages = I let the system download and install the packages from my mirror. 6 - Configure System = This is where I feel my confusion comes into play. Perhaps I am missing something: */etc/rc/conf = I simply add the changes below: - In 'Hardware' section add "MODULES=(md_mod raid) - HOSTNAME="mypc" - "sshd" added to the "DAEMONS" line */etc/mkinitcpio.conf - add 'mdadm' on the 'HOOKS' line after "sata" & before "filesystems" as noted in the Wiki. */etc/resolv.conf - Check to make sure DNS looks good...it does. */etc/hosts - Add my FQDN here as follows: 127.0.0.1 mypc.mydomain.tld mypc *Root-Password - Create a secure root password. Now that is it. I select 'Done' and let it build 'initcpio' images. 7 - Install Bootloader = Here I select "Grub" and then review the default menu.lst it produces. I then select /dev/sda to install Grub on. "Grub was successfully installed" Now I am done and back at the bash shell logged in as root. I then run the following command: #cp -a /etc/mdadm.conf /mnt/etc/mdadm.conf to make sure when the system boots, it is aware of my RAID1 mirror. Now I reboot because I assume I am done. Here is my error: ::Running Hook [mdadm] Waiting 10 seconds for device /dev/md0 Root device '/dev/md0' doesn't exist, attempting to create it ERROR: Failed to parse block device for ids for /dev/md0 ERROR: Unable to detect or create root device /dev/md0 You are being dropped into a recovery shell Type reboot to reboot Type exit to try and continue booting If the device /dev/md0 gets created while you are here, try adding 'rootdelay=10 or higher to the kernel command line. ramfs$ _
On Mon, Jan 11, 2010 at 12:52 PM, Carlos Williams <carloswill@gmail.com> wrote:
OK - I am once again attempting to use Arch install for 2010 on my system which has two identical hard drives and I simply want to mirror both drives in a RAID1 array. I have read the Wiki so much at this point it has become memorized. I am NOT using LVM or anything, just a Arch user who wants RAID1, very simple, right? Well wait, it gets easier. I am not even attempting to add my MBR /dev/sda1 (/boot) to the RAID1 array. Crazy simple, huh? You might even ask well why am I even asking for help then...well because I hate the Arch installer and not because its CLI only. No, I love the simplicity of the installer and not being graphical but the RAID configuration is a complete mess.
I am booting from a fresh 2009.08 Netinstall ISO disk. I select the 1st option and login as root (requires no password). Before I just junp into the installer (/arch/setup), I need to configure a few things:
1 - I use 'cfdisk' to configure /dev/sda & /dev/sdb.
- /dev/sda1 = 4096 MB (bootable) 83 - /dev/sda2 = The rest of the disk (selecting 'fd' type)
- /dev/sdb1 = 4096 MB (SWAP) 82 - /dev/sdb2 = The rest of the disk (selecting 'fd' type)
2. I need to load my RAID1 modules using the following command:
#modprobe raid1
3. Now I need to create my RAID1 mirror using the following command:
#mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2
4. Check to make sure the RAID is rebuilding and both devices show [UU]
#cat /proc/mdstat
So now everything is working fine and going as it should be via the Wiki. Now the Wiki in my opinion is way too bloated and tries to do too much so I am cutting and pasting what I feel applies to me. Which is why I am showing you everything I am doing here in this email to see why I am failing.
Now I need to update the /etc/mdadm.conf file with my new RAID1 I created with the following command:
#mdadm -D --scan >> /etc/mdadm.conf
And I also verify that my info was correctly populated into the /etc/mdadm.conf file using the following command:
#cat /etc/mdadm.com
So now I am ready to run the /arch/setup command from the CLI to begine configuring the install / my new system.
1 - Select Source = I configure my install method and all my network variables 2 - Set Clock = I configure my Time Zone and stuff 3 - Prepare Hard Drive(s) = Here I can skip to section sub menu 3 since I already did most of this above. I simply now just select mount points for my existing partitions:
sda1 = /boot (ext3) sdb2 = swap (swap) md0 = / (ext4)
4 - Select Packages = I select the base packages and what I feel is required for my setup. 5 - Install packages = I let the system download and install the packages from my mirror. 6 - Configure System = This is where I feel my confusion comes into play. Perhaps I am missing something:
*/etc/rc/conf = I simply add the changes below: - In 'Hardware' section add "MODULES=(md_mod raid) - HOSTNAME="mypc" - "sshd" added to the "DAEMONS" line
*/etc/mkinitcpio.conf - add 'mdadm' on the 'HOOKS' line after "sata" & before "filesystems" as noted in the Wiki.
*/etc/resolv.conf - Check to make sure DNS looks good...it does.
*/etc/hosts - Add my FQDN here as follows: 127.0.0.1 mypc.mydomain.tld mypc
*Root-Password - Create a secure root password.
Now that is it. I select 'Done' and let it build 'initcpio' images.
7 - Install Bootloader = Here I select "Grub" and then review the default menu.lst it produces. I then select /dev/sda to install Grub on. "Grub was successfully installed"
Now I am done and back at the bash shell logged in as root.
I then run the following command:
#cp -a /etc/mdadm.conf /mnt/etc/mdadm.conf to make sure when the system boots, it is aware of my RAID1 mirror.
Now I reboot because I assume I am done.
Here is my error:
::Running Hook [mdadm] Waiting 10 seconds for device /dev/md0
Root device '/dev/md0' doesn't exist, attempting to create it ERROR: Failed to parse block device for ids for /dev/md0 ERROR: Unable to detect or create root device /dev/md0 You are being dropped into a recovery shell Type reboot to reboot Type exit to try and continue booting
If the device /dev/md0 gets created while you are here, try adding 'rootdelay=10 or higher to the kernel command line. ramfs$ _
In /etc/mkinitcpio.conf, add raid1 raid456 to the MODULES array and regenerate your initcpio image. That should fix it if it's the same (known ) problem that I think it is.
On Mon, Jan 11, 2010 at 12:52:57PM -0500, Carlos Williams wrote:
Here is my error:
::Running Hook [mdadm] Waiting 10 seconds for device /dev/md0
Root device '/dev/md0' doesn't exist, attempting to create it ERROR: Failed to parse block device for ids for /dev/md0 ERROR: Unable to detect or create root device /dev/md0 You are being dropped into a recovery shell Type reboot to reboot Type exit to try and continue booting
There was a problem with one of the mkinitcpio's, the mdadm line in /lib/initcpio/install/autodetect was missing a "-v" flag. This was necessary in newer versions of mdadm. I never reported it because the fix was already in mkinitcpio's git repo. Fixes: you can add that -v flag yourself to the line which begins "for raidmod in $(mdadm [add -v here]..." Or you can use mkinitcpio 0.5.27-1 in [testing]. Or boot using the fallback kernel image, which doesn't use autodetect. And wait until mkinitcpio makes it way to the core repos. -- Jim Pryor profjim@jimpryor.net
On Monday 11 January 2010 12:52:57 pm Carlos Williams wrote:
OK - I am once again attempting to use Arch install for 2010 on my system which has two identical hard drives and I simply want to mirror both drives in a RAID1 array. I have read the Wiki so much at this point it has become memorized. I am NOT using LVM or anything, just a Arch user who wants RAID1, very simple, right? Well wait, it gets easier. I am not even attempting to add my MBR /dev/sda1 (/boot) to the RAID1 array. Crazy simple, huh? You might even ask well why am I even asking for help then...well because I hate the Arch installer and not because its CLI only. No, I love the simplicity of the installer and not being graphical but the RAID configuration is a complete mess.
I am booting from a fresh 2009.08 Netinstall ISO disk. I select the 1st option and login as root (requires no password). Before I just junp into the installer (/arch/setup), I need to configure a few things:
1 - I use 'cfdisk' to configure /dev/sda & /dev/sdb.
- /dev/sda1 = 4096 MB (bootable) 83 - /dev/sda2 = The rest of the disk (selecting 'fd' type)
- /dev/sdb1 = 4096 MB (SWAP) 82 - /dev/sdb2 = The rest of the disk (selecting 'fd' type)
2. I need to load my RAID1 modules using the following command:
#modprobe raid1
3. Now I need to create my RAID1 mirror using the following command:
#mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2
4. Check to make sure the RAID is rebuilding and both devices show [UU]
#cat /proc/mdstat
So now everything is working fine and going as it should be via the Wiki. Now the Wiki in my opinion is way too bloated and tries to do too much so I am cutting and pasting what I feel applies to me. Which is why I am showing you everything I am doing here in this email to see why I am failing.
I always wait cat /proc/mdstat until the raid is finished, even though it says you don't have to, I don't want any trouble :)
Now I need to update the /etc/mdadm.conf file with my new RAID1 I created with the following command:
#mdadm -D --scan >> /etc/mdadm.conf
Don't need this
And I also verify that my info was correctly populated into the /etc/mdadm.conf file using the following command:
#cat /etc/mdadm.com
So now I am ready to run the /arch/setup command from the CLI to begine configuring the install / my new system.
1 - Select Source = I configure my install method and all my network variables 2 - Set Clock = I configure my Time Zone and stuff 3 - Prepare Hard Drive(s) = Here I can skip to section sub menu 3 since I already did most of this above. I simply now just select mount points for my existing partitions:
sda1 = /boot (ext3) sdb2 = swap (swap) md0 = / (ext4)
4 - Select Packages = I select the base packages and what I feel is required for my setup. 5 - Install packages = I let the system download and install the packages from my mirror. 6 - Configure System = This is where I feel my confusion comes into play. Perhaps I am missing something:
*/etc/rc/conf = I simply add the changes below: - In 'Hardware' section add "MODULES=(md_mod raid)
Don't need that, system already got raid by this stage, if it didn't it could read that kernel line or init.
- HOSTNAME="mypc" - "sshd" added to the "DAEMONS" line
*/etc/mkinitcpio.conf - add 'mdadm' on the 'HOOKS' line after "sata" & before "filesystems" as noted in the Wiki.
Don't think you need that, that is I don't do that on my system. I use grub to "start the array" see below.
*/etc/resolv.conf - Check to make sure DNS looks good...it does.
*/etc/hosts - Add my FQDN here as follows: 127.0.0.1 mypc.mydomain.tld mypc
Don't do that do 127.0.0.1 localhost.localdomain localhost 127.0.0.2 mypc.mydomain.tld mypc
*Root-Password - Create a secure root password.
Now that is it. I select 'Done' and let it build 'initcpio' images.
7 - Install Bootloader = Here I select "Grub" and then review the default menu.lst it produces. I then select /dev/sda to install Grub on. "Grub was successfully installed"
Now I am done and back at the bash shell logged in as root.
I then run the following command:
#cp -a /etc/mdadm.conf /mnt/etc/mdadm.conf to make sure when the system boots, it is aware of my RAID1 mirror.
Don't need that system already knows about the raid as it has already been assembled, by now. You have marked the partition (FD) as being part of a raid array the kernel can handle it.
Now I reboot because I assume I am done.
Here is my error: ::Running Hook [mdadm]
Waiting 10 seconds for device /dev/md0
Root device '/dev/md0' doesn't exist, attempting to create it ERROR: Failed to parse block device for ids for /dev/md0 ERROR: Unable to detect or create root device /dev/md0 You are being dropped into a recovery shell Type reboot to reboot Type exit to try and continue booting
If the device /dev/md0 gets created while you are here, try adding 'rootdelay=10 or higher to the kernel command line. ramfs$ _
Try adding this to grub menu.lst kernel vmlinuz26 root=/dev/md0 md=2,/dev/sda2,/dev/sdb2 Works for me, I use raid 5 three drives encrypted filesystems, root and everything else. With an encrypted root filesystem the kernel line is a bit different but what is above will work for you. What does your fstab say about the root filesystem? do you have /dev/md0 / ext4 blah.blah, blah
On Mon, Jan 11, 2010 at 1:15 PM, Baho Utot <baho-utot@columbus.rr.com> wrote:
I always wait cat /proc/mdstat until the raid is finished, even though it says you don't have to, I don't want any trouble :)
I see your point but when you have 2x 1 TB drives, you're in for a wait.
#mdadm -D --scan >> /etc/mdadm.conf
Don't need this
Hmm. Interesting. The Wiki inidicates this as a crucial point of getting RAID up and working. Sorry, I am just extremely confused. Also if I don't do this, the mdadm.conf file has no info on my newly created RAID1 configuration. How does the system know about it if I don't add the info? This is really strange to hear this. I am not doubting your help / advice and obviously what I am doing hasn't worked to this point so I am open to anything but the mdadm.conf file is full of commented out data. Are you sure I don't need to run that command?
*/etc/rc/conf = I simply add the changes below: - In 'Hardware' section add "MODULES=(md_mod raid)
Don't need that, system already got raid by this stage, if it didn't it could read that kernel line or init.
OK - I was told on the mailing list by someone that I 'NEED' this in order for it (RAID) to work.
- HOSTNAME="mypc" - "sshd" added to the "DAEMONS" line
*/etc/mkinitcpio.conf - add 'mdadm' on the 'HOOKS' line after "sata" & before "filesystems" as noted in the Wiki.
Don't think you need that, that is I don't do that on my system. I use grub to "start the array" see below.
Again, the Wiki for Arch emphesizes that this is a crucial section required for 'Software RAID' to work. Without the HOOKS entry, they advise RAID will not work.
*/etc/hosts - Add my FQDN here as follows: 127.0.0.1 mypc.mydomain.tld mypc
Don't do that do
127.0.0.1 localhost.localdomain localhost 127.0.0.2 mypc.mydomain.tld mypc
OK thanks! But I think I can ignore this completely until I get RAID working.
#cp -a /etc/mdadm.conf /mnt/etc/mdadm.conf to make sure when the system boots, it is aware of my RAID1 mirror.
Don't need that system already knows about the raid as it has already been assembled, by now. You have marked the partition (FD) as being part of a raid array the kernel can handle it.
I just assumed that since /mnt/etc/mdadm.conf has no info about my RAID, when I reboot my new system, it will then be /etc/mdadm.conf. Anyways, still confused about this one too.
Try adding this to grub menu.lst
kernel vmlinuz26 root=/dev/md0 md=2,/dev/sda2,/dev/sdb2
Works for me, I use raid 5 three drives encrypted filesystems, root and everything else. With an encrypted root filesystem the kernel line is a bit different but what is above will work for you.
What does your fstab say about the root filesystem? do you have
/dev/md0 / ext4 blah.blah, blah
Yes, that is what my fstab file shows...minus the blah blah blah. It has the proper parameters.
On Monday 11 January 2010 13:36:06 Carlos Williams wrote:
On Mon, Jan 11, 2010 at 1:15 PM, Baho Utot <baho-utot@columbus.rr.com> wrote:
I always wait cat /proc/mdstat until the raid is finished, even though it says you don't have to, I don't want any trouble :)
I see your point but when you have 2x 1 TB drives, you're in for a wait.
I have three 1TB drives thats an overnite one
#mdadm -D --scan >> /etc/mdadm.conf
Don't need this
Hmm. Interesting. The Wiki inidicates this as a crucial point of getting RAID up and working. Sorry, I am just extremely confused. Also if I don't do this, the mdadm.conf file has no info on my newly created RAID1 configuration. How does the system know about it if I don't add the info? This is really strange to hear this. I am not doubting your help / advice and obviously what I am doing hasn't worked to this point so I am open to anything but the mdadm.conf file is full of commented out data. Are you sure I don't need to run that command?
I have a blank mdadm.conf
*/etc/rc/conf = I simply add the changes below: - In 'Hardware' section add "MODULES=(md_mod raid)
Don't need that, system already got raid by this stage, if it didn't it could read that kernel line or init.
OK - I was told on the mailing list by someone that I 'NEED' this in order for it (RAID) to work.
From my working system in /etc/rc.conf MODULES=( !net-pf-10 !snd_pcsp !pcspkr !usblp b43 powernow-k8 ) notice no raid there.
- HOSTNAME="mypc" - "sshd" added to the "DAEMONS" line
*/etc/mkinitcpio.conf - add 'mdadm' on the 'HOOKS' line after "sata" & before "filesystems" as noted in the Wiki.
Notice from my working system /etc/mkinitcpio.conf HOOKS="base udev sata raid encrypt filesystems"
Don't think you need that, that is I don't do that on my system. I use grub to "start the array" see below.
Again, the Wiki for Arch emphesizes that this is a crucial section required for 'Software RAID' to work. Without the HOOKS entry, they advise RAID will not work.
*/etc/hosts - Add my FQDN here as follows: 127.0.0.1 mypc.mydomain.tld mypc
Don't do that do
127.0.0.1 localhost.localdomain localhost 127.0.0.2 mypc.mydomain.tld mypc
OK thanks! But I think I can ignore this completely until I get RAID working.
#cp -a /etc/mdadm.conf /mnt/etc/mdadm.conf to make sure when the system boots, it is aware of my RAID1 mirror.
Don't need that system already knows about the raid as it has already been assembled, by now. You have marked the partition (FD) as being part of a raid array the kernel can handle it.
I just assumed that since /mnt/etc/mdadm.conf has no info about my RAID, when I reboot my new system, it will then be /etc/mdadm.conf. Anyways, still confused about this one too.
The system must already have the raid array assembled otherwise it could not read /etc/mdadm.conf let alone the init or the inittab files
Try adding this to grub menu.lst
kernel vmlinuz26 root=/dev/md0 md=2,/dev/sda2,/dev/sdb2
Works for me, I use raid 5 three drives encrypted filesystems, root and everything else. With an encrypted root filesystem the kernel line is a bit different but what is above will work for you.
What does your fstab say about the root filesystem? do you have
/dev/md0 / ext4 blah.blah, blah
Yes, that is what my fstab file shows...minus the blah blah blah. It has the proper parameters.
Ok Try the params on the /boot/grub/menu.lst line
On Mon, Jan 11, 2010 at 3:01 PM, Baho Utot <baho-utot@columbus.rr.com> wrote:
Try the params on the /boot/grub/menu.lst line
OK - So I am starting from scratch again since my previous attempt failed. I boot from the disk. Load modprobe raid1 modules from command line and then create the RAID1 mirror with 'mdadm'. I have recreated the partitions: sda1 = 4 GB /boot (bootable) sda2 = the rest of the disk (RAID) sdb1 = 4 GB SWAP (SWAP) sdb2 = the rest of the disk (RAID) Below I created the same RAID. #mdadm --create /dev/md0 --level=2 --raid-devices=2 /dev/sda2 /dev/sdb2 **I allowed the mirror to synchronize over night. Right now as I type this, the mirror is done syncing. So according to everything we previously discussed, I don't need to mess with anything else and can go into the /arch/setup and configure my system, right? I should simply only make changes to my menu.lst as noted above, and nothing else when I am prompted to 'Configure System'? So am changing the 'kernel' line in the Grub 'menu.lst' to read as follows: kernel vmlinuz26 root=/dev/md0 md=2,/dev/sda2,/dev/sdb2 ro *Note the 'ro' at the end. It was already there before I add your suggestion in the middle. Do I take it off or leave it on?* Please let me know if I have missed anything.
On Tue, Jan 12, 2010 at 9:48 AM, Carlos Williams <carloswill@gmail.com> wrote:
On Mon, Jan 11, 2010 at 3:01 PM, Baho Utot <baho-utot@columbus.rr.com> wrote:
Try the params on the /boot/grub/menu.lst line
OK - So I am starting from scratch again since my previous attempt failed. I boot from the disk. Load modprobe raid1 modules from command line and then create the RAID1 mirror with 'mdadm'. I have recreated the partitions:
sda1 = 4 GB /boot (bootable) sda2 = the rest of the disk (RAID)
sdb1 = 4 GB SWAP (SWAP) sdb2 = the rest of the disk (RAID)
Below I created the same RAID.
#mdadm --create /dev/md0 --level=2 --raid-devices=2 /dev/sda2 /dev/sdb2
**I allowed the mirror to synchronize over night. Right now as I type this, the mirror is done syncing.
So according to everything we previously discussed, I don't need to mess with anything else and can go into the /arch/setup and configure my system, right? I should simply only make changes to my menu.lst as noted above, and nothing else when I am prompted to 'Configure System'?
So am changing the 'kernel' line in the Grub 'menu.lst' to read as follows:
kernel vmlinuz26 root=/dev/md0 md=2,/dev/sda2,/dev/sdb2 ro
*Note the 'ro' at the end. It was already there before I add your suggestion in the middle. Do I take it off or leave it on?*
Please let me know if I have missed anything.
With mdadm in your initrd, you don't need to specify the parameters of the array in Grub. Foregoing that, the first parameter passed to the "md" option is the type of raid array (e,g, 0, 1, 456) and not the number of devices in the array. Sounds good, otherwise.
On Tue, Jan 12, 2010 at 10:21 AM, dave reisner <d@falconindy.com> wrote:
With mdadm in your initrd, you don't need to specify the parameters of the array in Grub. Foregoing that, the first parameter passed to the "md" option is the type of raid array (e,g, 0, 1, 456) and not the number of devices in the array. Sounds good, otherwise.
Dave, Sorry I am confused. Are you saying that I should not do as Baho suggested to my Grub's menu.lst? So what now? I am really lost. I am being told to not add any 'mdadm' and 'raid1' modules & hooks into my system configuration because it needs to be done in Grub. But it seems to me now you're telling me I should not have to mess with Grub. I just want a simple RAID1 mirror on my system and the Wiki is a complete mess and not working for me.
On Tue, Jan 12, 2010 at 10:36 AM, Carlos Williams <carloswill@gmail.com> wrote:
On Tue, Jan 12, 2010 at 10:21 AM, dave reisner <d@falconindy.com> wrote:
With mdadm in your initrd, you don't need to specify the parameters of the array in Grub. Foregoing that, the first parameter passed to the "md" option is the type of raid array (e,g, 0, 1, 456) and not the number of devices in the array. Sounds good, otherwise.
Dave,
Sorry I am confused. Are you saying that I should not do as Baho suggested to my Grub's menu.lst? So what now? I am really lost. I am being told to not add any 'mdadm' and 'raid1' modules & hooks into my system configuration because it needs to be done in Grub. But it seems to me now you're telling me I should not have to mess with Grub. I just want a simple RAID1 mirror on my system and the Wiki is a complete mess and not working for me.
Hrmm, I've followed the wiki [1] a few times and it hasn't steered me wrong. While it does combine some of the old with the new, it makes one point fairly clear when messing with Grub: "Nowadays (2009.02), with the mdadm hook in the initrd it it no longer necessary to add kernel parameters concerning the RAID array(s)." So it's one or the other. Either the mdadm hook in initrd assembles your array, or Grub does it for you. I apologize if my last post was a little confusing as well -- I was trying to point out that if you did go with the Grub assembled array, your parameters were incorrect. However, as you did specify mdadm for your initrd, you do not need to pass this option in Grub at all. Hope that's a little clearer. [1] http://wiki.archlinux.org/index.php/Installing_with_Software_RAID_or_LVM
On Tue, Jan 12, 2010 at 10:58 AM, dave reisner <d@falconindy.com> wrote:
Hrmm, I've followed the wiki [1] a few times and it hasn't steered me wrong. While it does combine some of the old with the new, it makes one point fairly clear when messing with Grub:
"Nowadays (2009.02), with the mdadm hook in the initrd it it no longer necessary to add kernel parameters concerning the RAID array(s)."
So it's one or the other. Either the mdadm hook in initrd assembles your array, or Grub does it for you. I apologize if my last post was a little confusing as well -- I was trying to point out that if you did go with the Grub assembled array, your parameters were incorrect. However, as you did specify mdadm for your initrd, you do not need to pass this option in Grub at all.
Hope that's a little clearer.
[1] http://wiki.archlinux.org/index.php/Installing_with_Software_RAID_or_LVM
I guess thats just it. I am following the Wiki and well. The Wiki shows 3 disks. And then they partition each drive into three sections. It seems the biggest trick with the Wiki is getting Grub to boot from a RAID array. I don't even want my /boot partition as part of my RAID so I would think the chances of failure are greatly reduced, no? I simple have my / partition in a RAID1 array and both /boot and Swap are sitting alone on their respected disk partitions. So I have to wonder why do I have so many problems when I follow the Wiki guide? Did you review my 1st email I started this with which showed my step by step according to Wiki and even some added advise from this list. Do you see what would cause my failure then based on that?
On Tuesday 12 January 2010 10:36:49 am Carlos Williams wrote:
On Tue, Jan 12, 2010 at 10:21 AM, dave reisner <d@falconindy.com> wrote:
With mdadm in your initrd, you don't need to specify the parameters of the array in Grub. Foregoing that, the first parameter passed to the "md" option is the type of raid array (e,g, 0, 1, 456) and not the number of devices in the array. Sounds good, otherwise.
Dave,
Sorry I am confused. Are you saying that I should not do as Baho suggested to my Grub's menu.lst? So what now? I am really lost. I am being told to not add any 'mdadm' and 'raid1' modules & hooks into my system configuration because it needs to be done in Grub. But it seems to me now you're telling me I should not have to mess with Grub. I just want a simple RAID1 mirror on my system and the Wiki is a complete mess and not working for me.
Sorry for any confusion on my part, but the way I have described to you is the old way and I have not it fail on me. I have never been able to get raid to boot using the mdadm line in the initrd, so I use the old way which always works for me. I don't like to be constantly messing with my systems, I just what them to work.
Thanks for everyone's input. It appeared to have failed both ways. I guess Arch is not in the cards for me. It sucks because I love the rolling release aspect of Arch. I just find the documentation very confusing and something as simple as RAID should be far more simplistic even for a text based installer. Hopefully developers are looking into improving this in future releases.
On Tue, Jan 12, 2010 at 11:19 AM, Carlos Williams <carloswill@gmail.com> wrote:
Thanks for everyone's input. It appeared to have failed both ways. I guess Arch is not in the cards for me. It sucks because I love the rolling release aspect of Arch. I just find the documentation very confusing and something as simple as RAID should be far more simplistic even for a text based installer. Hopefully developers are looking into improving this in future releases.
Did you tried what I suggested earlier?
On Tue, 12 Jan 2010 11:19:04 -0500 Carlos Williams <carloswill@gmail.com> wrote:
Thanks for everyone's input. It appeared to have failed both ways. I guess Arch is not in the cards for me. It sucks because I love the rolling release aspect of Arch. I just find the documentation very confusing and something as simple as RAID should be far more simplistic even for a text based installer. Hopefully developers are looking into improving this in future releases.
I didn't know, where to put a proper reply in this thread, because basically you are all doing the same mistake. I will just outline the procedure here briefly and then explain where it all went wrong :) 1 - cfdisk # the settings in Carlos' 1st mail look sane 2 - modprobe raid1 3 - mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2 4 - /arch/setup # we save the mdadm -D --scan for later !!!! 5 - before getting to the "Configure System" part, open up another console (Alt-F2) and do mdadm -D --scan >> /mnt/etc/mdadm.conf (you have to do this before mkinitcpio runs in the "Configure" stage, but after the target system is mounted, so between "Install Packages" and "Configure System" should be fine) 6 - continue the setup as described in OP (skip the cp -a part) Now to why you have to do it this way: the file /etc/mdadm.conf tells mdadm where the proper disks/partitions are to find to build it's arrays. Therefore the mdadm hook adds this file to the initrd together with the mdadm binary. The mdadm call during init will then use this file, assemble your arrays and then hand of the boot process to the "real" system. All your tries with the "new methos" thus just failed, because you copied /etc/mdadm.conf too late, and it was never added to the initrd file. Mdadm inside the ramfs just never knew what to look for. You also have to remember later, to regenerate mdadm.conf and your initrd everytime you change major parts of your RAID setup. I hope this helps to clear some things up. Greetings, jinks (running mdraid with the "new method" on at least five boxes atm :))
On Tuesday 12 January 2010 07:56:15 pm Alexander Duscheleit wrote:
On Tue, 12 Jan 2010 11:19:04 -0500
Carlos Williams <carloswill@gmail.com> wrote:
Thanks for everyone's input. It appeared to have failed both ways. I guess Arch is not in the cards for me. It sucks because I love the rolling release aspect of Arch. I just find the documentation very confusing and something as simple as RAID should be far more simplistic even for a text based installer. Hopefully developers are looking into improving this in future releases.
I didn't know, where to put a proper reply in this thread, because basically you are all doing the same mistake. I will just outline the procedure here briefly and then explain where it all went wrong :)
1 - cfdisk # the settings in Carlos' 1st mail look sane 2 - modprobe raid1 3 - mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2 4 - /arch/setup # we save the mdadm -D --scan for later !!!! 5 - before getting to the "Configure System" part, open up another console (Alt-F2) and do mdadm -D --scan >> /mnt/etc/mdadm.conf (you have to do this before mkinitcpio runs in the "Configure" stage, but after the target system is mounted, so between "Install Packages" and "Configure System" should be fine) 6 - continue the setup as described in OP (skip the cp -a part)
Now to why you have to do it this way: the file /etc/mdadm.conf tells mdadm where the proper disks/partitions are to find to build it's arrays. Therefore the mdadm hook adds this file to the initrd together with the mdadm binary. The mdadm call during init will then use this file, assemble your arrays and then hand of the boot process to the "real" system.
All your tries with the "new methos" thus just failed, because you copied /etc/mdadm.conf too late, and it was never added to the initrd file. Mdadm inside the ramfs just never knew what to look for.
Only if you use the madam hook, I use just the raid and encryption hook and it works for me. I am using raid5 with encrypted root and home filesystems (on the Arch install) , everything is encrypted except /boot ( it is not mounted into the filesystem and is not in fstab )
You also have to remember later, to regenerate mdadm.conf and your initrd everytime you change major parts of your RAID setup.
I hope this helps to clear some things up.
Greetings, jinks (running mdraid with the "new method" on at least five boxes atm :))
Ok, I am wrong. That's why my system boots and runs without a /etc/mdadm.conf Let me suggest you have a look at the raid howto on slackware12.2 or 13.0 dvd. ftp://carroll.cac.psu.edu/pub/linux/distributions/slackware/slackware-13.0/README_RAID.TXT Slack uses lilo but if you define the array on the kernel line in grub it works just the same. /boot/grub/menu.lst timeout 5 default 41 color green/black light-green/blue title ArchLinux x86_64 root (hd0,1) kernel /vmlinuz26 cryptdevice=/dev/md2:root root=/dev/mapper/root md=2,/dev/sda5,/dev/sdb5,/dev/sdc5 ro initrd /kernel26.img title Slackware 12.2-x86 root (hd0,1) kernel /Slackware/vmlinuz root=/dev/md2 md2=,/dev/sda5,/dev/sdb5,/dev/sdc5 Notice no initrd in the above Here is /etc/mdadm.conf from Slack and the Arch install has an empty file for /etc/mdadm.conf. Please read the second paragraph, closely read the functioning of madm without a configuration file. # mdadm configuration file # # mdadm will function properly without the use of a configuration file, # but this file is useful for keeping track of arrays and member disks. # In general, a mdadm.conf file is created, and updated, after arrays # are created. This is the opposite behavior of /etc/raidtab which is # created prior to array construction. # # # the config file takes two types of lines: # # DEVICE lines specify a list of devices of where to look for # potential member disks # # ARRAY lines specify information about how to identify arrays so # so that they can be activated # # You can have more than one device line and use wild cards. The first # example includes SCSI the first partition of SCSI disks /dev/sdb, # /dev/sdc, /dev/sdd, /dev/sdj, /dev/sdk, and /dev/sdl. The second # line looks for array slices on IDE disks. # #DEVICE /dev/sd[bcdjkl]1 #DEVICE /dev/hda1 /dev/hdb1 # # If you mount devfs on /dev, then a suitable way to list all devices is: #DEVICE /dev/discs/*/* # # # # ARRAY lines specify an array to assemble and a method of identification. # Arrays can currently be identified by using a UUID, superblock minor number, # or a listing of devices. # # super-minor is usually the minor number of the metadevice # UUID is the Universally Unique Identifier for the array # Each can be obtained using # # mdadm -D <md> # #ARRAY /dev/md0 UUID=3aaa0122:29827cfa:5331ad66:ca767371 #ARRAY /dev/md1 super-minor=1 #ARRAY /dev/md2 devices=/dev/hda1,/dev/hdb1 # # ARRAY lines can also specify a "spare-group" for each array. mdadm --monitor # will then move a spare between arrays in a spare-group if one array has a failed # drive but no spare #ARRAY /dev/md4 uuid=b23f3c6d:aec43a9f:fd65db85:369432df spare-group=group1 #ARRAY /dev/md5 uuid=19464854:03f71b1b:e0df2edd:246cc977 spare-group=group1 # # When used in --follow (aka --monitor) mode, mdadm needs a # mail address and/or a program. This can be given with "mailaddr" # and "program" lines to that monitoring can be started using # mdadm --follow --scan & echo $! > /var/run/mdadm # If the lines are not found, mdadm will exit quietly #MAILADDR root@mydomain.tld #PROGRAM /usr/sbin/handle-mdadm-events
On Tue, 12 Jan 2010 20:49:40 -0500 Baho Utot <baho-utot@columbus.rr.com> wrote:
[...]
All your tries with the "new methos" thus just failed, because you copied /etc/mdadm.conf too late, and it was never added to the initrd file. Mdadm inside the ramfs just never knew what to look for.
Only if you use the madam hook, I use just the raid and encryption hook and it works for me.
I am using raid5 with encrypted root and home filesystems (on the Arch install) , everything is encrypted except /boot ( it is not mounted into the filesystem and is not in fstab )
Yes, I was mostly implying use of the mdadm hook. I personally don't like overly long boot lines in grub. I have no idea why the "raid" hook also failed for others, I haven't used it in a long time.
[...]
Let me suggest you have a look at the raid howto on slackware12.2 or 13.0 dvd.
ftp://carroll.cac.psu.edu/pub/linux/distributions/slackware/slackware-13.0/README_RAID.TXT
Slack uses lilo but if you define the array on the kernel line in grub it works just the same.
/boot/grub/menu.lst
timeout 5 default 41 color green/black light-green/blue
title ArchLinux x86_64 root (hd0,1) kernel /vmlinuz26 cryptdevice=/dev/md2:root root=/dev/mapper/root md=2,/dev/sda5,/dev/sdb5,/dev/sdc5 ro initrd /kernel26.img AFAIK the md=2,... line is read by the 'raid' hook to assemble the raids via mdadm command line.
title Slackware 12.2-x86 root (hd0,1) kernel /Slackware/vmlinuz root=/dev/md2 md2=,/dev/sda5,/dev/sdb5,/dev/sdc5
Notice no initrd in the above I'm not entirely sure, *how* the system manages to find raid-members and assembles them in this cases. A while ago there was a kernel-level raid auto detection which is marked as deprecated and advised against in favor of userspace raid assembly via initrd. Perhaps Slackware is still using this feature. It didn't work for me either on gentoo or arch though. This would indicate, that the md=2,... line is superfluous in this case.
Here is /etc/mdadm.conf from Slack and the Arch install has an empty file for /etc/mdadm.conf.
Please read the second paragraph, closely read the functioning of madm without a configuration file.
# mdadm configuration file # # mdadm will function properly without the use of a configuration file, # but this file is useful for keeping track of arrays and member disks. # In general, a mdadm.conf file is created, and updated, after arrays # are created. This is the opposite behavior of /etc/raidtab which is # created prior to array construction. [...]
My guess is "function properly" here means working with already detected/assembled arrays. Mdadm doesn't seem to try and autodetect arrays it doesn't know about yet. Greetings, jinks
Alexander Duscheleit wrote:
On Tue, 12 Jan 2010 20:49:40 -0500
Baho Utot <baho-utot@columbus.rr.com> wrote:
[putolin]
Notice no initrd in the above
I'm not entirely sure, *how* the system manages to find raid-members and assembles them in this cases. A while ago there was a kernel-level raid auto detection which is marked as deprecated and advised against in favor of userspace raid assembly via initrd. Perhaps Slackware is still using this feature. It didn't work for me either on gentoo or arch though. This would indicate, that the md=2,... line is superfluous in this case.
The kernel must assemble them because I have 6 raid arrays on this machine and slack finds them all without a /etc/mdadm.conf file.
On Tue, Jan 12, 2010 at 7:56 PM, Alexander Duscheleit <jinks@archlinux.us> wrote:
I didn't know, where to put a proper reply in this thread, because basically you are all doing the same mistake. I will just outline the procedure here briefly and then explain where it all went wrong :)
1 - cfdisk # the settings in Carlos' 1st mail look sane 2 - modprobe raid1 3 - mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2 4 - /arch/setup # we save the mdadm -D --scan for later !!!! 5 - before getting to the "Configure System" part, open up another console (Alt-F2) and do mdadm -D --scan >> /mnt/etc/mdadm.conf (you have to do this before mkinitcpio runs in the "Configure" stage, but after the target system is mounted, so between "Install Packages" and "Configure System" should be fine) 6 - continue the setup as described in OP (skip the cp -a part)
Alexander, All I can say is THANK YOU! Seriously solved one of the most frustrating things for me. Not to neglect everyone else you offered their working methods but the suggested steps above were perfect and worked spot on! I can't believe how easy that was! I now have exactly what I wanted...a working Arch Linux server running Software RAID1 on both drives. I will create my own Wiki even though I now now I was just doing the right step at the wrong time... Thank you all for an awesome community of assistance and getting me right where I want to be! -Carlos
On Wed, 13 Jan 2010 10:05:04 -0500 Carlos Williams <carloswill@gmail.com> wrote:
On Tue, Jan 12, 2010 at 7:56 PM, Alexander Duscheleit <jinks@archlinux.us> wrote:
I didn't know, where to put a proper reply in this thread, because basically you are all doing the same mistake. I will just outline the procedure here briefly and then explain where it all went wrong :)
1 - cfdisk # the settings in Carlos' 1st mail look sane 2 - modprobe raid1 3 - mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2 4 - /arch/setup # we save the mdadm -D --scan for later !!!! 5 - before getting to the "Configure System" part, open up another console (Alt-F2) and do mdadm -D --scan >> /mnt/etc/mdadm.conf (you have to do this before mkinitcpio runs in the "Configure" stage, but after the target system is mounted, so between "Install Packages" and "Configure System" should be fine) 6 - continue the setup as described in OP (skip the cp -a part)
Alexander,
All I can say is THANK YOU! Seriously solved one of the most frustrating things for me. [...]
Glad, I could help :) I still think /arch/setup *should* generate this file itself if it detects software raids in use for the target. The wiki even seems to suggest, that it does. Could some releng shine light on this, please? Greetings, jinks
Am Mittwoch 13 Januar 2010 schrieb Alexander Duscheleit:
On Wed, 13 Jan 2010 10:05:04 -0500
Carlos Williams <carloswill@gmail.com> wrote:
On Tue, Jan 12, 2010 at 7:56 PM, Alexander Duscheleit
<jinks@archlinux.us> wrote:
I didn't know, where to put a proper reply in this thread, because basically you are all doing the same mistake. I will just outline the procedure here briefly and then explain where it all went wrong :)
1 - cfdisk # the settings in Carlos' 1st mail look sane 2 - modprobe raid1 3 - mdadm --create /dev/md0 --level=1 --raid-devices=2 /dev/sda2 /dev/sdb2 4 - /arch/setup # we save the mdadm -D --scan for later !!!! 5 - before getting to the "Configure System" part, open up another console (Alt-F2) and do mdadm -D --scan >> /mnt/etc/mdadm.conf (you have to do this before mkinitcpio runs in the "Configure" stage, but after the target system is mounted, so between "Install Packages" and "Configure System" should be fine) 6 - continue the setup as described in OP (skip the cp -a part)
Alexander,
All I can say is THANK YOU! Seriously solved one of the most frustrating things for me. [...]
Glad, I could help :)
I still think /arch/setup *should* generate this file itself if it detects software raids in use for the target. The wiki even seems to suggest, that it does.
Could some releng shine light on this, please?
Greetings, jinks
As alternative you could use archboot iso. It will create such file and autoconfiguration of initcpio. Iso files are located here: ftp.archlinux.org/iso/archboot/ greetings tpowa -- Tobias Powalowski Archlinux Developer & Package Maintainer (tpowa) http://www.archlinux.org tpowa@archlinux.org
On Wed, Jan 13, 2010 at 1:57 PM, Alexander Duscheleit <jinks@archlinux.us> wrote:
I still think /arch/setup *should* generate this file itself if it detects software raids in use for the target. The wiki even seems to suggest, that it does.
Could some releng shine light on this, please?
I completely agree. The Wiki suggests that it's as simple as self generating if I follow the steps and it clearly is not. I became so frustrated I almost abandoned Arch. I hope this gets fixed in a soon future release of Arch.
On Wed, Jan 13, 2010 at 8:22 PM, Carlos Williams <carloswill@gmail.com> wrote:
On Wed, Jan 13, 2010 at 1:57 PM, Alexander Duscheleit <jinks@archlinux.us> wrote:
I still think /arch/setup *should* generate this file itself if it detects software raids in use for the target. The wiki even seems to suggest, that it does.
Could some releng shine light on this, please?
I completely agree. The Wiki suggests that it's as simple as self generating if I follow the steps and it clearly is not. I became so frustrated I almost abandoned Arch. I hope this gets fixed in a soon future release of Arch.
Where is the link to the bug report ?
On Wed, Jan 13, 2010 at 2:26 PM, Xavier <shiningxc@gmail.com> wrote:
Where is the link to the bug report ?
On Wed, 13 Jan 2010 14:22:30 -0500 Carlos Williams <carloswill@gmail.com> wrote:
On Wed, Jan 13, 2010 at 1:57 PM, Alexander Duscheleit <jinks@archlinux.us> wrote:
I still think /arch/setup *should* generate this file itself if it detects software raids in use for the target. The wiki even seems to suggest, that it does.
Could some releng shine light on this, please?
I completely agree. The Wiki suggests that it's as simple as self generating if I follow the steps and it clearly is not. I became so frustrated I almost abandoned Arch. I hope this gets fixed in a soon future release of Arch.
AIF has no support for softraid. It does make sure menu.lst, fstab etc are updated automagically but only for dm_crypt/lvm/"normal" setups. If the official installation guide states otherwise, we should fix that. please point me to the mistake/file a ticket. If community-maintained documentation is incorrect, fix it yourself. Patches to support softraid are always welcome. Things don't get improved by merely hoping for it. http://bugs.archlinux.org/task/14149 Dieter
On Wed, 13 Jan 2010 22:58:34 +0100 Dieter Plaetinck <dieter@plaetinck.be> wrote:
On Wed, 13 Jan 2010 14:22:30 -0500 Carlos Williams <carloswill@gmail.com> wrote:
On Wed, Jan 13, 2010 at 1:57 PM, Alexander Duscheleit <jinks@archlinux.us> wrote:
I still think /arch/setup *should* generate this file itself if it detects software raids in use for the target. The wiki even seems to suggest, that it does.
Could some releng shine light on this, please?
I completely agree. The Wiki suggests that it's as simple as self generating if I follow the steps and it clearly is not. I became so frustrated I almost abandoned Arch. I hope this gets fixed in a soon future release of Arch.
AIF has no support for softraid. It does make sure menu.lst, fstab etc are updated automagically but only for dm_crypt/lvm/"normal" setups.
That answers my question. The problem in this specific case is, that you have to sidestep the installer. Before running setup your target system isn't mounted, and after it is too late to put the file in place for mkinitcpio. Would it be possible to just generate the relevant mdadm.conf during the configure stage without providing further additional support? People are used to run installation steps in sequence so this would eliminate on source of (apparently frustrating) user error. A quick look at AIF's source suggest prefill_configs () as proper place. I'm not certain, how AIF identifies used block devices, but something like this would probably suffice: if md[0-9] in $BLOCKDEVICES -> mdadm --detail --scan >> ${var_TARGET_DIR}/etc/mdadm.conf
If the official installation guide states otherwise, we should fix that. please point me to the mistake/file a ticket. If community-maintained documentation is incorrect, fix it yourself.
The official istall guide specifically states that you are on your own with softraid. The raid/lvm/etc wiki article is a bit twisted in it's mix-and-match of methods, I shall have another look if I can squeeze the relevant information in there.
Patches to support softraid are always welcome. Things don't get improved by merely hoping for it. http://bugs.archlinux.org/task/14149
WONTFIX! This is already far too easy :)
Dieter
Jinks
On Thu, 14 Jan 2010 00:07:18 +0100 Alexander Duscheleit <jinks@archlinux.us> wrote:
Would it be possible to just generate the relevant mdadm.conf during the configure stage without providing further additional support? People are used to run installation steps in sequence so this would eliminate on source of (apparently frustrating) user error.
A quick look at AIF's source suggest prefill_configs () as proper place. I'm not certain, how AIF identifies used block devices, but something like this would probably suffice:
if md[0-9] in $BLOCKDEVICES -> mdadm --detail --scan >> ${var_TARGET_DIR}/etc/mdadm.conf
hmm. that seems simple enough. why not? what do you mean with $BLOCKDEVICES ? all blockdevices in the system? or blockdevices explicitly configured to be partionened by user? or blockdevices explicitly configured to be used for formatting by user?
If the official installation guide states otherwise, we should fix that. please point me to the mistake/file a ticket. If community-maintained documentation is incorrect, fix it yourself.
The official istall guide specifically states that you are on your own with softraid. The raid/lvm/etc wiki article is a bit twisted in it's mix-and-match of methods, I shall have another look if I can squeeze the relevant information in there.
the better the support in AIF gets, the smaller such articles can become.
Patches to support softraid are always welcome. Things don't get improved by merely hoping for it. http://bugs.archlinux.org/task/14149
WONTFIX! This is already far too easy :)
Assuming the user does the heavy work (creating the MD volumes), what are the other (little) tasks that AIF can implement to limit the amount of manual work? - modprobe raid{1,2,3,4,5,6} ? - rewriting the mdadm.conf if needed (see above) - for a root filesystem which needs raid, add raid to HOOKS in mkinitcpio.conf [where order is very important when combined with lvm/dm_crypt etc] ? anything else i'm missing? Dieter
On Thu, 14 Jan 2010 22:17:49 +0100 Dieter Plaetinck <dieter@plaetinck.be> wrote:
On Thu, 14 Jan 2010 00:07:18 +0100 Alexander Duscheleit <jinks@archlinux.us> wrote:
Would it be possible to just generate the relevant mdadm.conf during the configure stage without providing further additional support? People are used to run installation steps in sequence so this would eliminate on source of (apparently frustrating) user error.
A quick look at AIF's source suggest prefill_configs () as proper place. I'm not certain, how AIF identifies used block devices, but something like this would probably suffice:
if md[0-9] in $BLOCKDEVICES -> mdadm --detail --scan >> ${var_TARGET_DIR}/etc/mdadm.conf
hmm. that seems simple enough. why not? what do you mean with $BLOCKDEVICES ? all blockdevices in the system? or blockdevices explicitly configured to be partionened by user? or blockdevices explicitly configured to be used for formatting by user?
I meant the block devices the user selected to be mounted (regardless of formatting), so, what AIF puts in fstab mostly. If a user wants to access a softraid from arch, he probably needs a mdadm.conf and it wont hurt either way.
If the official installation guide states otherwise, we should fix that. please point me to the mistake/file a ticket. If community-maintained documentation is incorrect, fix it yourself.
The official istall guide specifically states that you are on your own with softraid. The raid/lvm/etc wiki article is a bit twisted in it's mix-and-match of methods, I shall have another look if I can squeeze the relevant information in there.
the better the support in AIF gets, the smaller such articles can become.
I hurled a few chunks around, so at least the guide doesn't end up in an unbootable system any more.
Patches to support softraid are always welcome. Things don't get improved by merely hoping for it. http://bugs.archlinux.org/task/14149
WONTFIX! This is already far too easy :)
Assuming the user does the heavy work (creating the MD volumes), what are the other (little) tasks that AIF can implement to limit the amount of manual work?
- modprobe raid{1,2,3,4,5,6} ?
Should already be done by the for creating the arrays.
- rewriting the mdadm.conf if needed (see above) This can be done pretty indiscriminately. The conf doesn't really hurt when it's not needed. - for a root filesystem which needs raid, add raid to HOOKS in mkinitcpio.conf [where order is very important when combined with lvm/dm_crypt etc] ?
Should be after "pata scsi sata" but before /lvm/encrypt/filesystems in most cases. But this is not guaranteed to be safe. You could, after all, stripe two LVs into a raid. Also, you can mix-and-match block devices in so many ways: lvm on raid on encrypted partitions, lvm on encrypted raid on normal partitions, encrypted lvm on raid on normal disks, you could even encrypt each layer separately. So I guess HOOK handling should be left to the user except when the outcome is clear to be what we want (think premade recipes).
anything else i'm missing?
As I said, don;t go too easy on us. Where is the sense of accomplishment when you can install arch manually in under 5 minutes? Not to speak of fully automatic recpies.
Dieter
Jinks --
On Thu, 14 Jan 2010 22:51:32 +0100 Alexander Duscheleit <jinks@archlinux.us> wrote:
(..)
okay so long story short, you only want the mdadm.conf updating in AIF. there's a catch about your proposal though: - it's hard to parse fstab - you would only know the blockdevices after user configured fstab, which is after prefill_config (note the *pre* fill part. this stuff is supposed to happen so that the user can change the config manually after it) is it not an option to just look at all blockdevices? for example, what do you have in /proc/partitions on your raid system? Dieter
Dieter Plaetinck wrote:
On Thu, 14 Jan 2010 22:51:32 +0100 Alexander Duscheleit <jinks@archlinux.us> wrote:
(..)
okay so long story short, you only want the mdadm.conf updating in AIF. there's a catch about your proposal though: - it's hard to parse fstab - you would only know the blockdevices after user configured fstab, which is after prefill_config (note the *pre* fill part. this stuff is supposed to happen so that the user can change the config manually after it)
why? Couldn't a mdadm -Es > /mnt/etc/mdadm.conf be suffice? I don't think you would have to parse fstab, All that you doing is makin a mdadm.conf...which you can do after thye raid is constructed. mdadm -Es > /etc/mdadm.conf mdadm -As And the mdadm.con is made and the array is started.
is it not an option to just look at all blockdevices? for example, what do you have in /proc/partitions on your raid system?
Dieter
Sorry for the late reply, RL obligations caught up with me in a pretty intrusive way :/ On Fri, 15 Jan 2010 22:06:38 +0100 Dieter Plaetinck <dieter@plaetinck.be> wrote:
On Thu, 14 Jan 2010 22:51:32 +0100 Alexander Duscheleit <jinks@archlinux.us> wrote:
(..)
okay so long story short, you only want the mdadm.conf updating in AIF. there's a catch about your proposal though: - it's hard to parse fstab - you would only know the blockdevices after user configured fstab, which is after prefill_config (note the *pre* fill part. this stuff is supposed to happen so that the user can change the config manually after it)
OK, i wasn't aware of that. I thought user modifications would already be known at that point. (I.e. it happens after mounting the target system)
is it not an option to just look at all blockdevices? for example, what do you have in /proc/partitions on your raid system?
That would work of course. [jinks@hydra]~ % grep md /proc/partitions 9 0 48064 md0 9 1 72051392 md1 9 2 166818688 md2 The only downside I can see is, that arch *might* activate arrays which are actually used by other Linux system on the same computer, but that shouldn't harm anything. Jinks
On Tuesday 12 January 2010 10:21:19 am dave reisner wrote:
On Tue, Jan 12, 2010 at 9:48 AM, Carlos Williams <carloswill@gmail.com> wrote:
On Mon, Jan 11, 2010 at 3:01 PM, Baho Utot <baho-utot@columbus.rr.com> wrote:
Try the params on the /boot/grub/menu.lst line
OK - So I am starting from scratch again since my previous attempt failed. I boot from the disk. Load modprobe raid1 modules from command line and then create the RAID1 mirror with 'mdadm'. I have recreated the partitions:
sda1 = 4 GB /boot (bootable) sda2 = the rest of the disk (RAID)
sdb1 = 4 GB SWAP (SWAP) sdb2 = the rest of the disk (RAID)
Below I created the same RAID.
#mdadm --create /dev/md0 --level=2 --raid-devices=2 /dev/sda2 /dev/sdb2
**I allowed the mirror to synchronize over night. Right now as I type this, the mirror is done syncing.
So according to everything we previously discussed, I don't need to mess with anything else and can go into the /arch/setup and configure my system, right? I should simply only make changes to my menu.lst as noted above, and nothing else when I am prompted to 'Configure System'?
So am changing the 'kernel' line in the Grub 'menu.lst' to read as follows:
kernel vmlinuz26 root=/dev/md0 md=2,/dev/sda2,/dev/sdb2 ro
*Note the 'ro' at the end. It was already there before I add your suggestion in the middle. Do I take it off or leave it on?*
Please let me know if I have missed anything.
With mdadm in your initrd, you don't need to specify the parameters of the array in Grub. Foregoing that, the first parameter passed to the "md" option is the type of raid array (e,g, 0, 1, 456) and not the number of devices in the array. Sounds good, otherwise.
madam in the initrd has never worked for me, I just to the raid the old fashion way and it works. Any way I am moving to slackware 12.2 and 13.0. Arch is just to unstable/buggy/broken, The last installation (using the latest installer) I did was the last straw.
On Tuesday 12 January 2010 09:48:24 am Carlos Williams wrote:
On Mon, Jan 11, 2010 at 3:01 PM, Baho Utot <baho-utot@columbus.rr.com> wrote:
Try the params on the /boot/grub/menu.lst line
OK - So I am starting from scratch again since my previous attempt failed. I boot from the disk. Load modprobe raid1 modules from command line and then create the RAID1 mirror with 'mdadm'. I have recreated the partitions:
sda1 = 4 GB /boot (bootable) sda2 = the rest of the disk (RAID)
sdb1 = 4 GB SWAP (SWAP) sdb2 = the rest of the disk (RAID)
Below I created the same RAID.
#mdadm --create /dev/md0 --level=2 --raid-devices=2 /dev/sda2 /dev/sdb2
**I allowed the mirror to synchronize over night. Right now as I type this, the mirror is done syncing.
So according to everything we previously discussed, I don't need to mess with anything else and can go into the /arch/setup and configure my system, right? I should simply only make changes to my menu.lst as
Yes
noted above, and nothing else when I am prompted to 'Configure System'?
Just add raid to the HOOKS line in to generate th initrd (and whatever else you need there for your system) in mkinitrd configure. I don't put the madam in the HOOKS line, it always fails for me.
So am changing the 'kernel' line in the Grub 'menu.lst' to read as follows:
kernel vmlinuz26 root=/dev/md0 md=2,/dev/sda2,/dev/sdb2 ro
Good, what that says is the root filesystem is on /dev/md0, and the array is made up of two drives, list of the drives. Now grub knows how to handle the array.
*Note the 'ro' at the end. It was already there before I add your suggestion in the middle. Do I take it off or leave it on?*
The ro is fine on the above line.
Please let me know if I have missed anything.
I don't think so. Your above setup is how I do the raid
participants (9)
-
Alexander Duscheleit
-
Baho Utot
-
Carlos Williams
-
dave reisner
-
Dieter Plaetinck
-
Eric Bélanger
-
Jim Pryor
-
Tobias Powalowski
-
Xavier