mdadm raid - dracut: root fs not found

Issues related to applications and software problems
Post Reply
pma61
Posts: 9
Joined: 2014/02/16 11:32:22

mdadm raid - dracut: root fs not found

Post by pma61 » 2015/11/06 13:33:19

Hi. I've created some raid partitions on existing system and is working correctly but when it reboots dracut doesn't find root partition. When dracut shell prompt out I start RAID partitions with:

Code: Select all

# mdadm --assemble --scan
# exit
Then the system goes up normally. It seams that dracut doesn't execute this command automatically, but configurations seams also ok:

Disks layout:

Code: Select all

# gdisk -l /dev/sda
GPT fdisk (gdisk) version 0.8.6

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sda: 3907029168 sectors, 1.8 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): FED9C151-D0B8-4991-9B39-E44D00ACF21F
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3907029134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          411647   200.0 MiB   EF00  EFI System
   2          411648         1435647   500.0 MiB   FD00  Linux RAID
   3         1435648        97904639   46.0 GiB    FD00  Linux RAID
   4       106293248      3907029134   1.8 TiB     FD00  Linux RAID
   5        97904640       106293247   4.0 GiB     FD00  Linux RAID


# gdisk -l /dev/sdb
GPT fdisk (gdisk) version 0.8.6

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sdb: 3907029168 sectors, 1.8 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): F55046E3-2CBF-45B2-BDAC-0DCB909D3B4D
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3907029134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          411647   200.0 MiB   EF00  EFI System
   2          411648         1435647   500.0 MiB   FD00  Linux RAID
   3         1435648        97904639   46.0 GiB    FD00  Linux RAID
   4       106293248      3907029134   1.8 TiB     FD00  Linux RAID
   5        97904640       106293247   4.0 GiB     FD00  Linux RAID


# gdisk -l /dev/sdc
GPT fdisk (gdisk) version 0.8.6

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sdc: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): A1AC79E1-A1BC-400A-93A7-B849E5C84ED0
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 3919 sectors (1.9 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          411647   200.0 MiB   EF00  EFI System
   2          411648         1435647   500.0 MiB   FD00  Linux RAID
   3         1435648        97904639   46.0 GiB    FD00  Linux RAID
   4       106293248      3907029134   1.8 TiB     FD00  Linux RAID
   5        97904640       106293247   4.0 GiB     FD00  Linux RAID
   6      3907031040      5860533134   931.5 GiB   8300  Linux filesystem


# gdisk -l /dev/sdd
GPT fdisk (gdisk) version 0.8.6

Partition table scan:
  MBR: protective
  BSD: not present
  APM: not present
  GPT: present

Found valid GPT with protective MBR; using GPT.
Disk /dev/sdd: 3907029168 sectors, 1.8 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): C5CE1729-5207-4E4C-B263-594074D7B253
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 3907029134
Partitions will be aligned on 2048-sector boundaries
Total free space is 2014 sectors (1007.0 KiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1            2048          411647   200.0 MiB   EF00  EFI System
   2          411648         1435647   500.0 MiB   FD00  Linux RAID
   3         1435648        97904639   46.0 GiB    FD00  Linux RAID
   4       106293248      3907029134   1.8 TiB     FD00  Linux RAID
   5        97904640       106293247   4.0 GiB     FD00  Linux RAID
Disks and partitions:

Code: Select all

$ lsblk
NAME                         MAJ:MIN RM   SIZE RO TYPE  MOUNTPOINT
sda                            8:0    0   1,8T  0 disk  
├─sda1                         8:1    0   200M  0 part  
├─sda2                         8:2    0   500M  0 part  
│ └─md127                      9:127  0 499,7M  0 raid1 /boot
├─sda3                         8:3    0    46G  0 part  
│ └─md125                      9:125  0    46G  0 raid1 /
├─sda4                         8:4    0   1,8T  0 part  
│ └─md126                      9:126  0   5,3T  0 raid5 /media/data
└─sda5                         8:5    0     4G  0 part  
  └─md124                      9:124  0     4G  0 raid1 [SWAP]
sdb                            8:16   0   1,8T  0 disk  
├─sdb1                         8:17   0   200M  0 part  
├─sdb2                         8:18   0   500M  0 part  
│ └─md127                      9:127  0 499,7M  0 raid1 /boot
├─sdb3                         8:19   0    46G  0 part  
│ └─md125                      9:125  0    46G  0 raid1 /
├─sdb4                         8:20   0   1,8T  0 part  
│ └─md126                      9:126  0   5,3T  0 raid5 /media/data
└─sdb5                         8:21   0     4G  0 part  
  └─md124                      9:124  0     4G  0 raid1 [SWAP]
sdc                            8:32   0   2,7T  0 disk  
├─sdc1                         8:33   0   200M  0 part  /boot/efi
├─sdc2                         8:34   0   500M  0 part  
│ └─md127                      9:127  0 499,7M  0 raid1 /boot
├─sdc3                         8:35   0    46G  0 part  
│ └─md125                      9:125  0    46G  0 raid1 /
├─sdc4                         8:36   0   1,8T  0 part  
│ └─md126                      9:126  0   5,3T  0 raid5 /media/data
├─sdc5                         8:37   0     4G  0 part  
│ └─md124                      9:124  0     4G  0 raid1 [SWAP]
└─sdc6                         8:38   0 931,5G  0 part  /media/unraid
sdd                            8:48   0   1,8T  0 disk  
├─sdd1                         8:49   0   200M  0 part  
├─sdd2                         8:50   0   500M  0 part  
│ └─md127                      9:127  0 499,7M  0 raid1 /boot
├─sdd3                         8:51   0    46G  0 part  
│ └─md125                      9:125  0    46G  0 raid1 /
├─sdd4                         8:52   0   1,8T  0 part  
│ └─md126                      9:126  0   5,3T  0 raid5 /media/data
└─sdd5                         8:53   0     4G  0 part  
  └─md124                      9:124  0     4G  0 raid1 [SWAP]
Partitions UUID and FS UUID:

Code: Select all

$ blkid
/dev/sdb4: UUID="e2f3520c-1b13-c26f-4759-17457960c0c3" UUID_SUB="3914b986-525a-b0a1-d722-34fb886541fd" LABEL="mainframe:data" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="5ea8dc77-f78a-4856-977f-929a3df73b96" 
/dev/sda4: UUID="e2f3520c-1b13-c26f-4759-17457960c0c3" UUID_SUB="100f11c4-22de-e226-f479-9730492d8368" LABEL="mainframe:data" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="36daebbe-2bbc-4fcd-9c3c-5c79a72fa9b4" 
/dev/sdd4: UUID="e2f3520c-1b13-c26f-4759-17457960c0c3" UUID_SUB="564118a2-166b-4c7b-37d5-4124e59fc403" LABEL="mainframe:data" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="805409b0-0c9c-46c8-8e53-3689687d3be9" 
/dev/sdc4: UUID="e2f3520c-1b13-c26f-4759-17457960c0c3" UUID_SUB="a1e5976d-2927-eacb-930b-834278ce3326" LABEL="mainframe:data" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="3da1c745-f866-4311-af93-1f5432d7b442" 
/dev/sdc6: UUID="c0035d3c-6a15-402c-b23b-e8ce797fb0e7" UUID_SUB="b5d9a10a-91b6-4772-ba10-945a414a28e9" TYPE="btrfs" PARTLABEL="Linux filesystem" PARTUUID="d550e7fa-0770-419e-85a3-cee23363e564" 
/dev/md126: UUID="a5bb80e3-d88b-4efd-8efd-2eadfcec9fba" TYPE="xfs" 
/dev/block/9:125: UUID="beebdb01-13ea-4796-bc2e-313120e601b3" TYPE="xfs" 
/dev/block/8:51: UUID="51de6e5d-1453-7a45-f0e3-1ee324918ef6" UUID_SUB="1f5c0b18-2eb0-a09e-b422-f48724b5115f" LABEL="mainframe:root" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="5dd55e74-059d-461c-ae68-3a8e600573a5" 
/dev/block/9:127: UUID="61cf5085-4d45-4100-b091-cb582dd7b7f5" TYPE="xfs" 
/dev/block/8:50: UUID="45bea0d7-2232-7a62-001d-2a8a8a9e23eb" UUID_SUB="4fcc70da-6207-94bc-77ac-59952753add7" LABEL="mainframe:boot" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="9dfc5e8b-7d06-4ee2-8917-fd56d53ad9d8" 
/dev/block/8:33: SEC_TYPE="msdos" UUID="A1F9-6C98" TYPE="vfat" PARTLABEL="EFI System" PARTUUID="1094585e-517a-4726-bc36-be0b82fe8a5d" 
/dev/block/9:124: UUID="baa255eb-6da7-40da-9073-2d24a0e6d282" TYPE="swap" 
/dev/block/8:53: UUID="d8d01484-fdc4-7b3f-f27d-5eaff8c8088f" UUID_SUB="0b102c1a-604f-94f3-bf29-c954bc01c398" LABEL="mainframe:swap" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="b859e96f-850a-4da5-9b19-bf5975f6298d" 
Kernel Arguments:

Code: Select all

$ cat /proc/cmdline
BOOT_IMAGE=/vmlinuz-3.10.0-229.14.1.el7.x86_64 root=UUID=beebdb01-13ea-4796-bc2e-313120e601b3 ro nomodeset crashkernel=auto vconsole.font=latarcyrheb-sun16 vconsole.keymap=it rhgb quiet bootdegraded=true rootdelay=5
There you can see that I added "rootdelay=5" giving time to the system to bring up all disks and partitions.

Partitions auto mount:

Code: Select all

$ cat /etc/fstab 
#
# /etc/fstab
# Created by anaconda on Sat Jul 19 19:42:30 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
# /dev/md/root
UUID=beebdb01-13ea-4796-bc2e-313120e601b3       /                       xfs     defaults                        1 1

# /dev/md/boot
UUID=61cf5085-4d45-4100-b091-cb582dd7b7f5       /boot                   xfs     defaults                        1 2

# 1st disk efi (original)
UUID=A1F9-6C98                                  /boot/efi               vfat    umask=0077,shortname=winnt      0 0

# /dev/md/swap
UUID=baa255eb-6da7-40da-9073-2d24a0e6d282       swap                    swap    defaults                        0 0

# /dev/md/data
UUID=a5bb80e3-d88b-4efd-8efd-2eadfcec9fba	/media/data		xfs	defaults,sunit=128,swidth=384	0 0

# unraid
UUID=c0035d3c-6a15-402c-b23b-e8ce797fb0e7	/media/unraid		btrfs	defaults			0 0
mdadm config file:

Code: Select all

$ cat /etc/mdadm.conf
ARRAY /dev/md/boot metadata=1.2 name=mainframe:boot UUID=45bea0d7:22327a62:001d2a8a:8a9e23eb
ARRAY /dev/md/data metadata=1.2 name=mainframe:data UUID=e2f3520c:1b13c26f:47591745:7960c0c3
ARRAY /dev/md/root metadata=1.2 name=mainframe:root UUID=51de6e5d:14537a45:f0e31ee3:24918ef6
ARRAY /dev/md/swap metadata=1.2 name=mainframe:swap UUID=d8d01484:fdc47b3f:f27d5eaf:f8c8088f
MAILFROM mdadm
MAILADDR xxxxxxxxxx@yyyyyyyy.zzz
dracut config file:

Code: Select all

$ cat /etc/dracut.conf
# PUT YOUR CONFIG HERE OR IN separate files named *.conf
# in /etc/dracut.conf.d
# SEE man dracut.conf(5)

# Sample dracut config file

#logfile=/var/log/dracut.log
#fileloglvl=6

# Exact list of dracut modules to use.  Modules not listed here are not going
# to be included.  If you only want to add some optional modules use
# add_dracutmodules option instead.
#dracutmodules+=""

# dracut modules to omit
#omit_dracutmodules+=""

# dracut modules to add to the default
#add_dracutmodules+=""

# additional kernel modules to the default
#add_drivers+=""

# list of kernel filesystem modules to be included in the generic initramfs
#filesystems+=""

# build initrd only to boot current hardware
#hostonly="yes"
#

# install local /etc/mdadm.conf
mdadmconf="yes"

# install local /etc/lvm/lvm.conf
#lvmconf="no"

# A list of fsck tools to install. If it's not specified, module's hardcoded
# default is used, currently: "umount mount /sbin/fsck* xfs_db xfs_check
# xfs_repair e2fsck jfs_fsck reiserfsck btrfsck". The installation is
# opportunistic, so non-existing tools are just ignored.
#fscks=""

# inhibit installation of any fsck tools
#nofscks="yes"

# mount / and /usr read-only by default
#ro_mnt="no"

# set the directory for temporary files
# default: /var/tmp
#tmpdir=/tmp
grub config file:

Code: Select all

$ cat /etc/default/grub 
GRUB_TIMEOUT=3
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="nomodeset crashkernel=auto vconsole.font=latarcyrheb-sun16 vconsole.keymap=it rhgb quiet bootdegraded=true rootdelay=5"
GRUB_DISABLE_RECOVERY="true"
GRUB_PRELOAD_MODULES="diskfilter mdraid1x"
raid status:

Code: Select all

$ cat /proc/mdstat 
Personalities : [raid1] [raid6] [raid5] [raid4] 
md124 : active raid1 sdc5[4] sda5[3] sdb5[2] sdd5[1]
      4190208 blocks super 1.2 [4/4] [UUUU]
      
md125 : active raid1 sdc3[4] sda3[3] sdb3[2] sdd3[1]
      48201728 blocks super 1.2 [4/4] [UUUU]
      
md126 : active raid5 sdd4[0] sdc4[4] sda4[3] sdb4[1]
      5700710592 blocks super 1.2 level 5, 64k chunk, algorithm 2 [4/4] [UUUU]
      bitmap: 4/15 pages [16KB], 65536KB chunk

md127 : active raid1 sdc2[4] sda2[3] sdb2[2] sdd2[1]
      511680 blocks super 1.2 [4/4] [UUUU]
      
unused devices: <none>
content of current initrd:

Code: Select all

# lsinitrd | grep mdadm.conf
-rw-r--r--   1 root     root          451 Oct 13 10:07 etc/mdadm.conf
Logs:

dmesg:

Code: Select all

$ dmesg | grep dracut
[    2.001959] systemd[1]: Started dracut ask for additional cmdline parameters.
[    2.002520] systemd[1]: Starting dracut cmdline hook...


$ dmesg
...
[    1.907786] systemd[1]: systemd 208 running in system mode. (+PAM +LIBWRAP +AUDIT +SELINUX +IMA +SYSVINIT +LIBCRYPTSETUP +GCRYPT +ACL +XZ)
[    1.908414] systemd[1]: Running in initial RAM disk.
[    1.908611] systemd[1]: Set hostname to <mainframe>.
[    1.999963] systemd[1]: Expecting device dev-disk-by\x2duuid-beebdb01\x2d13ea\x2d4796\x2dbc2e\x2d313120e601b3.device...
...
[    2.752949] sata_sil 0000:02:00.0: version 2.4
...
[    2.792497] scsi host0: sata_sil
[    2.793829] scsi host1: sata_sil
[    2.793975] ata1: SATA max UDMA/100 mmio m512@0xdfd80000 tf 0xdfd80080 irq 21
[    2.793985] ata2: SATA max UDMA/100 mmio m512@0xdfd80000 tf 0xdfd800c0 irq 21
...
[    3.098978] ata1: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[    3.102459] ata1.00: ATA-9: WDC WD20EFRX-68EUZN0, 82.00A82, max UDMA/133
[    3.102463] ata1.00: 3907029168 sectors, multi 16: LBA48 NCQ (depth 0/32)
[    3.105445] ata1.00: configured for UDMA/100
[    3.105701] scsi 0:0:0:0: Direct-Access     ATA      WDC WD20EFRX-68E 82.0 PQ: 0 ANSI: 5
...
[    3.185168] ahci 0000:00:1f.2: version 3.0
[    3.185515] ahci 0000:00:1f.2: irq 43 for MSI/MSI-X
[    3.185597] ahci: SSS flag set, parallel bus scan disabled
[    3.185662] ahci 0000:00:1f.2: AHCI 0001.0100 32 slots 4 ports 3 Gbps 0x3 impl SATA mode
[    3.185672] ahci 0000:00:1f.2: flags: 64bit ncq stag pm led clo pio slum part 
[    3.187186] scsi host2: ahci
[    3.187577] scsi host3: ahci
[    3.187927] scsi host4: ahci
[    3.188410] scsi host5: ahci
[    3.188589] ata3: SATA max UDMA/133 abar m1024@0xdff04000 port 0xdff04100 irq 43
[    3.188600] ata4: SATA max UDMA/133 abar m1024@0xdff04000 port 0xdff04180 irq 43
[    3.188605] ata5: DUMMY
[    3.188610] ata6: DUMMY
...
[    3.411234] ata2: SATA link up 1.5 Gbps (SStatus 113 SControl 310)
[    3.414706] ata2.00: ATA-9: WDC WD20EFRX-68EUZN0, 82.00A82, max UDMA/133
[    3.414713] ata2.00: 3907029168 sectors, multi 16: LBA48 NCQ (depth 0/32)
[    3.417715] ata2.00: configured for UDMA/100
[    3.417944] scsi 1:0:0:0: Direct-Access     ATA      WDC WD20EFRX-68E 82.0 PQ: 0 ANSI: 5
[    3.493275] ata3: SATA link up 3.0 Gbps (SStatus 123 SControl 300)
[    3.493850] ata3.00: ATA-9: WDC WD30EFRX-68EUZN0, 80.00A80, max UDMA/133
[    3.493857] ata3.00: 5860533168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    3.494457] ata3.00: configured for UDMA/133
[    3.494696] scsi 2:0:0:0: Direct-Access     ATA      WDC WD30EFRX-68E 80.0 PQ: 0 ANSI: 5
[    3.799525] ata4: SATA link up 1.5 Gbps (SStatus 113 SControl 300)
[    3.805122] ata4.00: ATA-8: WDC WD20EADS-42R6B0, 02.00A02, max UDMA/133
[    3.805129] ata4.00: 3907029168 sectors, multi 16: LBA48 NCQ (depth 31/32), AA
[    3.810116] ata4.00: configured for UDMA/133
[    3.810343] scsi 3:0:0:0: Direct-Access     ATA      WDC WD20EADS-42R 02.0 PQ: 0 ANSI: 5
[    3.842013] sd 1:0:0:0: [sdb] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
[    3.842017] sd 0:0:0:0: [sda] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
[    3.842023] sd 0:0:0:0: [sda] 4096-byte physical blocks
[    3.842034] sd 1:0:0:0: [sdb] 4096-byte physical blocks
[    3.842220] sd 1:0:0:0: [sdb] Write Protect is off
[    3.842222] sd 0:0:0:0: [sda] Write Protect is off
[    3.842229] sd 0:0:0:0: [sda] Mode Sense: 00 3a 00 00
[    3.842239] sd 1:0:0:0: [sdb] Mode Sense: 00 3a 00 00
[    3.842313] sd 0:0:0:0: [sda] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.842323] sd 1:0:0:0: [sdb] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.843799] sd 2:0:0:0: [sdc] 5860533168 512-byte logical blocks: (3.00 TB/2.72 TiB)
[    3.843810] sd 2:0:0:0: [sdc] 4096-byte physical blocks
[    3.844081] sd 2:0:0:0: [sdc] Write Protect is off
[    3.844092] sd 2:0:0:0: [sdc] Mode Sense: 00 3a 00 00
[    3.844191] sd 2:0:0:0: [sdc] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.844251] sd 3:0:0:0: [sdd] 3907029168 512-byte logical blocks: (2.00 TB/1.81 TiB)
[    3.844481] sd 3:0:0:0: [sdd] Write Protect is off
[    3.844492] sd 3:0:0:0: [sdd] Mode Sense: 00 3a 00 00
[    3.844603] sd 3:0:0:0: [sdd] Write cache: enabled, read cache: enabled, doesn't support DPO or FUA
[    3.886764]  sdb: sdb1 sdb2 sdb3 sdb4 sdb5
[    3.887874] sd 1:0:0:0: [sdb] Attached SCSI disk
[    3.893486]  sda: sda1 sda2 sda3 sda4 sda5
[    3.894655] sd 0:0:0:0: [sda] Attached SCSI disk
[    3.896163]  sdc: sdc1 sdc2 sdc3 sdc4 sdc5 sdc6
[    3.897326] sd 2:0:0:0: [sdc] Attached SCSI disk
[    3.906089]  sdd: sdd1 sdd2 sdd3 sdd4 sdd5
[    3.907333] sd 3:0:0:0: [sdd] Attached SCSI disk
...
(Then dracut recovery shell prompted out and I executed the commands above...)
[  314.567531] md: md127 stopped.
[  314.570450] md: bind<sdd2>
[  314.571156] md: bind<sdb2>
[  314.571613] md: bind<sda2>
[  314.572297] md: bind<sdc2>
[  314.583477] md: raid1 personality registered for level 1
[  314.584217] md/raid1:md127: active with 4 out of 4 mirrors
[  314.584265] md127: detected capacity change from 0 to 523960320
[  314.601365]  md127: unknown partition table
[  314.870735] md: md126 stopped.
[  314.876004] md: bind<sdb4>
[  314.876511] md: bind<sda4>
[  314.876865] md: bind<sdc4>
[  314.877238] md: bind<sdd4>
[  314.907315] raid6: sse2x1     156 MB/s
[  314.924418] raid6: sse2x2     316 MB/s
[  314.941289] raid6: sse2x4     515 MB/s
[  314.941295] raid6: using algorithm sse2x4 (515 MB/s)
[  314.941300] raid6: using ssse3x2 recovery algorithm
[  314.945014] async_tx: api initialized (async)
[  314.949091] xor: measuring software checksum speed
[  314.958265]    prefetch64-sse:  6220.000 MB/sec
[  314.968269]    generic_sse:  5652.000 MB/sec
[  314.968274] xor: using function: prefetch64-sse (6220.000 MB/sec)
[  314.991664] md: raid6 personality registered for level 6
[  314.991673] md: raid5 personality registered for level 5
[  314.991679] md: raid4 personality registered for level 4
[  314.992526] md/raid:md126: device sdd4 operational as raid disk 0
[  314.992537] md/raid:md126: device sdc4 operational as raid disk 3
[  314.992542] md/raid:md126: device sda4 operational as raid disk 2
[  314.992546] md/raid:md126: device sdb4 operational as raid disk 1
[  314.993582] md/raid:md126: allocated 0kB
[  314.993716] md/raid:md126: raid level 5 active with 4 out of 4 devices, algorithm 2
[  314.993721] RAID conf printout:
[  314.993725]  --- level:5 rd:4 wd:4
[  314.993729]  disk 0, o:1, dev:sdd4
[  314.993734]  disk 1, o:1, dev:sdb4
[  314.993737]  disk 2, o:1, dev:sda4
[  314.993742]  disk 3, o:1, dev:sdc4
[  314.993980] created bitmap (15 pages) for device md126
[  314.994742] md126: bitmap initialized from disk: read 1 pages, set 0 of 28996 bits
[  315.054448] md126: detected capacity change from 0 to 5837527646208
[  315.060410]  md126: unknown partition table
[  315.350885] md: md125 stopped.
[  315.354106] md: bind<sdd3>
[  315.354779] md: bind<sdb3>
[  315.355314] md: bind<sda3>
[  315.356042] md: bind<sdc3>
[  315.360241] md/raid1:md125: active with 4 out of 4 mirrors
[  315.360298] md125: detected capacity change from 0 to 49358569472
[  315.377091]  md125: unknown partition table
[  315.522342] md: md124 stopped.
[  315.529096] md: bind<sdd5>
[  315.529417] md: bind<sdb5>
[  315.529777] md: bind<sda5>
[  315.530005] md: bind<sdc5>
[  315.539837] md/raid1:md124: active with 4 out of 4 mirrors
[  315.539918] md124: detected capacity change from 0 to 4290772992
[  315.545874]  md124: unknown partition table
[  328.291162] SGI XFS with ACLs, security attributes, large block/inode numbers, no debug enabled
[  328.294837] XFS (md125): Mounting V4 Filesystem
[  328.879547] XFS (md125): Starting recovery (logdev: internal)
[  329.819546] XFS (md125): Ending recovery (logdev: internal)
[  330.294858] systemd-journald[105]: Received SIGTERM
[  330.981029] type=1404 audit(1445711160.928:2): enforcing=1 old_enforcing=0 auid=4294967295 ses=4294967295
...
[  335.060012] device-mapper: uevent: version 1.0.3
[  335.060247] device-mapper: ioctl: 4.29.0-ioctl (2014-10-28) initialised: dm-devel@redhat.com
[  335.283753] Btrfs loaded
[  335.430132] BTRFS: device fsid c0035d3c-6a15-402c-b23b-e8ce797fb0e7 devid 1 transid 16513 /dev/sdc6
[  335.442268] Adding 4190204k swap on /dev/md124.  Priority:-1 extents:1 across:4190204k FS
[  335.484592] BTRFS info (device sdc6): disk space caching is enabled
[  337.086531] XFS (md126): Mounting V4 Filesystem
[  338.016247] SELinux: initialized (dev sdc6, type btrfs), uses xattr
[  338.146016] XFS (md127): Mounting V4 Filesystem
[  338.890021] XFS (md127): Starting recovery (logdev: internal)
[  339.112870] XFS (md126): Starting recovery (logdev: internal)
[  339.795110] XFS (md127): Ending recovery (logdev: internal)
[  339.795137] SELinux: initialized (dev md127, type xfs), uses xattr
[  339.849302] FAT-fs (sdc1): Volume was not properly unmounted. Some data may be corrupt. Please run fsck.
[  339.849328] SELinux: initialized (dev sdc1, type vfat), uses genfs_contexts
[  341.727143] XFS (md126): Ending recovery (logdev: internal)
[  341.727172] SELinux: initialized (dev md126, type xfs), uses xattr
...
Here you can see that system loads "sata_sil". That's because the motherboard has 2 sata ports and I added a PCI card that expose 2 other sata ports, and the module "sata_sil" adds support to this PCI card (I know that this hardware configuration isn't optimal).

Can someone help me please?

User avatar
TrevorH
Forum Moderator
Posts: 29914
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: mdadm raid - dracut: root fs not found

Post by TrevorH » 2015/11/06 14:58:55

My kernel command line on a system that boots from an mdadm array looks like this:

Code: Select all

BOOT_IMAGE=/vmlinuz-3.10.0-229.14.1.el7.x86_64 root=/dev/mapper/centos-root ro rd.lvm.lv=centos/swap rd.md.uuid=5f51925d:e39179cc:ee1693a2:437631ea rd.lvm.lv=centos/boot crashkernel=0@0 vconsole.keymap=uk vconsole.font=latarcyrheb-sun16 rd.lvm.lv=centos/root LANG=en_GB.UTF-8
That rd.md.uuid= line needs to be there so that dracut will activate the array.
CentOS 6 will die in November 2020 - migrate sooner rather than later!
Info for USB installs on http://wiki.centos.org/HowTos/InstallFromUSBkey
CentOS 5 is dead, do not use it.
Full time Geek, part time moderator. Use the FAQ Luke

pma61
Posts: 9
Joined: 2014/02/16 11:32:22

Re: mdadm raid - dracut: root fs not found

Post by pma61 » 2015/11/06 19:29:52

No luck adding rd.md.uuid= entries.

Kernel arguments:

Code: Select all

$ cat /proc/cmdline 
BOOT_IMAGE=/vmlinuz-3.10.0-229.20.1.el7.x86_64 root=UUID=beebdb01-13ea-4796-bc2e-313120e601b3 ro nomodeset rd.md.uuid=beebdb01:13ea:4796:bc2e:313120e601b3 rd.md.uuid=61cf5085:4d45:4100:b091:cb582dd7b7f5 rd.md.uuid=baa255eb:6da7:40da:9073:2d24a0e6d282 crashkernel=auto vconsole.font=latarcyrheb-sun16 vconsole.keymap=it rhgb quiet rootdelay=5 bootdegraded=true rd.auto=1 LANG=it_IT.UTF-8
Reading dracut.cmdline document I tried to add "rd.auto=1" argument and then rebuild gnome config: no luck again.

I create a CentOS VM and installed fresh os in 2 HDDs in RAID 1. Reading mdadm.conf I saw that has 1 more line than my configuration ("AUTO +imsm +1.x -all") so I added this line also in my configuration:

Code: Select all

$ cat /etc/mdadm.conf
MAILADDR xxxxxxxx@yyyyyyy.zzz
AUTO +imsm +1.x -all
ARRAY /dev/md/boot metadata=1.2 name=mainframe:boot UUID=45bea0d7:22327a62:001d2a8a:8a9e23eb
ARRAY /dev/md/data metadata=1.2 name=mainframe:data UUID=e2f3520c:1b13c26f:47591745:7960c0c3
ARRAY /dev/md/root metadata=1.2 name=mainframe:root UUID=51de6e5d:14537a45:f0e31ee3:24918ef6
ARRAY /dev/md/swap metadata=1.2 name=mainframe:swap UUID=d8d01484:fdc47b3f:f27d5eaf:f8c8088f
Then I rebuild initrd and boot: no luck again.
Maybe I have to add "level=1 num-devices=4" even if not required by normal assembling?

I also started the machine with argument "rd.debug", the rdsosreport.txt is the attachment. (PS in this boot I added "bootdelay=10" as kernel argument: it doesn't exist, my bad).
Thanks to everyone
Attachments
rdsosreport.txt.zip
ZIP file
(132.36 KiB) Downloaded 82 times

pma61
Posts: 9
Joined: 2014/02/16 11:32:22

Re: mdadm raid - dracut: root fs not found

Post by pma61 » 2015/11/08 08:33:58

Added ticket n°0009721: https://bugs.centos.org/view.php?id=9721
Kernel adds disk devices after mdadm automatic assemble script.

pma61
Posts: 9
Joined: 2014/02/16 11:32:22

Re: mdadm raid - dracut: root fs not found

Post by pma61 » 2015/12/07 14:30:09

Fixed "automagically" when updating configs.
Just in case anyone have to compare their configs:

Disks and partitions:

Code: Select all

$ lsblk
NAME      MAJ:MIN RM   SIZE RO TYPE   MOUNTPOINT
sda         8:0    0   1,8T  0 disk   
├─sda1      8:1    0   200M  0 part   
├─sda2      8:2    0   500M  0 part   
│ └─md125   9:125  0 499,7M  0 raid1  /boot
├─sda3      8:3    0    46G  0 part   
│ └─md124   9:124  0    92G  0 raid10 /
├─sda4      8:4    0   1,8T  0 part   
│ └─md126   9:126  0   5,3T  0 raid5  /media/data
└─sda5      8:5    0     4G  0 part   
  └─md127   9:127  0     8G  0 raid10 [SWAP]
sdb         8:16   0   1,8T  0 disk   
├─sdb1      8:17   0   200M  0 part   
├─sdb2      8:18   0   500M  0 part   
│ └─md125   9:125  0 499,7M  0 raid1  /boot
├─sdb3      8:19   0    46G  0 part   
│ └─md124   9:124  0    92G  0 raid10 /
├─sdb4      8:20   0   1,8T  0 part   
│ └─md126   9:126  0   5,3T  0 raid5  /media/data
└─sdb5      8:21   0     4G  0 part   
  └─md127   9:127  0     8G  0 raid10 [SWAP]
sdc         8:32   0   2,7T  0 disk   
├─sdc1      8:33   0   200M  0 part   
├─sdc2      8:34   0   500M  0 part   
│ └─md125   9:125  0 499,7M  0 raid1  /boot
├─sdc3      8:35   0    46G  0 part   
│ └─md124   9:124  0    92G  0 raid10 /
├─sdc4      8:36   0   1,8T  0 part   
│ └─md126   9:126  0   5,3T  0 raid5  /media/data
├─sdc5      8:37   0     4G  0 part   
│ └─md127   9:127  0     8G  0 raid10 [SWAP]
└─sdc6      8:38   0 931,5G  0 part   /media/unraid
sdd         8:48   0   1,8T  0 disk   
├─sdd1      8:49   0   200M  0 part   /boot/efi
├─sdd2      8:50   0   500M  0 part   
│ └─md125   9:125  0 499,7M  0 raid1  /boot
├─sdd3      8:51   0    46G  0 part   
│ └─md124   9:124  0    92G  0 raid10 /
├─sdd4      8:52   0   1,8T  0 part   
│ └─md126   9:126  0   5,3T  0 raid5  /media/data
└─sdd5      8:53   0     4G  0 part   
  └─md127   9:127  0     8G  0 raid10 [SWAP]
Partitions UUID and FS UUID:

Code: Select all

# blkid
/dev/sda1: SEC_TYPE="msdos" UUID="A1F9-6C98" TYPE="vfat" PARTLABEL="EFI System" PARTUUID="78fa36ea-417a-41a4-9039-a1b9d6bf9446" 
/dev/sda2: UUID="45bea0d7-2232-7a62-001d-2a8a8a9e23eb" UUID_SUB="3b1b4706-72bc-5b0e-0ef3-40471d024126" LABEL="mainframe:boot" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="961e9686-c57e-46c9-b63b-5841659917b5" 
/dev/sda3: UUID="45543a3d-b01d-749f-7a78-4a2417762cce" UUID_SUB="1c7d9627-a7f2-fafa-915c-2d680047380c" LABEL="mainframe:root" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="f3aedc1f-0fba-4ed1-8974-87e28d2f9499" 
/dev/sda4: UUID="e2f3520c-1b13-c26f-4759-17457960c0c3" UUID_SUB="100f11c4-22de-e226-f479-9730492d8368" LABEL="mainframe:data" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="36daebbe-2bbc-4fcd-9c3c-5c79a72fa9b4" 
/dev/sda5: UUID="602db29d-8267-cf0c-5792-88f57d55d716" UUID_SUB="2df89855-9475-535d-8788-47a1078a0945" LABEL="mainframe:swap" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="052949ad-a856-4ca2-a6ca-c6750525bf31" 
/dev/sdb1: SEC_TYPE="msdos" UUID="A1F9-6C98" TYPE="vfat" PARTLABEL="EFI System" PARTUUID="ee9dd221-571d-4f25-be95-b2376faf5a49" 
/dev/sdb2: UUID="45bea0d7-2232-7a62-001d-2a8a8a9e23eb" UUID_SUB="c2c98387-14b7-ae32-61db-3aacd5caeab6" LABEL="mainframe:boot" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="db779559-ee3e-4e0b-a0b0-e45b291919b9" 
/dev/sdb3: UUID="45543a3d-b01d-749f-7a78-4a2417762cce" UUID_SUB="f123b6c8-d74a-8101-7932-b8bbafac5331" LABEL="mainframe:root" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="0d583159-7b15-48bc-9d92-254b2d3e86b6" 
/dev/sdb4: UUID="e2f3520c-1b13-c26f-4759-17457960c0c3" UUID_SUB="3914b986-525a-b0a1-d722-34fb886541fd" LABEL="mainframe:data" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="5ea8dc77-f78a-4856-977f-929a3df73b96" 
/dev/sdb5: UUID="602db29d-8267-cf0c-5792-88f57d55d716" UUID_SUB="34afca48-c5f2-45ae-f931-a3dbec3a71a6" LABEL="mainframe:swap" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="88de7723-9461-4328-8f8c-6209503cb3c7" 
/dev/sdc1: SEC_TYPE="msdos" UUID="A1F9-6C98" TYPE="vfat" PARTLABEL="EFI System" PARTUUID="1094585e-517a-4726-bc36-be0b82fe8a5d" 
/dev/sdc2: UUID="45bea0d7-2232-7a62-001d-2a8a8a9e23eb" UUID_SUB="358bf70d-2545-b37e-e103-8c7d526f8040" LABEL="mainframe:boot" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="df5dc7ed-7a4a-416d-9c90-6ac0cc5db1e2" 
/dev/sdc3: UUID="45543a3d-b01d-749f-7a78-4a2417762cce" UUID_SUB="b2b639f3-62d8-65ac-973b-d3aff6136af6" LABEL="mainframe:root" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="0515259d-ff9b-4eb4-b377-dda7ac8ebf35" 
/dev/sdc4: UUID="e2f3520c-1b13-c26f-4759-17457960c0c3" UUID_SUB="e0739ec6-a684-1799-e882-46edb239369b" LABEL="mainframe:data" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="3da1c745-f866-4311-af93-1f5432d7b442" 
/dev/sdc5: UUID="602db29d-8267-cf0c-5792-88f57d55d716" UUID_SUB="e7a0f64c-40e8-1826-4993-77f2aafd0be6" LABEL="mainframe:swap" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="39f4cd4d-bd18-46ce-a18a-e2a7127db17a" 
/dev/sdc6: UUID="c0035d3c-6a15-402c-b23b-e8ce797fb0e7" UUID_SUB="b5d9a10a-91b6-4772-ba10-945a414a28e9" TYPE="btrfs" PARTLABEL="Linux filesystem" PARTUUID="d550e7fa-0770-419e-85a3-cee23363e564" 
/dev/md127: UUID="bd1d3c54-b9c1-4844-9f12-31fe10174f55" TYPE="swap" 
/dev/md126: UUID="a5bb80e3-d88b-4efd-8efd-2eadfcec9fba" TYPE="xfs" 
/dev/md125: UUID="61cf5085-4d45-4100-b091-cb582dd7b7f5" TYPE="xfs" 
/dev/md124: UUID="fad893eb-43e8-4601-b0ad-3f6ccf8915c4" TYPE="xfs" 
/dev/sdd1: SEC_TYPE="msdos" UUID="A1F9-6C98" TYPE="vfat" PARTLABEL="EFI System" PARTUUID="560a5e78-b48c-4236-af09-94e4bc858a1d" 
/dev/sdd2: UUID="45bea0d7-2232-7a62-001d-2a8a8a9e23eb" UUID_SUB="ba4c9f1a-40f7-615f-c774-a2dbcddacbe5" LABEL="mainframe:boot" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="9dfc5e8b-7d06-4ee2-8917-fd56d53ad9d8" 
/dev/sdd3: UUID="45543a3d-b01d-749f-7a78-4a2417762cce" UUID_SUB="b2cc5fdf-0309-8085-1953-e1e206f46ea9" LABEL="mainframe:root" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="5dd55e74-059d-461c-ae68-3a8e600573a5" 
/dev/sdd4: UUID="e2f3520c-1b13-c26f-4759-17457960c0c3" UUID_SUB="564118a2-166b-4c7b-37d5-4124e59fc403" LABEL="mainframe:data" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="805409b0-0c9c-46c8-8e53-3689687d3be9" 
/dev/sdd5: UUID="602db29d-8267-cf0c-5792-88f57d55d716" UUID_SUB="fd14c03c-eeb8-c144-06ec-8d8770a53fa0" LABEL="mainframe:swap" TYPE="linux_raid_member" PARTLABEL="Linux RAID" PARTUUID="b859e96f-850a-4da5-9b19-bf5975f6298d"
Kernel Arguments:

Code: Select all

$ cat /proc/cmdline 
BOOT_IMAGE=/vmlinuz-3.10.0-229.20.1.el7.x86_64 root=UUID=fad893eb-43e8-4601-b0ad-3f6ccf8915c4 ro nomodeset crashkernel=auto rd.auto rd.shell vconsole.font=latarcyrheb-sun16 vconsole.keymap=it quiet bootdegraded=true LANG=it_IT.UTF-8
Partitions auto mount:

Code: Select all

$ cat /etc/fstab 
#
# /etc/fstab
# Created by anaconda on Sat Jul 19 19:42:30 2014
#
# Accessible filesystems, by reference, are maintained under '/dev/disk'
# See man pages fstab(5), findfs(8), mount(8) and/or blkid(8) for more info
#
# /dev/md/root
UUID=fad893eb-43e8-4601-b0ad-3f6ccf8915c4       /                       xfs     defaults                        1 1

# /dev/md/boot
UUID=61cf5085-4d45-4100-b091-cb582dd7b7f5       /boot                   xfs     defaults                        1 2

# 1st disk efi (original)
UUID=A1F9-6C98                                  /boot/efi               vfat    umask=0077,shortname=winnt      0 0

# /dev/md/swap
UUID=bd1d3c54-b9c1-4844-9f12-31fe10174f55       swap                    swap    defaults                        0 0

# /dev/md/data
UUID=a5bb80e3-d88b-4efd-8efd-2eadfcec9fba	/media/data		xfs	defaults,sunit=128,swidth=384	0 0

# unraid
UUID=c0035d3c-6a15-402c-b23b-e8ce797fb0e7	/media/unraid		btrfs	defaults			0 0
mdadm config file:

Code: Select all

$ cat /etc/mdadm.conf 
MAILADDR francesco.antognazza@gmail.com
CREATE auto=yes
AUTO +imsm +1.x -all
ARRAY /dev/md/boot  level=raid1 metadata=1.2 num-devices=4 UUID=45bea0d7:22327a62:001d2a8a:8a9e23eb name=mainframe:boot devices=/dev/sdc2,/dev/sdb2,/dev/sda2,/dev/sdd2
ARRAY /dev/md/root  level=raid10 metadata=1.2 num-devices=4 UUID=45543a3d:b01d749f:7a784a24:17762cce name=mainframe:root devices=/dev/sdc3,/dev/sdb3,/dev/sda3,/dev/sdd3
ARRAY /dev/md/data  level=raid5 metadata=1.2 num-devices=4 UUID=e2f3520c:1b13c26f:47591745:7960c0c3 name=mainframe:data devices=/dev/sdc4,/dev/sdb4,/dev/sda4,/dev/sdd4
ARRAY /dev/md/swap  level=raid10 metadata=1.2 num-devices=4 UUID=602db29d:8267cf0c:579288f5:7d55d716 name=mainframe:swap devices=/dev/sdc5,/dev/sdb5,/dev/sda5,/dev/sdd5
grub config file:

Code: Select all

$ cat /etc/default/grub 
GRUB_TIMEOUT=3
GRUB_DISTRIBUTOR="$(sed 's, release .*$,,g' /etc/system-release)"
GRUB_DEFAULT=saved
GRUB_DISABLE_SUBMENU=true
GRUB_TERMINAL_OUTPUT="console"
GRUB_CMDLINE_LINUX="nomodeset crashkernel=auto rd.auto rd.shell vconsole.font=latarcyrheb-sun16 vconsole.keymap=it quiet bootdegraded=true LANG=it_IT.UTF-8"
GRUB_DISABLE_RECOVERY="true"
GRUB_PRELOAD_MODULES="diskfilter mdraid1x"
Reubilt initrd with:

Code: Select all

# dracut --regenerate-all -fv --mdadmconf --fstab --add=mdraid --add-driver="raid1 raid10 raid456"

jannoke
Posts: 2
Joined: 2016/09/20 17:12:11

Re: mdadm raid - dracut: root fs not found

Post by jannoke » 2016/09/20 17:22:07

I made the change that i used your dracut line, but that did not work.
SO i noticed that in my case there was a problem that i had to additionally modprobe raid1.
So I added rdloaddriver=raid1 to linux cmd line. also force loaded the arrays with rd.md.uuid=495a0334:33c15023:5872467e:12f69c95
That did the trick

Post Reply

Return to “CentOS 7 - Software Support”