Bug#962844: mdadm: Assembling RAID using IMSM in initrd fails due to lack of module efivarfs

2022-12-25 Thread Alban Browaeys
On Sun, 7 Feb 2021 20:32:08 -0800 Felix Lechner
 wrote:
> Hi Chris,
> 
> On Sun, Feb 7, 2021 at 9:22 AM Chris Hofstaedtler 
wrote:
> > 
> > friendly ping here, are you planning to fix this for bullseye?
> 
> Thanks for the reminder! I will probably include efivars in the next
> couple of days.
> 
> Kind regards
> Felix
> 

You probably want to include efivarfs (efivars is obsolete and removed
in linux kernel 6). Thus the current patch has no effect on bullseye-
backports, testing and up.

efivarfs is available since linux 3.10. So maybe including efivarfs
only is a better option (since with efivars being removed I get a
warning at boot from initramfs that it cannot load unavailable efivars
module.

Cheers,
Alban



Bug#962844: mdadm: Assembling RAID using IMSM in initrd fails due to lack of module efivarfs

2021-02-07 Thread Felix Lechner
Hi Chris,

On Sun, Feb 7, 2021 at 9:22 AM Chris Hofstaedtler  wrote:
>
> friendly ping here, are you planning to fix this for bullseye?

Thanks for the reminder! I will probably include efivars in the next
couple of days.

Kind regards
Felix



Bug#962844: mdadm: Assembling RAID using IMSM in initrd fails due to lack of module efivarfs

2021-02-07 Thread Chris Hofstaedtler
Hi Felix,

friendly ping here, are you planning to fix this for bullseye?

* Felix Lechner  [210207 17:20]:
> I would like to make sure any new module requirements are also
> compatible with systems booting in legacy BIOS mode.

While that's great, adding the module to the initramfs would at
least unbreak it for all UEFI installations (which should be more
common with such hardware).

Chris



Bug#962844: mdadm: Assembling RAID using IMSM in initrd fails due to lack of module efivarfs

2020-09-14 Thread Felix Lechner
Hi Colin,

> The efivarfs module was not found in the initrd

I would like to make sure any new module requirements are also
compatible with systems booting in legacy BIOS mode. The Wikipedia
article for Intel RST states:

> When booting in a BIOS environment (legacy) and some / EFI, the RST option
> ROM is used. When booting in a true UEFI environment the Option ROM is not
> used as a SataDriver with the RST version takes over. In BIOS mode the
> legacy/BIOS booting is under CSMCORE. In true UEFI mode the RST is
> controlled under SataDriver in BIOS. [1]

The article suggests that some people use IMSM arrays in legacy BIOS
mode. Does mdadm support IMSM only when the system is booted in UEFI
mode?

Sorry that I do not know the answer to that question. I just assumed
maintenance of mdadm and do not use IMSM. At this point, I am reading
code. Thank you!

Kind regards
Felix Lechner

[1] 
https://en.wikipedia.org/wiki/Intel_Rapid_Storage_Technology#Matrix_Storage_Manager_option_ROM



Bug#962844: mdadm: Assembling RAID using IMSM in initrd fails due to lack of module efivarfs

2020-06-14 Thread Colin Fowler
Package: mdadm
Version: 4.1-1
Severity: critical
Justification: breaks the whole system

Dear Maintainer,

I created a RAID 5 volume over 4 disks using the BIOS support for Intel
RST. Install proceeded correctly, however after a reboot in to the
installed system, the root device was not found. Investigation in the
init shell found that the mdamd device had not been assembled correctly

The following error was encountered when looking for imsm capabilies on
the controller. 

mdadm --detail-platform
mdadm: imsm capabilities not found for controller: 
/sys/devices/pci:00/:00:1f.2 (type SATA)

I found that this occurred when mdadm could not read from 
/sys/firmware/efi/efivars/ due to it not being mounted. The efivarfs module was 
not found in the initrd

To resolve this, I booted in to a rescue CD and added efivarfs and
efivars to /etc/initramfs.conf/modules and ran an update-initramfs

This allowed the system to boot correctly

I suggest that mdadm ensures that these modules are added to the initrd
when the RAID array is using IMSM.


-- Package-specific info:
--- mdadm.conf
ARRAY metadata=imsm UUID=56bed0cd:2b07c313:c4651474:3a6b990c
ARRAY /dev/md/Volume0 container=56bed0cd:2b07c313:c4651474:3a6b990c member=0 
UUID=d0f942e0:fb69f9d0:bca65978:774a6c88
MAILADDR root

--- /etc/default/mdadm
AUTOCHECK=true
START_DAEMON=true
DAEMON_OPTIONS="--syslog"
VERBOSE=false

--- /proc/mdstat:
Personalities : [raid6] [raid5] [raid4] [linear] [multipath] [raid0] [raid1] 
[raid10] 
md126 : active raid5 sda[3] sdb[2] sdc[1] sdd[0]
  5567516672 blocks super external:/md127/0 level 5, 64k chunk, algorithm 0 
[4/4] []
  
md127 : inactive sdb[3](S) sdd[2](S) sdc[1](S) sda[0](S)
  20804 blocks super external:imsm
   
unused devices: 

--- /proc/partitions:
major minor  #blocks  name

   8   48 1953514584 sdd
   8   32 1953514584 sdc
   8   16 1953514584 sdb
   80 1953514584 sda
   9  126 5567516672 md126
 2590 525391 md126p1
 2591 5533714844 md126p2
 2592   33276403 md126p3

--- LVM physical volumes:
LVM does not seem to be used.
--- mount output
sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
proc on /proc type proc (rw,nosuid,nodev,noexec,relatime)
udev on /dev type devtmpfs 
(rw,nosuid,relatime,size=16317648k,nr_inodes=4079412,mode=755)
devpts on /dev/pts type devpts 
(rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
tmpfs on /run type tmpfs (rw,nosuid,noexec,relatime,size=3266568k,mode=755)
/dev/md126p2 on / type ext4 (rw,relatime,errors=remount-ro,stripe=48)
securityfs on /sys/kernel/security type securityfs 
(rw,nosuid,nodev,noexec,relatime)
tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
tmpfs on /sys/fs/cgroup type tmpfs (ro,nosuid,nodev,noexec,mode=755)
cgroup2 on /sys/fs/cgroup/unified type cgroup2 
(rw,nosuid,nodev,noexec,relatime,nsdelegate)
cgroup on /sys/fs/cgroup/systemd type cgroup 
(rw,nosuid,nodev,noexec,relatime,xattr,name=systemd)
pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
efivarfs on /sys/firmware/efi/efivars type efivarfs 
(rw,nosuid,nodev,noexec,relatime)
bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
cgroup on /sys/fs/cgroup/net_cls,net_prio type cgroup 
(rw,nosuid,nodev,noexec,relatime,net_cls,net_prio)
cgroup on /sys/fs/cgroup/rdma type cgroup (rw,nosuid,nodev,noexec,relatime,rdma)
cgroup on /sys/fs/cgroup/cpuset type cgroup 
(rw,nosuid,nodev,noexec,relatime,cpuset)
cgroup on /sys/fs/cgroup/cpu,cpuacct type cgroup 
(rw,nosuid,nodev,noexec,relatime,cpu,cpuacct)
cgroup on /sys/fs/cgroup/freezer type cgroup 
(rw,nosuid,nodev,noexec,relatime,freezer)
cgroup on /sys/fs/cgroup/pids type cgroup (rw,nosuid,nodev,noexec,relatime,pids)
cgroup on /sys/fs/cgroup/memory type cgroup 
(rw,nosuid,nodev,noexec,relatime,memory)
cgroup on /sys/fs/cgroup/blkio type cgroup 
(rw,nosuid,nodev,noexec,relatime,blkio)
cgroup on /sys/fs/cgroup/devices type cgroup 
(rw,nosuid,nodev,noexec,relatime,devices)
cgroup on /sys/fs/cgroup/perf_event type cgroup 
(rw,nosuid,nodev,noexec,relatime,perf_event)
systemd-1 on /proc/sys/fs/binfmt_misc type autofs 
(rw,relatime,fd=27,pgrp=1,timeout=0,minproto=5,maxproto=5,direct,pipe_ino=12482)
debugfs on /sys/kernel/debug type debugfs (rw,relatime)
mqueue on /dev/mqueue type mqueue (rw,relatime)
hugetlbfs on /dev/hugepages type hugetlbfs (rw,relatime,pagesize=2M)
/dev/md126p1 on /boot/efi type vfat 
(rw,relatime,fmask=0077,dmask=0077,codepage=437,iocharset=ascii,shortname=mixed,utf8,errors=remount-ro)
tmpfs on /run/user/1000 type tmpfs 
(rw,nosuid,nodev,relatime,size=3266564k,mode=700,uid=1000,gid=1000)

--- initrd.img-4.19.0-9-amd64:
178049 blocks
192ccafcfe38eabf0f5184786764c4a9  ./scripts/local-bottom/mdadm
f3b648ca1c912da30940f0b821b7e9e6  ./scripts/local-block/mdadm
371839b6f84393a2c8d2988933b99f80  ./etc/mdadm/mdadm.conf
d3be82c0f275d6c25b04d388baf9e836