All of lore.kernel.org
 help / color / mirror / Atom feed
* imsm raid is always readonly on boot
@ 2012-02-07 11:58 Stefan Priebe - Profihost AG
  2012-02-07 16:09 ` Jes Sorensen
  2012-02-08  1:57 ` NeilBrown
  0 siblings, 2 replies; 10+ messages in thread
From: Stefan Priebe - Profihost AG @ 2012-02-07 11:58 UTC (permalink / raw)
  To: linux-raid

Hi,

i'm running 3.0.18 as kernel (renamed to 2.6.40) and mdadm 3.2.2.

I'm trying to get an intel fake raid running but it is always set to
readonly on boot after running
mdadm --assemble --scan --run --force --auto=yes

But i've absolutely no idea why.

My mdadm.conf:
# 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 <ignore>

# instruct the monitoring daemon where to send mail alerts
MAILADDR root

# definitions of existing MD arrays
ARRAY metadata=imsm UUID=24cdb70d:101f4c4b:23dfa5cb:3f176b6a
ARRAY /dev/md126 container=24cdb70d:101f4c4b:23dfa5cb:3f176b6a member=0
UUID=84aa9982:ed593d80:ee7c7f53:e2944038


~# cat /sys/block/md126/md/array_state
readonly

What's wrong? Thanks!

Stefan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: imsm raid is always readonly on boot
  2012-02-07 11:58 imsm raid is always readonly on boot Stefan Priebe - Profihost AG
@ 2012-02-07 16:09 ` Jes Sorensen
  2012-02-07 17:42   ` Stefan Priebe
  2012-02-08  1:57 ` NeilBrown
  1 sibling, 1 reply; 10+ messages in thread
From: Jes Sorensen @ 2012-02-07 16:09 UTC (permalink / raw)
  To: Stefan Priebe - Profihost AG; +Cc: linux-raid

On 02/07/12 12:58, Stefan Priebe - Profihost AG wrote:
> Hi,
> 
> i'm running 3.0.18 as kernel (renamed to 2.6.40) and mdadm 3.2.2.
> 
> I'm trying to get an intel fake raid running but it is always set to
> readonly on boot after running
> mdadm --assemble --scan --run --force --auto=yes
> 
> But i've absolutely no idea why.
> 
> My mdadm.conf:
> # 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 <ignore>
> 
> # instruct the monitoring daemon where to send mail alerts
> MAILADDR root
> 
> # definitions of existing MD arrays
> ARRAY metadata=imsm UUID=24cdb70d:101f4c4b:23dfa5cb:3f176b6a
> ARRAY /dev/md126 container=24cdb70d:101f4c4b:23dfa5cb:3f176b6a member=0
> UUID=84aa9982:ed593d80:ee7c7f53:e2944038
> 
> 
> ~# cat /sys/block/md126/md/array_state
> readonly
> 
> What's wrong? Thanks!

/dev/md126 looks to be the container, not the actual raid device, from
what your mdadm.conf says.

What does your /proc/mdstat say?

Cheers,
Jes


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: imsm raid is always readonly on boot
  2012-02-07 16:09 ` Jes Sorensen
@ 2012-02-07 17:42   ` Stefan Priebe
  2012-02-07 17:45     ` Jes Sorensen
  2012-02-07 21:47     ` John Robinson
  0 siblings, 2 replies; 10+ messages in thread
From: Stefan Priebe @ 2012-02-07 17:42 UTC (permalink / raw)
  To: Jes Sorensen; +Cc: linux-raid

Hi Jes,

Am 07.02.2012 17:09, schrieb Jes Sorensen:
> /dev/md126 looks to be the container, not the actual raid device, from
> what your mdadm.conf says.

booted from a rescue CD using 2.6.32 kernel.

~# mdadm -D --scan
ARRAY /dev/md/imsm0 metadata=imsm UUID=24cdb70d:101f4c4b:23dfa5cb:3f176b6a
ARRAY /dev/md/RaidStefan_0 container=/dev/md/imsm0 member=0 
UUID=84aa9982:ed593d80:ee7c7f53:e2944038

~# cat /proc/mdstat
Personalities : [raid1]
md126 : active (auto-read-only) raid1 sda[1] sdb[0]
       156288000 blocks super external:/md127/0 [2/2] [UU]

md127 : inactive sdb[1](S) sda[0](S)
       5544 blocks super external:imsm

unused devices: <none>

so md126 is the real raid.

> What does your /proc/mdstat say?

When booted from disk - output while in initramfs:
~# cat /proc/mdstat
Personalities : [raid1]
md126 : active (read-only) raid1 sda[1] sdb[0]
       156288000 blocks super external:/md127/0 [2/2] [UU]

md127 : inactive sdb[1](S) sda[0](S)
       5544 blocks super external:imsm

unused devices: <none>

Stefan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: imsm raid is always readonly on boot
  2012-02-07 17:42   ` Stefan Priebe
@ 2012-02-07 17:45     ` Jes Sorensen
  2012-02-07 18:24       ` Stefan Priebe
  2012-02-07 21:47     ` John Robinson
  1 sibling, 1 reply; 10+ messages in thread
From: Jes Sorensen @ 2012-02-07 17:45 UTC (permalink / raw)
  To: Stefan Priebe; +Cc: linux-raid

On 02/07/12 18:42, Stefan Priebe wrote:
> Hi Jes,
> 
> Am 07.02.2012 17:09, schrieb Jes Sorensen:
>> /dev/md126 looks to be the container, not the actual raid device, from
>> what your mdadm.conf says.
> 
> booted from a rescue CD using 2.6.32 kernel.
> 
> ~# mdadm -D --scan
> ARRAY /dev/md/imsm0 metadata=imsm UUID=24cdb70d:101f4c4b:23dfa5cb:3f176b6a
> ARRAY /dev/md/RaidStefan_0 container=/dev/md/imsm0 member=0
> UUID=84aa9982:ed593d80:ee7c7f53:e2944038
> 
> ~# cat /proc/mdstat
> Personalities : [raid1]
> md126 : active (auto-read-only) raid1 sda[1] sdb[0]
>       156288000 blocks super external:/md127/0 [2/2] [UU]
> 
> md127 : inactive sdb[1](S) sda[0](S)
>       5544 blocks super external:imsm
> 
> unused devices: <none>
> 
> so md126 is the real raid.
> 
>> What does your /proc/mdstat say?
> 
> When booted from disk - output while in initramfs:
> ~# cat /proc/mdstat
> Personalities : [raid1]
> md126 : active (read-only) raid1 sda[1] sdb[0]
>       156288000 blocks super external:/md127/0 [2/2] [UU]
> 
> md127 : inactive sdb[1](S) sda[0](S)
>       5544 blocks super external:imsm

Does it stay read-only if you try to write to it?

Jes


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: imsm raid is always readonly on boot
  2012-02-07 17:45     ` Jes Sorensen
@ 2012-02-07 18:24       ` Stefan Priebe
  2012-02-07 20:24         ` Jes Sorensen
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Priebe @ 2012-02-07 18:24 UTC (permalink / raw)
  To: Jes Sorensen; +Cc: linux-raid

Am 07.02.2012 um 18:45 schrieb Jes Sorensen <Jes.Sorensen@redhat.com>:

> On 02/07/12 18:42, Stefan Priebe wrote:
>> Hi Jes,
>> 
>> Am 07.02.2012 17:09, schrieb Jes Sorensen:
>>> /dev/md126 looks to be the container, not the actual raid device, from
>>> what your mdadm.conf says.
>> 
>> booted from a rescue CD using 2.6.32 kernel.
>> 
>> ~# mdadm -D --scan
>> ARRAY /dev/md/imsm0 metadata=imsm UUID=24cdb70d:101f4c4b:23dfa5cb:3f176b6a
>> ARRAY /dev/md/RaidStefan_0 container=/dev/md/imsm0 member=0
>> UUID=84aa9982:ed593d80:ee7c7f53:e2944038
>> 
>> ~# cat /proc/mdstat
>> Personalities : [raid1]
>> md126 : active (auto-read-only) raid1 sda[1] sdb[0]
>>      156288000 blocks super external:/md127/0 [2/2] [UU]
>> 
>> md127 : inactive sdb[1](S) sda[0](S)
>>      5544 blocks super external:imsm
>> 
>> unused devices: <none>
>> 
>> so md126 is the real raid.
>> 
>>> What does your /proc/mdstat say?
>> 
>> When booted from disk - output while in initramfs:
>> ~# cat /proc/mdstat
>> Personalities : [raid1]
>> md126 : active (read-only) raid1 sda[1] sdb[0]
>>      156288000 blocks super external:/md127/0 [2/2] [UU]
>> 
>> md127 : inactive sdb[1](S) sda[0](S)
>>      5544 blocks super external:imsm
> 
> Does it stay read-only if you try to write to it?

Yes as it is read-only and not auto-read-only.

Greets and thanks,

Stefan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: imsm raid is always readonly on boot
  2012-02-07 18:24       ` Stefan Priebe
@ 2012-02-07 20:24         ` Jes Sorensen
  0 siblings, 0 replies; 10+ messages in thread
From: Jes Sorensen @ 2012-02-07 20:24 UTC (permalink / raw)
  To: Stefan Priebe; +Cc: linux-raid

On 02/07/12 19:24, Stefan Priebe wrote:
>>> >> When booted from disk - output while in initramfs:
>>> >> ~# cat /proc/mdstat
>>> >> Personalities : [raid1]
>>> >> md126 : active (read-only) raid1 sda[1] sdb[0]
>>> >>      156288000 blocks super external:/md127/0 [2/2] [UU]
>>> >> 
>>> >> md127 : inactive sdb[1](S) sda[0](S)
>>> >>      5544 blocks super external:imsm
>> > 
>> > Does it stay read-only if you try to write to it?
> Yes as it is read-only and not auto-read-only.

Ok, I don't have a lot of ideas here - hopefully the Intel guys or Neil
will have some input.

Cheers,
Jes



^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: imsm raid is always readonly on boot
  2012-02-07 17:42   ` Stefan Priebe
  2012-02-07 17:45     ` Jes Sorensen
@ 2012-02-07 21:47     ` John Robinson
  1 sibling, 0 replies; 10+ messages in thread
From: John Robinson @ 2012-02-07 21:47 UTC (permalink / raw)
  To: Stefan Priebe; +Cc: Jes Sorensen, linux-raid

On 07/02/2012 17:42, Stefan Priebe wrote:
[...]
> md127 : inactive sdb[1](S) sda[0](S)
> 5544 blocks super external:imsm

I don't know what the answer is, but I suspect that the members of the 
container both being marked as spares may be (part of) the problem.

Cheers,

John.


^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: imsm raid is always readonly on boot
  2012-02-07 11:58 imsm raid is always readonly on boot Stefan Priebe - Profihost AG
  2012-02-07 16:09 ` Jes Sorensen
@ 2012-02-08  1:57 ` NeilBrown
  2012-02-08  8:30   ` Stefan Priebe - Profihost AG
  1 sibling, 1 reply; 10+ messages in thread
From: NeilBrown @ 2012-02-08  1:57 UTC (permalink / raw)
  To: Stefan Priebe - Profihost AG; +Cc: linux-raid

[-- Attachment #1: Type: text/plain, Size: 2116 bytes --]

On Tue, 07 Feb 2012 12:58:17 +0100 Stefan Priebe - Profihost AG
<s.priebe@profihost.ag> wrote:

> Hi,
> 
> i'm running 3.0.18 as kernel (renamed to 2.6.40) and mdadm 3.2.2.
> 
> I'm trying to get an intel fake raid running but it is always set to
> readonly on boot after running
> mdadm --assemble --scan --run --force --auto=yes
> 
> But i've absolutely no idea why.

Probably mdmon isn't running for some reason.

For these arrays the metadata is managed in user-space by mdmon.
Until it is ready to record failures the array must remain readonly.
On of the first things it does is switch the array to read-write, having
arranged to catch any failure notifications.

If you 

 mdmon --all --takeover

it might just start working.  However that doesn't explain why mdmon wasn't
started at boot.  mdadm is meant to start it.
There are some concerns about mdmon starting this way being not "the right
thing" from a systemd perspective and there might be some issues there that
are causing problems.

NeilBrown



> 
> My mdadm.conf:
> # 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 <ignore>
> 
> # instruct the monitoring daemon where to send mail alerts
> MAILADDR root
> 
> # definitions of existing MD arrays
> ARRAY metadata=imsm UUID=24cdb70d:101f4c4b:23dfa5cb:3f176b6a
> ARRAY /dev/md126 container=24cdb70d:101f4c4b:23dfa5cb:3f176b6a member=0
> UUID=84aa9982:ed593d80:ee7c7f53:e2944038
> 
> 
> ~# cat /sys/block/md126/md/array_state
> readonly
> 
> What's wrong? Thanks!
> 
> Stefan
> --
> To unsubscribe from this list: send the line "unsubscribe linux-raid" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at  http://vger.kernel.org/majordomo-info.html


[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: imsm raid is always readonly on boot
  2012-02-08  1:57 ` NeilBrown
@ 2012-02-08  8:30   ` Stefan Priebe - Profihost AG
  2012-02-08  8:45     ` NeilBrown
  0 siblings, 1 reply; 10+ messages in thread
From: Stefan Priebe - Profihost AG @ 2012-02-08  8:30 UTC (permalink / raw)
  To: NeilBrown; +Cc: linux-raid

Hi Neil,

Am 08.02.2012 02:57, schrieb NeilBrown:
> Probably mdmon isn't running for some reason.
> 
> For these arrays the metadata is managed in user-space by mdmon.
> Until it is ready to record failures the array must remain readonly.
> On of the first things it does is switch the array to read-write, having
> arranged to catch any failure notifications.
> 
> If you 
> 
>  mdmon --all --takeover
> 
> it might just start working.  However that doesn't explain why mdmon wasn't
> started at boot.  mdadm is meant to start it.
> There are some concerns about mdmon starting this way being not "the right
> thing" from a systemd perspective and there might be some issues there that
> are causing problems.

You're correct the mdmon does not run as the root filesystem is readonly
and it cannot create a pid file... and the root filesystem stays
readonly as the mdmon is not running...

Greets

Stefan

^ permalink raw reply	[flat|nested] 10+ messages in thread

* Re: imsm raid is always readonly on boot
  2012-02-08  8:30   ` Stefan Priebe - Profihost AG
@ 2012-02-08  8:45     ` NeilBrown
  0 siblings, 0 replies; 10+ messages in thread
From: NeilBrown @ 2012-02-08  8:45 UTC (permalink / raw)
  To: Stefan Priebe - Profihost AG; +Cc: linux-raid

[-- Attachment #1: Type: text/plain, Size: 1455 bytes --]

On Wed, 08 Feb 2012 09:30:42 +0100 Stefan Priebe - Profihost AG
<s.priebe@profihost.ag> wrote:

> Hi Neil,
> 
> Am 08.02.2012 02:57, schrieb NeilBrown:
> > Probably mdmon isn't running for some reason.
> > 
> > For these arrays the metadata is managed in user-space by mdmon.
> > Until it is ready to record failures the array must remain readonly.
> > On of the first things it does is switch the array to read-write, having
> > arranged to catch any failure notifications.
> > 
> > If you 
> > 
> >  mdmon --all --takeover
> > 
> > it might just start working.  However that doesn't explain why mdmon wasn't
> > started at boot.  mdadm is meant to start it.
> > There are some concerns about mdmon starting this way being not "the right
> > thing" from a systemd perspective and there might be some issues there that
> > are causing problems.
> 
> You're correct the mdmon does not run as the root filesystem is readonly
> and it cannot create a pid file... and the root filesystem stays
> readonly as the mdmon is not running...

It should be configured to create it in a writable filesystem,
maybe /dev/.something or /var/run/something.

If it is configured to create it somewhere that isn't writeable when mdadm is
run, then that is a system integration error.

(not entirely surprising as we seem to keep changing our mind as to where
this stuff should go - I think /run is the flavour of the month).

NeilBrown

[-- Attachment #2: signature.asc --]
[-- Type: application/pgp-signature, Size: 828 bytes --]

^ permalink raw reply	[flat|nested] 10+ messages in thread

end of thread, other threads:[~2012-02-08  8:45 UTC | newest]

Thread overview: 10+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-02-07 11:58 imsm raid is always readonly on boot Stefan Priebe - Profihost AG
2012-02-07 16:09 ` Jes Sorensen
2012-02-07 17:42   ` Stefan Priebe
2012-02-07 17:45     ` Jes Sorensen
2012-02-07 18:24       ` Stefan Priebe
2012-02-07 20:24         ` Jes Sorensen
2012-02-07 21:47     ` John Robinson
2012-02-08  1:57 ` NeilBrown
2012-02-08  8:30   ` Stefan Priebe - Profihost AG
2012-02-08  8:45     ` NeilBrown

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.