I have been trying all weekend to get RAID working on an old server computer with the Intel ICH7 / ICH7-R SATA-II controller running dual hard-drive with RAID 1.
After giving up in hardware raid, I have moved on to software.
Currently, the system will boot fine off both drives, and will boot fine off sdb, but when I try to boot sda, I get a blinking cursor on a black screen.
By this, I mean physically removing drives. I remove one drive, boot and it works. Replace that drive, and remove the other, boot and it does not work.
My guess is that I did not install GRUB properly on sda.
I remove the sdb hard drive, and boot the installation disk into recovery mode. I then mount RAID volume, and go into shell.
First, I will try what this tutorial that I followed for software RAID told me to do:
# grub
grub> device (hd0) /dev/sda
grub> root (hd0,0)
Filesytem type is ext2fs, partition type 0xfd
grub> setup (hd0)
Checking if "/boot/grub/stage1" exists ... no
Checking if "/grub/stage1" exists ... no
Error 2: Bad file or directory type
So I try something different:
When Typing:
grub-install /dev/sda
I get
Searching for the GRUB installation directory ... found: /boot/grub
The file /boot/grub/stage1 not read correctly.
I am using ext4 partitions.
What shall I try next?
Edit:
Here is the output of fdisk -l
root@debian:~# fdisk -l
Disk /dev/sda: 153.4 GiB, 164696555520 bytes, 321672960 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x8225e6c2
Device Boot Start End Sectors Size Id Type
/dev/sda1 * 2048 194559 192512 94M fd Linux raid autodetect
/dev/sda2 194560 4194303 3999744 1.9G fd Linux raid autodetect
/dev/sda3 4194304 321671167 317476864 151.4G fd Linux raid autodetect
Disk /dev/sdb: 153.4 GiB, 164696555520 bytes, 321672960 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x3cfa42ad
Device Boot Start End Sectors Size Id Type
/dev/sdb1 * 2048 194559 192512 94M fd Linux raid autodetect
/dev/sdb2 194560 4194303 3999744 1.9G fd Linux raid autodetect
/dev/sdb3 4194304 321671167 317476864 151.4G fd Linux raid autodetect
Disk /dev/md2: 151.3 GiB, 162413936640 bytes, 317214720 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/md0: 93.9 MiB, 98435072 bytes, 192256 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk /dev/md1: 1.9 GiB, 2046820352 bytes, 3997696 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Here is the output of mdadm --detail --scan
ARRAY /dev/md/2 metadata=1.2 name=repeater:2 UUID=cd8443a8:ca0b3a29:05496e49:b063704f
ARRAY /dev/md/0 metadata=1.2 name=repeater:0 UUID=c8a204e2:3e5a5e2c:50a136c7:d43777a7
ARRAY /dev/md/1 metadata=1.2 name=repeater:1 UUID=25bebb1e:c7f3245d:128bee5d:d58d9100
Here is the output of lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
fd0 2:0 1 4K 0 disk
sda 8:0 0 153.4G 0 disk
├─sda1 8:1 0 94M 0 part
├─sda2 8:2 0 1.9G 0 part
└─sda3 8:3 0 151.4G 0 part
└─md2 9:2 0 151.3G 0 raid1 /
sdb 8:16 0 153.4G 0 disk
├─sdb1 8:17 0 94M 0 part
│ └─md0 9:0 0 93.9M 0 raid1 /boot
├─sdb2 8:18 0 1.9G 0 part
│ └─md1 9:1 0 1.9G 0 raid1 [SWAP]
└─sdb3 8:19 0 151.4G 0 part
sr0 11:0 1 1024M 0 rom
EDIT 2: Here is the output of cat /proc/mdstat
root@debian:~# cat /proc/mdstat
Personalities : [raid1]
md1 : active (auto-read-only) raid1 sdb2[1]
1998848 blocks super 1.2 [2/1] [_U]
md0 : active raid1 sdb1[1]
96128 blocks super 1.2 [2/1] [_U]
md2 : active raid1 sda3[0]
158607360 blocks super 1.2 [2/1] [U_]
bitmap: 2/2 pages [8KB], 65536KB chunk
unused devices: <none>