imsm raid is always readonly on boot
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
Quoted 32 lines · Stefan Priebe - Profihost AG
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=yesBut 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
Quoted 4 lines
~# cat
/sys/block/md126/md/array_state
readonlyWhat'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
Hi Jes,
Am 07.02.2012 17:09, schrieb Jes Sorensen:
Quoted 2 lines
/dev/md126looks 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.
Quoted 1 line
What does your
/proc/mdstatsay?
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
Quoted 27 lines · Stefan Priebe
Hi Jes,
Am 07.02.2012 17:09, schrieb Jes Sorensen:
Quoted 2 lines
/dev/md126looks 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/imsm0metadata=imsm UUID=24cdb70d:101f4c4b:23dfa5cb:3f176b6a ARRAY/dev/md/RaidStefan_0container=/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:imsmunused devices: <none>
so md126 is the real raid.
Quoted 1 line
What does your
/proc/mdstatsay?
Quoted 8 lines
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
Am 07.02.2012 um 18:45 schrieb Jes Sorensen <[email protected]>:
Quoted 34 lines · Stefan Priebe
Quoted 33 lines
Hi Jes,
Am 07.02.2012 17:09, schrieb Jes Sorensen:
Quoted 2 lines
/dev/md126looks 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/imsm0metadata=imsm UUID=24cdb70d:101f4c4b:23dfa5cb:3f176b6a ARRAY/dev/md/RaidStefan_0container=/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:imsmunused devices: <none>
so md126 is the real raid.
Quoted 1 line
What does your
/proc/mdstatsay?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]
Quoted 4 lines
Quoted 2 lines
md127 : inactive sdb[1](S) sda[0](S)
5544 blocks super external:imsmDoes 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
Quoted 11 lines · Stefan Priebe
Quoted 10 lines
Quoted 10 lines
Quoted 8 lines
Quoted 8 lines
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:imsmDoes 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
On 07/02/2012 17:42, Stefan Priebe wrote:
[...]
Quoted 2 lines
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.
Quoted 9 lines · On Tue, 07 Feb 2012 12:58:17 +0100 Stefan Priebe - Profihost AG…
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=yesBut 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
Quoted 33 lines
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
readonlyWhat's wrong? Thanks!
Stefan
--
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Hi Neil,
Am 08.02.2012 02:57, schrieb NeilBrown:
Quoted 9 lines
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
Quoted 7 lines
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
Quoted 20 lines · On Wed, 08 Feb 2012 09:30:42 +0100 Stefan Priebe - Profihost AG…
Hi Neil,
Am 08.02.2012 02:57, schrieb NeilBrown:
Quoted 9 lines
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
Quoted 7 lines
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.
Quoted 3 lines
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