/dev/md3 missing after reboot

Kernels & Hardware, configuring network, installing services

/dev/md3 missing after reboot

Postby LordByron » 2019-07-31 11:51

I've lost one of my md devices (md3) after the power failed. It was a mirror of two partitions (sdc1 and sdd1) that are still present.

There are two other md devices that are still working fine.

What I'd like to know is can I recreate the md3 with the original two partitions sdc1 and sdd1 without loosing the data which I assume is till on them?

The following is the output of various commands I used when trying to troublshoot the problem myself. The version of debian is jessie.

I currently have the following md devices which are working

cat /proc/mdstat
Personalities : [raid1]
md1 : active raid1 sdb4[3] sda4[2]
1408513300 blocks super 1.1 [2/2] [UU]
bitmap: 7/11 pages [28KB], 65536KB chunk

md0 : active raid1 sdb2[3] sda2[2]
20971448 blocks super 1.0 [2/2] [UU]
bitmap: 1/1 pages [4KB], 65536KB chunk

which are mounted and working as normal

$ df -h
Filesystem Size Used Avail Use% Mounted on
/dev/md0 20G 13G 6.4G 67% /
udev 10M 0 10M 0% /dev
tmpfs 3.2G 9.5M 3.2G 1% /run
tmpfs 7.9G 236M 7.7G 3% /dev/shm
tmpfs 5.0M 4.0K 5.0M 1% /run/lock
tmpfs 7.9G 0 7.9G 0% /sys/fs/cgroup
/dev/md1 1.3T 970G 286G 78% /home

However prior to a reboot I also had a third md that was mounted and was working (i'm 100% sure).

I never set it up originally but I found this entry in the history

mdadm --create /dev/md3 --level=1 --raid-devices=2 /dev/sdc1 /dev/sdd1

and it has the following entry in /etc/fstab

/dev/md3 /work ext4 defaults 0 2

However it appears that it was never added to mdadm.conf

cat 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

# definitions of existing MD arrays
ARRAY /dev/md/0 metadata=1.2 UUID=d2892d82:e6733796:8a52dda4:2b66e5d1 name=myc:0
ARRAY /dev/md/1 metadata=1.2 UUID=aedb47b6:29933b94:3c18cc7c:d8f90860 name=myc:1
ARRAY /dev/md/2 metadata=1.2 UUID=590f1676:1a61a6e5:ed207004:365bd7f5 name=myc:2

And now there is no md device file

ls -l /dev/md*
brw-rw---- 1 root disk 9, 0 Jul 30 09:07 /dev/md0
brw-rw---- 1 root disk 9, 1 Jul 30 09:07 /dev/md1
brw-rw---- 1 root disk 9, 2 Jul 30 09:07 /dev/md2

total 0
lrwxrwxrwx 1 root root 6 Jul 30 09:07 0 -> ../md0
lrwxrwxrwx 1 root root 6 Jul 30 09:07 1 -> ../md1
lrwxrwxrwx 1 root root 6 Jul 30 09:07 2 -> ../md2

However the original dev files (sdc1 and sdd1) used by the missing md file are still present

# lsblk
sda 8:0 0 238.5G 0 disk
|-sda1 8:1 0 18.8G 0 part
| `-md0 9:0 0 18.8G 0 raid1 /
|-sda2 8:2 0 1K 0 part
|-sda5 8:5 0 3.8G 0 part
| `-md1 9:1 0 3.8G 0 raid1 [SWAP]
`-sda6 8:6 0 215.9G 0 part
`-md2 9:2 0 215.7G 0 raid1 /home
sdb 8:16 0 238.5G 0 disk
|-sdb1 8:17 0 18.8G 0 part
| `-md0 9:0 0 18.8G 0 raid1 /
|-sdb2 8:18 0 1K 0 part
|-sdb5 8:21 0 3.8G 0 part
| `-md1 9:1 0 3.8G 0 raid1 [SWAP]
`-sdb6 8:22 0 215.9G 0 part
`-md2 9:2 0 215.7G 0 raid1 /home
sdc 8:32 0 1.8T 0 disk
`-sdc1 8:33 0 1.8T 0 part
sdd 8:48 0 1.8T 0 disk
`-sdd1 8:49 0 1.8T 0 part
sr0 11:0 1 1024M 0 rom

# sudo blkid
/dev/sdb1: UUID="d2892d82-e673-3796-8a52-dda42b66e5d1" UUID_SUB="04ad9fc3-c3cc-2db5-f096-ec62614ebfcb" LABEL="myc:0" TYPE="linux_raid_member" PARTUUID="14bcaf67-01"
/dev/sdb5: UUID="aedb47b6-2993-3b94-3c18-cc7cd8f90860" UUID_SUB="b6b2507b-5f2b-b6be-7872-594629a09932" LABEL="myc:1" TYPE="linux_raid_member" PARTUUID="14bcaf67-05"
/dev/sdb6: UUID="590f1676-1a61-a6e5-ed20-7004365bd7f5" UUID_SUB="d243ead4-82dc-1876-4910-92d257eee085" LABEL="myc:2" TYPE="linux_raid_member" PARTUUID="14bcaf67-06"
/dev/sdd1: UUID="2f804559-e30b-ec1d-4bbf-27c26e6a0807" UUID_SUB="217967c0-731d-c319-2bc8-6169fc9cfcb7" LABEL="alf:3" TYPE="linux_raid_member" PARTUUID="8329d0a9-01"
/dev/sda1: UUID="d2892d82-e673-3796-8a52-dda42b66e5d1" UUID_SUB="fb89b39c-e666-f9c2-b52c-b3a6e39c10f6" LABEL="myc:0" TYPE="linux_raid_member" PARTUUID="4b5e4c11-01"
/dev/sda5: UUID="aedb47b6-2993-3b94-3c18-cc7cd8f90860" UUID_SUB="c0683126-27ec-3e0b-2d4e-cc26da2ea41a" LABEL="myc:1" TYPE="linux_raid_member" PARTUUID="4b5e4c11-05"
/dev/sda6: UUID="590f1676-1a61-a6e5-ed20-7004365bd7f5" UUID_SUB="c86f3af1-023f-85b2-c91e-1ddb932432a6" LABEL="myc:2" TYPE="linux_raid_member" PARTUUID="4b5e4c11-06"
/dev/sdc1: UUID="2f804559-e30b-ec1d-4bbf-27c26e6a0807" UUID_SUB="0ed65c9a-6b8a-4b95-a8fc-b65933a391f0" LABEL="alf:3" TYPE="linux_raid_member" PARTUUID="73dc2cbb-01"
/dev/md0: UUID="cad67593-6e5a-4ef0-956c-35748c651530" TYPE="ext4"
/dev/md1: UUID="d967c2ae-233d-4996-82b7-7bbbfb0ace97" TYPE="swap"
/dev/md2: UUID="678b6c7b-d354-4b94-8031-9e87555a2bdc" TYPE="ext4

I hope that helps.

Best regards
Posts: 10
Joined: 2019-01-28 15:53

Re: /dev/md3 missing after reboot

Postby ruwolf » 2019-08-11 18:14

I do not know, but when I read wiki.debian.org: Software RAID or superuser.com: Ubuntu - How can I make mdadm auto-assemble RAID after each boot? it seems to me, that mdadm.conf is not automatically created or updated by command creating news array.
This Milosz Galazka: How to regenerate the boot configuration for mdadm will not help you?
User avatar
Posts: 429
Joined: 2008-02-18 05:04
Location: Slovakia, Banovce nad Bebravou, Matice slovenskej 1260/4-7

Return to System configuration

Who is online

Users browsing this forum: No registered users and 22 guests