You are not logged in.

#1 2012-09-14 08:34:53

windingload
Member
From: JP
Registered: 2012-09-04
Posts: 17

RAID1 doesn't work... [SUSPEND]

Hi,

I have a problem about my installation which use LUKS encrypt, LVM, Raid1 system referred this post (http://jasonwryan.com/blog/2012/02/11/lvm/).
I've done installation my laptop has no mdadm arrays.
But my raided server shows this error...(Show up /dev/md0 as /boot)

Booting the kernel.
:: runnning early hook [udev]
:: runnning hook [udev]
::Triggering uevents...
:: runnning hook [mdadm]
:: Loading keymap...done.
:: running hook [encrypt]
Waiting 10 seconds for device /dev/md1 ...
:: running hook [lvm2]
Activating logical volumes...
  No volume groups found
waiting 10 seconds for device /dev/mapper/vgroup-lvroot ...
ERROR: device '/dev/mapper/vgroup-lvroot' not found. Skipping fsck.
ERROR: Unable to find root device '/dev/mapper/vgroup-lvroot'.

I guess this seems through encrypt nothing prompt and I didn't create any keyfile and set no crypttab pass-phrases.
after rebooting, vgchange -ay works, looks no problem lvm.

This is my /etc/mkinitcpio.conf what do you think my problems?

MODULES="ext4 raid1 dm_crypt dm_mod"
BINARIES=""
FILES=""
HOOKS="base udev autodetect pata scsi sata mdadm mdadm_udev usbinput keymap encrypt lvm2 filesystems fsck"
root@archiso ~ # cat /mnt/etc/mdadm.conf
ARRAY /dev/md/0 metadata=1.0 UUID=0917e404:a7ff3a1e:235973f9:9a52e880 name=archlinux:0
ARRAY /dev/md/1 metadata=1.2 UUID=d0de8d7c:2a89d54a:0212d6c3:2268e6f6 name=archlinux:1
root@archiso ~ # cat /mnt/etc/hostname
archlinux

Thanks for the advice.

Last edited by windingload (2012-09-20 05:54:24)


Sincerely,

tongue

Offline

#2 2012-09-18 08:52:12

windingload
Member
From: JP
Registered: 2012-09-04
Posts: 17

Re: RAID1 doesn't work... [SUSPEND]

Sorry to post again.

I re-installed again without LUKS encryption and it shows up same error again. (https://wiki.archlinux.org/index.php/So … ID_and_LVM)
It seems Raid problem but I don't what command or file is missing.

MODULES="ext4 dm_mod raid1"
HOOKS="base udev autodetect pata scsi sata keymap lvm2 mdadm mdadm_udev filesystems usbinput fsck"
HOOKS="base udev autodetect pata scsi sata keymap mdadm mdadm_udev lvm2 filesystems usbinput fsck" # same error...

Of course I did mkinitcpio -p linux and syslinux-install_update -u.
my syslinux.conf is APPEND root=/dev/mapper/vgroup-lvroot ro

Please give me some advice?


Sincerely,

tongue

Offline

#3 2012-09-18 09:54:17

gondsman
Member
Registered: 2009-07-27
Posts: 85

Re: RAID1 doesn't work... [SUSPEND]

I don't know if it can help, but in my case the array is not assembled at boot unless I add /sbin/mdmon to the BINARIES line of mkinitcpio.conf, although I have a different configuration than yours.

Offline

#4 2012-09-18 10:05:20

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: RAID1 doesn't work... [SUSPEND]

It's a little hard to tell from your post what the issue is. Is boot on /md0 or /md1?

Please provide more detail as to how you have set up your arrays and logical volumes.

Also, you only need mdadm_udev in your hooks line, and you shouldn't need anything in your binaries line.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#5 2012-09-18 10:44:44

windingload
Member
From: JP
Registered: 2012-09-04
Posts: 17

Re: RAID1 doesn't work... [SUSPEND]

hi gondsman,

Thanks for your advice! I appreciate! But I formatted bit second ago... So I try your advice tomorrow or later... But thanks so much!

hi Jason,

I love your blog post and I proud of ask you. I know my conversations are poor. yeah I draw my plan.
tumblr_majjuxi8W01ruklk4.png

This is what I want to run my system. Boot partition is /dev/md0. It seems work correctly. But they can't load lvm group correctly. My system using LVM on Raid1, GPT disks and Syslinux. GRUB2 had never success boot..

Also, you only need mdadm_udev in your hooks line, and you shouldn't need anything in your binaries line.

Yeah, but only mdadm_udev doesn't work in my system. so I just add mdadm. I forgot to remove mdadm.


Alright, my system is back. Here is my /etc/fstab.

root@archiso ~ # cat /mnt/etc/fstab
/dev/mapper/vgroup-lvroot	 /         	ext4      	rw,relatime,data=ordered	0 1
/dev/mapper/vgroup-lvhome	/home     	ext4      	rw,relatime,data=ordered	0 2
/dev/md0            		/boot     	ext4      	rw,relatime,data=ordered	0 2
/dev/mapper/vgroup-lvswap       none      	swap      	defaults  	0 0

And now I will try gondsman's advice. But same error again.
my mkinitcpio.conf and also I don't forget to run mkinitcpio -p linux and syslinux-install_update -u

MODULES="ext4 dm_mod raid1"
BINARIES="/sbin/mdmon" # `which mdmon` worked
HOOKS="base udev autodetect pata scsi sata keymap mdadm_udev lvm2 filesystems usbinput fsck"

and this is my /etc/rc.conf

USEDMRAID="yes"
USELVM="yes"

and reboot,

Booting the kernel.
:: runnning early hook [udev]
:: runnning hook [udev]
:: Triggering uevents...
:: runnning hook [keymap]
:: Loading keymap...done.
:: running hook [lvm2]
Activating logical volumes...
  No volume groups found
waiting 10 seconds for device /dev/mapper/vgroup-lvroot ...
ERROR: device '/dev/mapper/vgroup-lvroot' not found. Skipping fsck.
ERROR: Unable to find root device '/dev/mapper/vgroup-lvroot'.

I didn't edit any other file excerpt Begginer's guide's require files.

Last edited by windingload (2012-09-18 11:27:41)


Sincerely,

tongue

Offline

#6 2012-09-18 18:43:17

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: RAID1 doesn't work... [SUSPEND]

Try using the UUIDs in your mdadm.conf for fstab entries.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#7 2012-09-19 01:10:28

windingload
Member
From: JP
Registered: 2012-09-04
Posts: 17

Re: RAID1 doesn't work... [SUSPEND]

Thanks for the advice but my issue is going on.

sh-4.2# mdadm --examine --scan
ARRAY /dev/md/0 metadata=1.0 UUID=363a0670:0c89fe3b:7aab91cd:b740a9ed name=archiso:0
ARRAY /dev/md/1 metadata=1.2 UUID=8a49b916:86fdabad:902481d8:90daabdd name=archiso:1

sh-4.2# cat /etc/mdadm.conf
ARRAY /dev/md/0 metadata=1.0 UUID=363a0670:0c89fe3b:7aab91cd:b740a9ed name=archlinux:0
ARRAY /dev/md/1 metadata=1.2 UUID=8a49b916:86fdabad:902481d8:90daabdd name=archlinux:1

sh-4.2# cat /etc/fstab
# UUID=953fe1b7-31dc-4543-9670-7b0d331e3df5
UUID=8a49b916-86fdabad-902481d8-90daabdd	/	ext4	rw,relatime,data=ordered	0 1

# UUID=e736af16-fa36-4493-b31b-daca61ef5a97
UUID=8a49b916-86fdabad-902481d8-90daabdd	/home     ext4       rw,relatime,data=ordered	0 2

# UUID=0e3ac452-53ff-400a-9284-e3e9c220676f
UUID=363a0670:0c89fe3b:7aab91cd:b740a9ed	/boot     ext4       rw,relatime,data=ordered	0 2

# UUID=e2caff32-5779-4683-a35a-71a7d433c540
UUID=8a49b916-86fdabad-902481d8-90daabdd	none      	swap      	defaults  	 0 0
tmpfs           /tmp    tmpfs   nodev,nosuid    0       0

UUID=953fe1b7-31dc-4543-9670-7b0d331e3df5       /               ext4            rw,relatime,data=ordered        0 1
UUID=e736af16-fa36-4493-b31b-daca61ef5a97       /home           ext4            rw,relatime,data=ordered        0 2
UUID=0e3ac452-53ff-400a-9284-e3e9c220676f       /boot           ext4            rw,relatime,data=ordered        0 2
UUID=e2caff32-5779-4683-a35a-71a7d433c540       none            swap            defaults                        0 0

does not work too.. Perhaps my machine has other trouble with installation. I will reinstall arch linux with no raid.
Or please give me another advice? (silly me)


Sincerely,

tongue

Offline

#8 2012-09-19 01:48:43

jasonwryan
Anarchist
From: .nz
Registered: 2009-05-09
Posts: 30,424
Website

Re: RAID1 doesn't work... [SUSPEND]

I'm sorry. I can't identify anything obvious that is preventing the lvroot volume from appearing.

All I can suggest is, from a chroot, rescan and reactivate the volumes.


Arch + dwm   •   Mercurial repos  •   Surfraw

Registered Linux User #482438

Offline

#9 2012-09-19 03:51:08

falconindy
Developer
From: New York, USA
Registered: 2009-10-22
Posts: 4,111
Website

Re: RAID1 doesn't work... [SUSPEND]

Please use the mdadm_udev hook, not mdadm. You've made quite the mess of your hooks, which isn't helping your case, either...

HOOKS="base udev autodetect sata keymap mdadm_udev lvm2 filesystems usbinput fsck"

This is all you need. Do NOT double up on hooks unless you understand what they do.

You need to solve the problem with /dev/md1 not appearing before you can figure out why the logical volume isn't appearing. This might just be magically fixed by using the mdadm_udev hook, but you may need to look around the ramfs in /dev to see what is present if assembly still fails. The output of 'blkid' is helpful for seeing what the known block devices are.

Offline

#10 2012-09-19 08:27:04

windingload
Member
From: JP
Registered: 2012-09-04
Posts: 17

Re: RAID1 doesn't work... [SUSPEND]

Update: Installation without RAID has passed. (same partitions, same way) Definitely it seems my RAID or mdadm's settings issue.

Jason,

I'm sorry. I can't identify anything obvious that is preventing the lvroot volume from appearing.
All I can suggest is, from a chroot, rescan and reactivate the volumes.

No probrem and thank you sir give suggestions. I didn't care about mdadm.conf's UUID before. But what's difference between arch-chroot and chroot? I always use arch-chroot. and also I use `vgchange -ay` or `mdadm --examine --scan > /etc/mdadm.conf` into arch-chroot.

Hi falconindy,

This is all you need. Do NOT double up on hooks unless you understand what they do.

Yup, I have not understanded HOOKS and MODULES before this thread opens.

but you may need to look around the ramfs in /dev to see what is present if assembly still fails. The output of 'blkid' is helpful for seeing what the known block devices are.

It's quite difficult for me... I understand that 'blkid' is command. Then I will try it after build new RAID array. Please give me more time because I need to wipe my hdd.

Last edited by windingload (2012-09-19 08:30:56)


Sincerely,

tongue

Offline

#11 2012-09-20 05:54:03

windingload
Member
From: JP
Registered: 2012-09-04
Posts: 17

Re: RAID1 doesn't work... [SUSPEND]

I got another serious problems about graphics... (It's not arch linux problem, it is my old pc's problem)
I have continued installation and reboot so that appears like this
2n9i0qv.jpg

Hmm, I try to solve this problem to check install is success.


Sincerely,

tongue

Offline

Board footer

Powered by FluxBB