Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-13 Thread Carlos Williams
On Tue, Jan 12, 2010 at 7:56 PM, Alexander Duscheleit
ji...@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


Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-13 Thread Alexander Duscheleit
On Tue, 12 Jan 2010 20:49:40 -0500
Baho Utot baho-u...@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


Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-13 Thread Alexander Duscheleit
On Wed, 13 Jan 2010 10:05:04 -0500
Carlos Williams carlosw...@gmail.com wrote:

 On Tue, Jan 12, 2010 at 7:56 PM, Alexander Duscheleit
 ji...@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


Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-13 Thread Tobias Powalowski
Am Mittwoch 13 Januar 2010 schrieb Alexander Duscheleit:
 On Wed, 13 Jan 2010 10:05:04 -0500
 
 Carlos Williams carlosw...@gmail.com wrote:
  On Tue, Jan 12, 2010 at 7:56 PM, Alexander Duscheleit
 
  ji...@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
tp...@archlinux.org


signature.asc
Description: This is a digitally signed message part.


Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-13 Thread Carlos Williams
On Wed, Jan 13, 2010 at 1:57 PM, Alexander Duscheleit
ji...@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.


Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-13 Thread Xavier
On Wed, Jan 13, 2010 at 8:22 PM, Carlos Williams carlosw...@gmail.com wrote:
 On Wed, Jan 13, 2010 at 1:57 PM, Alexander Duscheleit
 ji...@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 ?


Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-13 Thread Carlos Williams
On Wed, Jan 13, 2010 at 2:26 PM, Xavier shinin...@gmail.com wrote:
 Where is the link to the bug report ?

http://bugs.archlinux.org/task/17827


Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-13 Thread Baho Utot

Alexander Duscheleit wrote:

On Tue, 12 Jan 2010 20:49:40 -0500

Baho Utot baho-u...@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.






Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-13 Thread Dieter Plaetinck
On Wed, 13 Jan 2010 14:22:30 -0500
Carlos Williams carlosw...@gmail.com wrote:

 On Wed, Jan 13, 2010 at 1:57 PM, Alexander Duscheleit
 ji...@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


Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-12 Thread Carlos Williams
On Mon, Jan 11, 2010 at 3:01 PM, Baho Utot baho-u...@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.


Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-12 Thread dave reisner
On Tue, Jan 12, 2010 at 9:48 AM, Carlos Williams carlosw...@gmail.com wrote:

 On Mon, Jan 11, 2010 at 3:01 PM, Baho Utot baho-u...@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.


Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-12 Thread Carlos Williams
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.


Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-12 Thread dave reisner
On Tue, Jan 12, 2010 at 10:36 AM, Carlos Williams carlosw...@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


Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-12 Thread Baho Utot
On Tuesday 12 January 2010 09:48:24 am Carlos Williams wrote:
 On Mon, Jan 11, 2010 at 3:01 PM, Baho Utot baho-u...@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


Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-12 Thread Carlos Williams
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?


Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-12 Thread Baho Utot
On Tuesday 12 January 2010 10:21:19 am dave reisner wrote:
 On Tue, Jan 12, 2010 at 9:48 AM, Carlos Williams carlosw...@gmail.com 
wrote:
  On Mon, Jan 11, 2010 at 3:01 PM, Baho Utot baho-u...@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.




Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-12 Thread Baho Utot
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.



Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-12 Thread Carlos Williams
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.


Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-12 Thread Eric Bélanger
On Tue, Jan 12, 2010 at 11:19 AM, Carlos Williams carlosw...@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?


Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-12 Thread Alexander Duscheleit
On Tue, 12 Jan 2010 11:19:04 -0500
Carlos Williams carlosw...@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 :))


[arch-general] Why Is My RAID Installing Failing?

2010-01-11 Thread Carlos Williams
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.tldmypc

*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$ _


Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-11 Thread Eric Bélanger
On Mon, Jan 11, 2010 at 12:52 PM, Carlos Williams carlosw...@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.


Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-11 Thread Jim Pryor
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
prof...@jimpryor.net


Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-11 Thread Baho Utot
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.tldmypc

Don't do that do 

127.0.0.1  localhost.localdomain   localhost
127.0.0.2  mypc.mydomain.tldmypc


 *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 

Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-11 Thread Carlos Williams
On Mon, Jan 11, 2010 at 1:15 PM, Baho Utot baho-u...@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.


Re: [arch-general] Why Is My RAID Installing Failing?

2010-01-11 Thread Baho Utot
On Monday 11 January 2010 13:36:06 Carlos Williams wrote:
 On Mon, Jan 11, 2010 at 1:15 PM, Baho Utot baho-u...@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.tldmypc
 
  Don't do that do
 
  127.0.0.1  localhost.localdomain   localhost
  127.0.0.2  mypc.mydomain.tldmypc
 
 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