Re: Understanding raid array status: Active vs Clean

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sat, 28 Jun 2014 05:01:00 +0200 George Duffield
<forumscollective@xxxxxxxxx> wrote:

> >> > changing the value to 0.500:
> >> > # echo 0.503 > /sys/block/md0/md/safe_mode_delay
> >> >
> >> > makes no difference to the array state.
> >
> > What if you write a smaller number?  e.g. 0.1
> 
> No change to array state.
> 
> > What does /sys/block/md0/md/array_state show?
> 
> Funnily enough, it shows Clean


Ahh - I found it.
In get_array_info() in drivers/md/md.c:

	if (mddev->in_sync)
		info.state = (1<<MD_SB_CLEAN);
	if (mddev->bitmap && mddev->bitmap_info.offset)
		info.state = (1<<MD_SB_BITMAP_PRESENT);


that last line should be "|=".

Because you have a bitmap, the 'clean' state is being hidden.

Though if you have a bitmap, the 'clean' state isn't really important because
the bitmap knows which regions are 'clean' and which are not.

But it should be fixed.  I'll send a patch next week.

Thanks for persisting.

NeilBrown

Attachment: signature.asc
Description: PGP signature


[Index of Archives]     [Linux RAID Wiki]     [ATA RAID]     [Linux SCSI Target Infrastructure]     [Linux Block]     [Linux IDE]     [Linux SCSI]     [Linux Hams]     [Device Mapper]     [Device Mapper Cryptographics]     [Kernel]     [Linux Admin]     [Linux Net]     [GFS]     [RPM]     [git]     [Yosemite Forum]


  Powered by Linux