Hi All,
Here's one for the disk experts:
I've got a server that I built a few years ago from Ubuntu 16.04
The server has 4 physical disks in it. It has one of those "software RAID"
cards in it so when I built it, I only installed 4 drives and put the 2
pairs into mirrors using the raid BIOS on the card.
The idea was that since the BIOS allows booting from the first "raid" pair
I'd just keep it this way.
I always regard that sort of thing as an emergency Hail Mary so that if a
hard drive fails you have enough time left to take your time backing up the
server and building a new one.
Anyway, during the install Ubuntu recognized this "fakeraid mirror" and set
it up with mdadm, and set the first mirrored pair bootable. Here was the
output I got at the time:
root@websrv03:~# cat /proc/mdstat
Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4]
[raid10]
md124 : active (auto-read-only) raid1 sdc[1] sdd[0]
244195328 blocks super external:/md127/0 [2/2] [UU]
md125 : active raid1 sda[1] sdb[0]
312568832 blocks super external:/md126/0 [2/2] [UU]
[==============>......] resync = 71.8% (224615680/312568832)
finish=25.1min speed=58291K/sec
md126 : inactive sdb[1](S) sda[0](S)
4784 blocks super external:imsm
md127 : inactive sdc[1](S) sdd[0](S)
6306 blocks super external:imsm
root@websrv03:~# mdadm --misc --detail -s
ARRAY /dev/md/imsm0 metadata=imsm UUID=dc62d339:4a0008fb:b956ff39:717f8cff
ARRAY /dev/md/imsm1 metadata=imsm UUID=500c57be:176b8eb9:7ffef6cd:e7b36496
ARRAY /dev/md/Volume0 container=/dev/md/imsm1 member=0
UUID=599ec753:9ca24317:5c764774:ca201652
ARRAY /dev/md/Volume1 container=/dev/md/imsm0 member=0
UUID=f24b3ea7:9f0667dc:9f423e37:63a16043
Anyway for a number of years all was well. But then last night I ran
apt-get update, apt-get upgrade and I noticed the following message:
update-initramfs: Generating /boot/initrd.img-4.4.0-210-generic
W: mdadm: the array /dev/md/imsm1 with UUID
396b0e3e:127927a6:eb0755df:b541c26f
W: mdadm: is currently active, but it is not listed in mdadm.conf. if
W: mdadm: it is needed for boot, then YOUR SYSTEM IS NOW UNBOOTABLE!
W: mdadm: please inspect the output of /usr/share/mdadm/mkconf, compare
W: mdadm: it to /etc/mdadm/mdadm.conf, and make the necessary changes.
W: mdadm: the array /dev/md/Volume0_0 with UUID
0897f79a:e4d45ded:924e832c:f42a1dbd
W: mdadm: is currently active, but it is not listed in mdadm.conf. if
W: mdadm: it is needed for boot, then YOUR SYSTEM IS NOW UNBOOTABLE!
W: mdadm: please inspect the output of /usr/share/mdadm/mkconf, compare
W: mdadm: it to /etc/mdadm/mdadm.conf, and make the necessary changes.
Setting up base-files (9.4ubuntu4.14) ...
I'm now wondering what happened, why upgrade did this and what to do about
it.
Here's the existing mdadm.conf, it is showing all the prior UUID's from
years earlier:
root@websrv03:~# cat /etc/mdadm/mdadm.conf
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#
# by default (built-in), scan all partitions (/proc/partitions) and all
# containers for MD superblocks. alternatively, specify devices to scan,
using
# wildcards if desired.
#DEVICE partitions containers
# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes
# automatically tag new arrays as belonging to the local system
HOMEHOST <system>
# instruct the monitoring daemon where to send mail alerts
MAILADDR root
# definitions of existing MD arrays
ARRAY metadata=imsm UUID=500c57be:176b8eb9:7ffef6cd:e7b36496
ARRAY /dev/md/Volume0 container=500c57be:176b8eb9:7ffef6cd:e7b36496 member=0
UUID=599ec753:9ca24317:5c764774:ca201652
ARRAY metadata=imsm UUID=dc62d339:4a0008fb:b956ff39:717f8cff
ARRAY /dev/md/Volume1 container=dc62d339:4a0008fb:b956ff39:717f8cff member=0
UUID=f24b3ea7:9f0667dc:9f423e37:63a16043
# This file was auto-generated on Fri, 30 Aug 2019 02:03:37 -0700
# by mkconf $Id$
root@websrv03:~#
But now, today, if I run mkconf, or I run mdadm --misc --detail -s or I DO
NOT get the same output. Instead THIS is what I get:
root@websrv03:~# mdadm --misc --detail -s
ARRAY /dev/md/imsm0 metadata=imsm UUID=dc62d339:4a0008fb:b956ff39:717f8cff
ARRAY /dev/md/imsm1 metadata=imsm UUID=396b0e3e:127927a6:eb0755df:b541c26f
ARRAY /dev/md/Volume0_0 container=/dev/md/imsm1 member=0
UUID=0897f79a:e4d45ded:924e832c:f42a1dbd
ARRAY /dev/md/Volume1 container=/dev/md/imsm0 member=0
UUID=f24b3ea7:9f0667dc:9f423e37:63a16043
root@websrv03:~#
As you see, 2 of these UUIDs are NOT like the ones from 4 years ago.
root@websrv03:~# /usr/share/mdadm/mkconf
# mdadm.conf
#
# Please refer to mdadm.conf(5) for information about this file.
#
# by default (built-in), scan all partitions (/proc/partitions) and all
# containers for MD superblocks. alternatively, specify devices to scan,
using
# wildcards if desired.
#DEVICE partitions containers
# auto-create devices with Debian standard permissions
CREATE owner=root group=disk mode=0660 auto=yes
# automatically tag new arrays as belonging to the local system
HOMEHOST <system>
# instruct the monitoring daemon where to send mail alerts
MAILADDR root
# definitions of existing MD arrays
ARRAY metadata=imsm UUID=396b0e3e:127927a6:eb0755df:b541c26f
ARRAY /dev/md/Volume0 container=396b0e3e:127927a6:eb0755df:b541c26f member=0
UUID=0897f79a:e4d45ded:924e832c:f42a1dbd
ARRAY metadata=imsm UUID=dc62d339:4a0008fb:b956ff39:717f8cff
ARRAY /dev/md/Volume1 container=dc62d339:4a0008fb:b956ff39:717f8cff member=0
UUID=f24b3ea7:9f0667dc:9f423e37:63a16043
root@websrv03:~#
So I am now wondering why apt-update did this - or possibly something else
did this years ago and I just noticed it?
The advice I found off Google basically says to overwrite your
/etc/mdadm/mdadm.conf with the output of /usr/share/mdadm/mkconf
Here:
https://askubuntu.com/questions/457237/mdadm-warning-system-unbootable-from-
update-initramfs-mkconfs-suggested-fix
But I'd really like to know if this is correct.
The output of df is:
root@websrv03:~# df
Filesystem 1K-blocks Used Available Use% Mounted on
udev 4065128 0 4065128 0% /dev
tmpfs 817436 82788 734648 11% /run
/dev/md125p1 306543056 11301980 279646464 4% /
tmpfs 4087164 4 4087160 1% /dev/shm
tmpfs 5120 0 5120 0% /run/lock
tmpfs 4087164 0 4087164 0% /sys/fs/cgroup
tmpfs 817436 0 817436 0% /run/user/1000
Any suggestions? (other than just wiping everything and starting over with
current Ubuntu which granted is what I really ought to do)
Ted