install (or copy) to mdadm RAID

Questions about Grub, UEFI,the liveCD and the installer
Forum rules
Before you post read how to get help. Topics in this forum are automatically closed 6 months after creation.
Locked
HankB

install (or copy) to mdadm RAID

Post by HankB »

Hi folks,
I'm trying to get Mint 17.3 installed to a pair of mdadm RAIDed drives. My preference is actually to migrate my existing install to the RAID pair but I have not had any luck with that. I did find a video showing an installation to RAID0 and thought that might be an easier route.

I booted a live session from USB and proceeded through the install. At the end, grub was unable to install. At present I have Mint 17.2 running and a new install of Mint 17.3 on the new drives but am unable to get grub installed for the new drives.

Here is the RAID setup:

Code: Select all

hbarta@olive ~ $ cat /proc/mdstat
Personalities : [raid0] [raid1] [linear] [multipath] [raid6] [raid5] [raid4] [raid10] 
md0 : active raid1 sdg2[1] sde2[0]
      186839936 blocks super 1.2 [2/2] [UU]
      
md3 : active raid1 sdb3[1] sda3[0]
      1047488 blocks [2/2] [UU]
      
md1 : active raid0 sdb1[0] sda1[1]
      39846912 blocks super 1.2 512k chunks
      
md2 : active raid0 sdb2[1] sda2[0]
      934827008 blocks super 1.2 512k chunks
      
unused devices: <none>
hbarta@olive ~ $ 
The partitions are as follows:
/dev/md0 (not part of this particular adventure - ignore for now. ;) )
/dev/md1 / (formatted as ext4)
/dev/md2 /home (formatted as ext4, copied from $HOME)
/dev/md3 /boot (RAID1, formated as ext4)

I have previously installed Debian to a RAID1 partition and so I thought that putting /boot on a RAID1 would surely work.)

At present I am trying to install grub by mounting the devices some place convenient, bind mounting /dev, /proc and /sys and then completing the install in a chroot. Here are the commands I use:

Code: Select all

mkdir -p /mnt/root
mount /dev/md1 /mnt/root
mount /dev/md2 /mnt/root/home
mount /dev/md3 /mnt/root/boot
mount -B /proc /mnt/root/proc
mount -B /dev /mnt/root/dev
mount -B /sys /mnt/root/sys
chroot /mnt/root
Once in the chroot jail I run

Code: Select all

olive grub # grub-install /dev/sda
Installing for i386-pc platform.
grub-install.real: error: disk `md3' not found.
olive grub # 
Which apparently has not worked. I get a similar result trying to install to /dev/sdb. I will note that this is not the error I saw when trying to install grub from the live session (and I wish I had taken a picture of the screen at that time.)

I did some searching and saw that the output of a couple commands might be helpful with sorting this out.

Code: Select all

olive grub # grub-probe -v -d /dev/md3
grub-probe: info: cannot open `/boot/grub/device.map': No such file or directory.
grub-probe: info: /dev/md3 is not present.
grub-probe: info: changing current directory to /dev.
grub-probe: info: changing current directory to usb.
grub-probe: info: changing current directory to dri.
grub-probe: info: changing current directory to snd.
grub-probe: info: changing current directory to by-path.
grub-probe: info: changing current directory to vfio.
grub-probe: info: changing current directory to disk.
grub-probe: info: changing current directory to by-partlabel.
grub-probe: info: changing current directory to by-label.
grub-probe: info: changing current directory to by-uuid.
grub-probe: info: changing current directory to by-partuuid.
grub-probe: info: changing current directory to by-id.
grub-probe: info: changing current directory to /dev.
grub-probe: info: changing current directory to usb.
grub-probe: info: changing current directory to dri.
grub-probe: info: changing current directory to snd.
grub-probe: info: changing current directory to by-path.
grub-probe: info: changing current directory to vfio.
grub-probe: info: changing current directory to disk.
grub-probe: info: changing current directory to by-partlabel.
grub-probe: info: changing current directory to by-label.
grub-probe: info: changing current directory to by-uuid.
grub-probe: info: changing current directory to by-partuuid.
grub-probe: info: changing current directory to by-id.
grub-probe: info: /dev/sda3 is not present.
grub-probe: info: Looking for /dev/sda3.
grub-probe: info: /dev/sda is a parent of /dev/sda3.
grub-probe: info: /dev/sda3 starts from 2048.
grub-probe: info: opening the device hostdisk//dev/sda.
grub-probe: info: drive = 0.
grub-probe: info: the size of hostdisk//dev/sda is 976773168.
grub-probe: info: drive = 0.
grub-probe: info: the size of hostdisk//dev/sda is 976773168.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/sda.
grub-probe: info: scanning hostdisk//dev/sda for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/sda.
grub-probe: info: no LVM signature found.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/sda.
grub-probe: info: Found array md/1.
grub-probe: info: Inserting hostdisk//dev/sda (+2097152,39847936) into md/1 (mdraid1x)
.
grub-probe: info: drive = 0.
grub-probe: info: the size of hostdisk//dev/sda is 976773168.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/sda.
grub-probe: info: Found array md/2.
grub-probe: info: Inserting hostdisk//dev/sda (+41945088,934828032) into md/2 (mdraid1x)
.
grub-probe: info: drive = 0.
grub-probe: info: the size of hostdisk//dev/sda is 976773168.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/sda.
grub-probe: info: Found array md/md3.
grub-probe: info: Inserting hostdisk//dev/sda (+2048,2095104) into md/md3 (mdraid09)
.
grub-probe: info: drive = 0.
grub-probe: info: the size of hostdisk//dev/sda is 976773168.
grub-probe: info: Partition 0 starts from 2097152.
grub-probe: info: Partition 1 starts from 41945088.
grub-probe: info: Partition 2 starts from 2048.
grub-probe: info: /dev/sdb3 is not present.
grub-probe: info: Looking for /dev/sdb3.
grub-probe: info: /dev/sdb is a parent of /dev/sdb3.
grub-probe: info: /dev/sdb3 starts from 2048.
grub-probe: info: opening the device hostdisk//dev/sdb.
grub-probe: info: drive = 1.
grub-probe: info: the size of hostdisk//dev/sdb is 976773168.
grub-probe: info: drive = 1.
grub-probe: info: the size of hostdisk//dev/sdb is 976773168.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/sdb.
grub-probe: info: scanning hostdisk//dev/sdb for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/sdb.
grub-probe: info: no LVM signature found.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/sdb.
grub-probe: info: Inserting hostdisk//dev/sdb (+2097152,39847936) into md/1 (mdraid1x)
.
grub-probe: info: drive = 1.
grub-probe: info: the size of hostdisk//dev/sdb is 976773168.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/sdb.
grub-probe: info: Inserting hostdisk//dev/sdb (+41945088,934828032) into md/2 (mdraid1x)
.
grub-probe: info: drive = 1.
grub-probe: info: the size of hostdisk//dev/sdb is 976773168.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/sdb.
grub-probe: info: Inserting hostdisk//dev/sdb (+2048,2095104) into md/md3 (mdraid09)
.
grub-probe: info: drive = 1.
grub-probe: info: the size of hostdisk//dev/sdb is 976773168.
grub-probe: info: Partition 0 starts from 2097152.
grub-probe: info: Partition 1 starts from 41945088.
grub-probe: info: Partition 2 starts from 2048.
grub-probe: info: /dev/md3 is not present.
grub-probe: info: changing current directory to /dev.
grub-probe: info: changing current directory to usb.
grub-probe: info: changing current directory to dri.
grub-probe: info: changing current directory to snd.
grub-probe: info: changing current directory to by-path.
grub-probe: info: changing current directory to vfio.
grub-probe: info: changing current directory to disk.
grub-probe: info: changing current directory to by-partlabel.
grub-probe: info: changing current directory to by-label.
grub-probe: info: changing current directory to by-uuid.
grub-probe: info: changing current directory to by-partuuid.
grub-probe: info: changing current directory to by-id.
grub-probe: info: changing current directory to /dev.
grub-probe: info: changing current directory to usb.
grub-probe: info: changing current directory to dri.
grub-probe: info: changing current directory to snd.
grub-probe: info: changing current directory to by-path.
grub-probe: info: changing current directory to vfio.
grub-probe: info: changing current directory to disk.
grub-probe: info: changing current directory to by-partlabel.
grub-probe: info: changing current directory to by-label.
grub-probe: info: changing current directory to by-uuid.
grub-probe: info: changing current directory to by-partuuid.
grub-probe: info: changing current directory to by-id.
grub-probe: info: /dev/sda3 is present.
grub-probe: info: Looking for /dev/sda3.
grub-probe: info: /dev/sda is a parent of /dev/sda3.
grub-probe: info: /dev/sda3 starts from 2048.
grub-probe: info: opening the device hostdisk//dev/sda.
grub-probe: info: drive = 0.
grub-probe: info: the size of hostdisk//dev/sda is 976773168.
grub-probe: info: drive = 0.
grub-probe: info: the size of hostdisk//dev/sda is 976773168.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/sda.
grub-probe: info: scanning hostdisk//dev/sda for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/sda.
grub-probe: info: no LVM signature found.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sda.
grub-probe: info: Partition 0 starts from 2097152.
grub-probe: info: Partition 1 starts from 41945088.
grub-probe: info: Partition 2 starts from 2048.
grub-probe: info: /dev/sdb3 is present.
grub-probe: info: Looking for /dev/sdb3.
grub-probe: info: /dev/sdb is a parent of /dev/sdb3.
grub-probe: info: /dev/sdb3 starts from 2048.
grub-probe: info: opening the device hostdisk//dev/sdb.
grub-probe: info: drive = 1.
grub-probe: info: the size of hostdisk//dev/sdb is 976773168.
grub-probe: info: drive = 1.
grub-probe: info: the size of hostdisk//dev/sdb is 976773168.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/sdb.
grub-probe: info: scanning hostdisk//dev/sdb for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/sdb.
grub-probe: info: no LVM signature found.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sdb.
grub-probe: info: Partition 0 starts from 2097152.
grub-probe: info: Partition 1 starts from 41945088.
grub-probe: info: Partition 2 starts from 2048.
grub-probe: info: /dev/md3 is not present.
grub-probe: info: opening md3.
grub-probe: info: Scanning for DISKFILTER devices on disk proc.
grub-probe: info: Scanning for mdraid1x devices on disk proc.
grub-probe: info: Scanning for mdraid09 devices on disk proc.
grub-probe: info: Scanning for mdraid09_be devices on disk proc.
grub-probe: info: Scanning for dmraid_nv devices on disk proc.
grub-probe: info: Scanning for ldm devices on disk proc.
grub-probe: info: scanning proc for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk proc.
grub-probe: info: drive = 0.
grub-probe: info: the size of hostdisk//dev/sda is 976773168.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/sda.
grub-probe: info: scanning hostdisk//dev/sda for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/sda.
grub-probe: info: no LVM signature found.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sda.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sda.
grub-probe: info: drive = 1.
grub-probe: info: the size of hostdisk//dev/sdb is 976773168.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for mdraid1x devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for mdraid09 devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for mdraid09_be devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for dmraid_nv devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for ldm devices on disk hostdisk//dev/sdb.
grub-probe: info: scanning hostdisk//dev/sdb for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk hostdisk//dev/sdb.
grub-probe: info: no LVM signature found.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for DISKFILTER devices on disk hostdisk//dev/sdb.
grub-probe: info: Scanning for DISKFILTER devices on disk md/md3.
grub-probe: info: Scanning for mdraid1x devices on disk md/md3.
grub-probe: info: Scanning for mdraid09 devices on disk md/md3.
grub-probe: info: Scanning for mdraid09_be devices on disk md/md3.
grub-probe: info: Scanning for dmraid_nv devices on disk md/md3.
grub-probe: info: Scanning for ldm devices on disk md/md3.
grub-probe: info: scanning md/md3 for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk md/md3.
grub-probe: info: no LVM signature found.
grub-probe: info: Scanning for DISKFILTER devices on disk md/2.
grub-probe: info: Scanning for mdraid1x devices on disk md/2.
grub-probe: info: Scanning for mdraid09 devices on disk md/2.
grub-probe: info: Scanning for mdraid09_be devices on disk md/2.
grub-probe: info: Scanning for dmraid_nv devices on disk md/2.
grub-probe: info: Scanning for ldm devices on disk md/2.
grub-probe: info: scanning md/2 for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk md/2.
grub-probe: info: no LVM signature found.
grub-probe: info: Scanning for DISKFILTER devices on disk md/1.
grub-probe: info: Scanning for mdraid1x devices on disk md/1.
grub-probe: info: Scanning for mdraid09 devices on disk md/1.
grub-probe: info: Scanning for mdraid09_be devices on disk md/1.
grub-probe: info: Scanning for dmraid_nv devices on disk md/1.
grub-probe: info: Scanning for ldm devices on disk md/1.
grub-probe: info: scanning md/1 for LDM.
grub-probe: info: no LDM signature found.
grub-probe: info: Scanning for lvm devices on disk md/1.
grub-probe: info: no LVM signature found.
grub-probe: info: drive = -1.
grub-probe: error: disk `md3' not found.
olive grub # 
I see " info: /dev/md3 is not present."

Code: Select all

olive grub # ls -l /dev/md?
brw-rw---- 1 root disk 9, 0 Jan 28 05:53 /dev/md0
brw-rw---- 1 root disk 9, 1 Jan 28 05:53 /dev/md1
brw-rw---- 1 root disk 9, 2 Jan 28 05:53 /dev/md2
brw-rw---- 1 root disk 9, 3 Jan 28 05:53 /dev/md3
olive grub # 
Unfortunately mdadm was not installed during the initial installation and installing it at present does not work. (Networking seems not to work in the chroot.)

Suggestions on how to install grub to a RAID drive are most welcome!

Again... I'd really prefer to migrate my existing install to the RAID but ran into similar issues with that.

Thanks,
hank
Last edited by LockBot on Wed Dec 28, 2022 7:16 am, edited 1 time in total.
Reason: Topic automatically closed 6 months after creation. New replies are no longer allowed.
Mute Ant

Re: install (or copy) to mdadm RAID

Post by Mute Ant »

"grub-install.real: error: disk `md3' not found." Says it all. The kernel and initramfs must be in a simple partition where GRUB can find them using the BIOS...not in a /dev/mdm device (which won't even exist until the kernel is loaded). That is...GRUB can't assemble software RAID, so /boot/ must be a simple /dev/sdXY partition that the BIOS can find.
User avatar
majpooper
Level 8
Level 8
Posts: 2087
Joined: Thu May 09, 2013 1:56 pm
Location: North Carolina, USA

Re: install (or copy) to mdadm RAID

Post by majpooper »

Look this over on this forum - it worked for me for RAID 0 - might be worth a try for RAID 1. I did a fresh install on an external USB HD and then copied it over to a RAID 0 array.

http://forums.linuxmint.com/viewtopic.p ... 0#p1098451
HankB

Re: install (or copy) to mdadm RAID

Post by HankB »

Thanks all for the replies. Apologies for the delay but this has not been a top priority.
Mute Ant wrote:"grub-install.real: error: disk `md3' not found." Says it all. The kernel and initramfs must be in a simple partition where GRUB can find them using the BIOS...not in a /dev/mdm device (which won't even exist until the kernel is loaded). That is...GRUB can't assemble software RAID, so /boot/ must be a simple /dev/sdXY partition that the BIOS can find.
I do not think that is strictly true, particularly with RAID1 where the layout of the file system is nearly identical with an ordinary partition. I did that for the first time about 5 years ago when I set up a NAS on a pair of RAID1 2TB drives.

The linked thread implies that it can be done with a RAID0 too, but I played it safe and created a separate /boot partition and used RAID1 for it.
majpooper wrote:Look this over on this forum - it worked for me for RAID 0 - might be worth a try for RAID 1. I did a fresh install on an external USB HD and then copied it over to a RAID 0 array.

http://forums.linuxmint.com/viewtopic.p ... 0#p1098451
Many thanks for the linked thread! That was the key to a fresh install. There also seemed to be come confusion between MD device names (/dev/md1 vs. /dev/md/1.) Lastly, there was a partitioning problem. Some sort of boot partition missing. I was able to add it. I'll add the grisly details to the other thread where there is already a lot of useful information.

Short story - I'm now running from a pair of RAID0 SSDs. :) (And yes, I do keep up with backups. They run automatically every night.)
Locked

Return to “Installation & Boot”