Skip to contentSkip to conversation

auto-read-only question

DISCUSSION Albert Pauw 2 participants 2 messages Feb 25, 2011 MD RAID

lore
Share & tools
lore
#0 lore raw

Can anybody explain to me what "active (auto-read-only)" mean in
/proc/mdstats? So the full entry in /proc/mdstats is:

Personalities : [raid1]
md2 : active (auto-read-only) raid1 sdd[1] sde[0]

          1015808 blocks super external:/md127/0 [2/2] [UU]

md1 : active (auto-read-only) raid1 sdb[1] sdc[0]

          1015808 blocks super external:/md127/0 [2/2] [UU]

md127 : inactive sdb[4](S) sdf[3](S) sde[2](S) sdd[1](S) sdc[0](S)
163840 blocks super external:ddf

unused devices: <none>

(Yes, two raid1 sets in a ddf container).

Thanks,

Albert

#1 lore raw
Quoted 3 lines · Albert Pauw

Can anybody explain to me what "active (auto-read-only)" mean in
/proc/mdstats?

When the array is assembled, it's set in "auto-read-only" mode. As soon as anything tries to write to it, it gets set to normal write mode (or you can trigger this manually by doing "mdadm -w" on the array). I'm not sure why this is done - possibly it make it simpler for md to skip running various internal processes on that array (as it knows that the array isn't being dirtied).

I usually see this with swap arrays - most filesystems will immediately open the array in read/write mode, so trigger the switch.

Cheers,
Robin

Signature · 4 lines
     ___        
    ( ' }     |       Robin Hill        <[email protected]> |
   / / )      | Little Jim says ....                            |
  // !!       |      "He fallen in de water !!"                 |