Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > linux.debian.user > #188692 > unrolled thread

RAID 5 array with journal device does not automatically assemble at boot

Started byTobx <net@tobx.de>
First post2017-11-07 17:30 +0100
Last post2017-11-09 14:00 +0100
Articles 5 — 2 participants

Back to article view | Back to linux.debian.user


Contents

  RAID 5 array with journal device does not automatically assemble at  boot Tobx <net@tobx.de> - 2017-11-07 17:30 +0100
    Re: RAID 5 array with journal device does not automatically assemble at boot deloptes <deloptes@gmail.com> - 2017-11-07 20:10 +0100
      Re: RAID 5 array with journal device does not automatically assemble  at boot Tobx <net@tobx.de> - 2017-11-08 09:10 +0100
        Re: RAID 5 array with journal device does not automatically assemble at boot deloptes <deloptes@gmail.com> - 2017-11-08 22:00 +0100
          Re: RAID 5 array with journal device does not automatically assemble  at boot Tobx <net@tobx.de> - 2017-11-09 14:00 +0100

#188692 — RAID 5 array with journal device does not automatically assemble at boot

FromTobx <net@tobx.de>
Date2017-11-07 17:30 +0100
SubjectRAID 5 array with journal device does not automatically assemble at boot
Message-ID<uJeVb-3Xq-1@gated-at.bofh.it>
Hello,

I try to get a RAID 5 array to assemble at boot with mdadm:

# mdadm --create /dev/md/test --level=5 --raid-devices=3 --write-journal=/dev/sde1 /dev/sd[bcd]1
mdadm: Defaulting to version 1.2 metadata
mdadm: array /dev/md/test started.
# /usr/share/mdadm/mkconf > /etc/mdadm/mdadm.conf
# update-initramfs -u -k all
update-initramfs: Generating /boot/initrd.img-4.9.0-4-amd64
# reboot

After the reboot:

# mdadm --detail /dev/md/test
mdadm: cannot open /dev/md/test: No such file or directory

This can easily be corrected with:

# mdadm --stop /dev/md127 
mdadm: stopped /dev/md127
# mdadm --assemble --scan
mdadm: /dev/md/test has been started with 3 drives and 1 journal.

The same works as expected when leaving out the journal option "--write-journal=/dev/sde1".

The same issue occurs without a mdadm.conf file:

# rm /etc/mdadm/mdadm.conf
# update-initramfs -u -k all
update-initramfs: Generating /boot/initrd.img-4.9.0-4-amd64

It does not work with the journal option, but it works without.

What am I missing?

Cheers,
Tobi

[toc] | [next] | [standalone]


#188706 — Re: RAID 5 array with journal device does not automatically assemble at boot

Fromdeloptes <deloptes@gmail.com>
Date2017-11-07 20:10 +0100
SubjectRe: RAID 5 array with journal device does not automatically assemble at boot
Message-ID<uJhq1-5zY-13@gated-at.bofh.it>
In reply to#188692
Tobx wrote:

> What am I missing?

I don't know if it is related and I don't use raid5, but rather raid1, and
in the past year or so I had experienced similar with our server. Now I run
4.12.10 and noticed in the changelog/release notes that there are a lot of
fixes in the md stack. The issues are gone now and it assembles on boot
automatically. I don't know when the problems started (with which kernel
version - I htink 4.9 was OK, but I might be wrong)

besides what do you have in /etc/default/mdadm

regards

[toc] | [prev] | [next] | [standalone]


#188740 — Re: RAID 5 array with journal device does not automatically assemble at boot

FromTobx <net@tobx.de>
Date2017-11-08 09:10 +0100
SubjectRe: RAID 5 array with journal device does not automatically assemble at boot
Message-ID<uJtAR-4K1-5@gated-at.bofh.it>
In reply to#188706
I was on 4.9.0-4 (Stretch), now tried with 4.13.0-0 but had no luck.

I also tried it again on a clean Ubuntu-Server 17.10 with Kernel 4.13.0-16 and had exactly the same issue:

RAID assembling at boot only works when no journal device is involved.

> On 7. Nov 2017, at 20:04, deloptes <deloptes@gmail.com> wrote:
> 
> besides what do you have in /etc/default/mdadm

I did not touch /etc/default/mdadm. I ran dpkg-reconfigure mdadm once, but this did not help, options in /etc/default/mdadm are:

AUTOCHECK=true
START_DAEMON=true
DAEMON_OPTIONS="--syslog"
VERBOSE=false

Options in /etc/mdadm/mdadm.conf are:

HOMEHOST <system>
MAILADDR root
ARRAY /dev/md/test  metadata=1.2 UUID=4f0448f6:fee2638c:a1c1b547:20358980 name=debian:test
  spares=1

regards

[toc] | [prev] | [next] | [standalone]


#188774 — Re: RAID 5 array with journal device does not automatically assemble at boot

Fromdeloptes <deloptes@gmail.com>
Date2017-11-08 22:00 +0100
SubjectRe: RAID 5 array with journal device does not automatically assemble at boot
Message-ID<uJFC2-3HM-3@gated-at.bofh.it>
In reply to#188740
Tobx wrote:

> RAID assembling at boot only works when no journal device is involved.
> 

I can't help much here, nothing to compare. I forgot to mention that md
driver is compiled in the kernel in my case.

> VERBOSE=false

perhaps set to true and see what it says.

> 
> Options in /etc/mdadm/mdadm.conf are:
> 
> HOMEHOST <system>
> MAILADDR root
> ARRAY /dev/md/test  metadata=1.2 UUID=4f0448f6:fee2638c:a1c1b547:20358980
> name=debian:test spares=1

.. and I assume you double checked (blkid) the UUID.

No idea - just trying to help as it sounded similar to what I've
experienced. However in your case the "--write-journal=/dev/sde1" seems to
cause the issue.
According the docs [1,2] I overflew it is used only when creating an array.
[3] says explicitly create, build or grow. For manage you should
use --add-journal

regards

[1] https://lwn.net/Articles/665299/
[2] 2016_vault_write_journal_cache_v2.pdf
[3] https://man.cx/mdadm(8)

[toc] | [prev] | [next] | [standalone]


#188811 — Re: RAID 5 array with journal device does not automatically assemble at boot

FromTobx <net@tobx.de>
Date2017-11-09 14:00 +0100
SubjectRe: RAID 5 array with journal device does not automatically assemble at boot
Message-ID<uJUB3-5gI-5@gated-at.bofh.it>
In reply to#188774
On 8. Nov 2017, at 21:58, deloptes <deloptes@gmail.com> wrote:
> 
> Tobx wrote:
> 
>> VERBOSE=false
> 
> perhaps set to true and see what it says.

The comment to this option states:
#   if this variable is set to true, mdadm will be a little more verbose e.g.
#   when creating the initramfs.

I tried that, but I did not see any difference.

On 8. Nov 2017, at 21:58, deloptes <deloptes@gmail.com> wrote:
> According the docs [1,2] I overflew it is used only when creating an array.
> [3] says explicitly create, build or grow. For manage you should
> use --add-journal

Yes, I used the option only to create the array.

At linux-raid@vger.kernel.org I have got the information that this is most probably a bug and that the journaling feature is very new, but should be stable.

Now I decided to work around that problem. I prevent mdadm to auto-assemble the array with:

ARRAY /dev/md/test UUID=08ef559a:55c0f0ee:713cb429:c73d5a76

in /etc/mdadm/mdadm.conf and (not yet tested) try to assemble and mount the array in /etc/rc.local.

I hope this works.

Cheers,
Tobi

[toc] | [prev] | [standalone]


Back to top | Article view | linux.debian.user


csiph-web