|
From: | Patrick Begou |
Subject: | Grub2 and and mdraid |
Date: | Wed, 30 Sep 2015 16:26:22 +0200 |
User-agent: | Mozilla/5.0 (X11; Linux x86_64; rv:22.0) Gecko/20100101 Firefox/22.0 SeaMonkey/2.19 |
Hi,
for a while now I'm trying to set up grub to boot on a md array without any success. The system is actualy runing with: /dev/sda2 mounted on /boot /dev/sda3 a physical volume and /dev/mapper/pve-root mounted on /root (proxmox distribution) I've added a second disk /dev/sdc to move to a RAID1 config. /dev/sdc2 is part of a degraded raid1 array /dev/md2 and /dev/md2 is an ext4 filesystem for /boot /dev/sdc3 is part of a degraded raid1 array /dev/md3 and /dev/md3 is a lvm physical volume. On dev/md3 there is a logical volume /dev/mapper/pveraid-root, with ext4 filesystem to mount as / System has been copied from sda to sdc. I try to set-up grub with: mount /dev/md2 /mnt/boot mount /dev/pveraid/root /mnt/root cp -dpRx / /mnt/root cp -dpRx /boot/* /mnt/boot update-grub -o /mnt/boot/grub/grub.cfg grub-install --no-floppy --modules="biosdisk raid mdraid1x ext2 part_msdos part_gpt" --boot-directory=/mnt/boot --recheck /dev/sdc I've added a menu /etc/grub.d/09_swraid1_setup to try to boot /dev/sdc using the uuids as described in http://unix.stackexchange.com/questions/196212/required-grub-modules-for-booting-on-mdadm-raid1 #!/bin/sh exec tail -n +3 $0 # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. menuentry 'proxmox with RAID1' --class proxmox --class gnu-linux --class gnu --class os { load_video set root=(mduuid/c65cfbac-c874-4d3b-9b43-47e9d539db35) echo 'Loading Proxmox with RAID...' linux /vmlinuz-2.6.32-32-pve root=64342e2a-867b-421a-b5e1-062558c782f0 ro quiet echo 'Loading initial ramdisk...' initrd /initrd.img-2.6.32-32-pve } Or without the UUIDs as discribed in https://www.howtoforge.com/how-to-set-up-software-raid1-on-a-running-system-incl-grub2-configuration-debian-squeeze-p2 #!/bin/sh exec tail -n +3 $0 # This file provides an easy way to add custom menu entries. Simply type the # menu entries you want to add after this comment. Be careful not to change # the 'exec tail' line above. menuentry 'proxmox with RAID1' --class proxmox --class gnu-linux --class gnu --class os { load_video insmod raid insmod raid1 insmod mdraid insmod part_msdos insmod ext2 set root='(md/2)' echo 'Loading Proxmox with RAID...' linux /vmlinuz-2.6.32-32-pve root=/dev/mapper/pveraid-root ro quiet echo 'Loading initial ramdisk...' initrd /initrd.img-2.6.32-32-pve } But every time I get in the a rescue shell, saying the disk is not found. In the "ls" command of the rescue shell no md devices seams available. When I try to boot on the raid config, I set /dev/hdc to be the first in the device order at boot time via the bios. I can of course restart the server on /dev/sda to keep it runing. I do not find any help in the grub2 manual nor on the web, just an old discussion (2013) on a problem with degraded arrays... Thanks for your advices Patrick -- =================================================================== | Equipe M.O.S.T. | | | Patrick BEGOU | mailto:address@hidden | | LEGI | | | BP 53 X | Tel 04 76 82 51 35 | | 38041 GRENOBLE CEDEX | Fax 04 76 82 52 71 | =================================================================== |
[Prev in Thread] | Current Thread | [Next in Thread] |