linux-raid.vger.kernel.org archive mirror
 help / color / mirror / Atom feed
* Checkarray doesn't seem to do anything
@ 2016-03-01 21:09 rodman
  2016-03-01 21:33 ` Piergiorgio Sartor
  0 siblings, 1 reply; 12+ messages in thread
From: rodman @ 2016-03-01 21:09 UTC (permalink / raw)
  To: linux-raid


Hello,

I have a question as it pertains to the checkarray function of Mdadm.  I
can't actually get it to do anything.  I'm running Ubuntu 14.04.4 Server
LTS with the latest mdadm installed.  I have a single RAID 1 mirror
configured and working properly near as I can tell.  

I can force a check if I issue "echo check >
/sys/block/md0/md/sync_action" as root.  I can then see the status of
the check via /proc/mdstat or using the --detail switch on mdadm itself.

However, nothing happens if I type in:
/usr/share/mdadm/checkarray -a
or
/usr/share/mdadm/checkarray -a /dev/mdX
or
/usr/share/mdadm/checkarray -as

I've tried the commands as root and using sudo.  The array sits idle
after all of the above commands.  The only thing I can actually get
checkarray to perform is to give me the help output if I pass it -h.  I
have attached, below, the current status of the mdadm managed array. 
Doing some Googling I haven't been able to find anyone else that isn't
able to use the checkarray function so I must be doing something wrong.

Any ideas?

Rodman Frowert


cat /proc/mdstat shows:
------------------
rodman@nas:/usr/share/mdadm$ cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5]
[raid4] [raid10]
md0 : active raid1 sdc1[1] sdb1[0]
      5860389696 blocks super 1.2 [2/2] [UU]
-----------------

sudo mdadm --detail /dev/md0 shows:
------------------
rodman@nas:/usr/share/mdadm$ sudo mdadm --detail /dev/md0
/dev/md0:
        Version : 1.2
  Creation Time : Fri Feb 26 14:07:40 2016
     Raid Level : raid1
     Array Size : 5860389696 (5588.90 GiB 6001.04 GB)
  Used Dev Size : 5860389696 (5588.90 GiB 6001.04 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

    Update Time : Tue Mar  1 07:40:19 2016
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           Name : nas:0  (local to host nas)
           UUID : 4765e7df:0e1a6ad2:1321765f:a2d9f2c9
         Events : 164

    Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       1       8       33        1      active sync   /dev/sdc1

-----------------

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

* Re: Checkarray doesn't seem to do anything
  2016-03-01 21:09 Checkarray doesn't seem to do anything rodman
@ 2016-03-01 21:33 ` Piergiorgio Sartor
  0 siblings, 0 replies; 12+ messages in thread
From: Piergiorgio Sartor @ 2016-03-01 21:33 UTC (permalink / raw)
  To: rodman; +Cc: linux-raid

On Tue, Mar 01, 2016 at 02:09:44PM -0700, rodman@shellport.com wrote:
> 
> Hello,
> 
> I have a question as it pertains to the checkarray function of Mdadm.  I
> can't actually get it to do anything.  I'm running Ubuntu 14.04.4 Server
> LTS with the latest mdadm installed.  I have a single RAID 1 mirror
> configured and working properly near as I can tell.  
> 
> I can force a check if I issue "echo check >
> /sys/block/md0/md/sync_action" as root.  I can then see the status of
> the check via /proc/mdstat or using the --detail switch on mdadm itself.
> 
> However, nothing happens if I type in:
> /usr/share/mdadm/checkarray -a
> or
> /usr/share/mdadm/checkarray -a /dev/mdX
> or
> /usr/share/mdadm/checkarray -as
> 
> I've tried the commands as root and using sudo.  The array sits idle
> after all of the above commands.  The only thing I can actually get
> checkarray to perform is to give me the help output if I pass it -h.  I
> have attached, below, the current status of the mdadm managed array. 
> Doing some Googling I haven't been able to find anyone else that isn't
> able to use the checkarray function so I must be doing something wrong.
> 
> Any ideas?

Well, yes, I've the same problem.

Ubuntu 14.04.x with kernel 3.13, "checkarray" works.
Ubuntu 14.04.x with kernel 4.11 (I think), "checkarray"
does not work.

The script runs with "dash" (not "bash") and it has
a "read cur_status < something_from_sysfs" in order to check
the array status.
With kernel 3.13, the "read" returns the proper value,
with kernel 4.11 (I think) the very same "read" exits
the script without any message or else.

One option is to use "bash", that is change the top
of the script from: #!/bin/sh to #!/bin/bash

Another is to change the "read", with a "cat", that is
something like: cur_status=$( cat something_from_sysfs )

You can check yourself, there is only one "read" in
the script (if I recall correctly).

Hope this helps,

bye,

pg

> 
> Rodman Frowert
> 

> 
> cat /proc/mdstat shows:
> ------------------
> rodman@nas:/usr/share/mdadm$ cat /proc/mdstat
> Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5]
> [raid4] [raid10]
> md0 : active raid1 sdc1[1] sdb1[0]
>       5860389696 blocks super 1.2 [2/2] [UU]
> -----------------
> 
> sudo mdadm --detail /dev/md0 shows:
> ------------------
> rodman@nas:/usr/share/mdadm$ sudo mdadm --detail /dev/md0
> /dev/md0:
>         Version : 1.2
>   Creation Time : Fri Feb 26 14:07:40 2016
>      Raid Level : raid1
>      Array Size : 5860389696 (5588.90 GiB 6001.04 GB)
>   Used Dev Size : 5860389696 (5588.90 GiB 6001.04 GB)
>    Raid Devices : 2
>   Total Devices : 2
>     Persistence : Superblock is persistent
> 
>     Update Time : Tue Mar  1 07:40:19 2016
>           State : clean
>  Active Devices : 2
> Working Devices : 2
>  Failed Devices : 0
>   Spare Devices : 0
> 
>            Name : nas:0  (local to host nas)
>            UUID : 4765e7df:0e1a6ad2:1321765f:a2d9f2c9
>          Events : 164
> 
>     Number   Major   Minor   RaidDevice State
>        0       8       17        0      active sync   /dev/sdb1
>        1       8       33        1      active sync   /dev/sdc1
> 
> -----------------
> --
> 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

-- 

piergiorgio

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

* RE: Checkarray doesn't seem to do anything
@ 2016-03-01 21:57 rodman
  2016-03-01 22:25 ` Piergiorgio Sartor
  0 siblings, 1 reply; 12+ messages in thread
From: rodman @ 2016-03-01 21:57 UTC (permalink / raw)
  To: linux-raid

Thank you for that information. My kernel is 4.2.0.

Is this it's intended behavior or is it simply a bug that has not been
corrected?

I only bring this up as nearly all mdadm config tutorials at some point
mention the checkarray function.  They also point out that checkarray is
also auto configured in the cron tab (cron.d) to run once a month.  But
of course, if checkarray doesn't work then people may think it is
running once a month when it really isn't.


Rodman Frowert  -------- Original Message --------
 Subject: Re: Checkarray doesn't seem to do anything
 From: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>
 Date: Tue, March 01, 2016 3:33 pm
 To: rodman@shellport.com
 Cc: linux-raid@vger.kernel.org
 
 On Tue, Mar 01, 2016 at 02:09:44PM -0700, rodman@shellport.com wrote:
 > 
 > Hello,
 > 
 > I have a question as it pertains to the checkarray function of Mdadm.
I
 > can't actually get it to do anything. I'm running Ubuntu 14.04.4
Server
 > LTS with the latest mdadm installed. I have a single RAID 1 mirror
 > configured and working properly near as I can tell. 
 > 
 > I can force a check if I issue "echo check >
 > /sys/block/md0/md/sync_action" as root. I can then see the status of
 > the check via /proc/mdstat or using the --detail switch on mdadm
itself.
 > 
 > However, nothing happens if I type in:
 > /usr/share/mdadm/checkarray -a
 > or
 > /usr/share/mdadm/checkarray -a /dev/mdX
 > or
 > /usr/share/mdadm/checkarray -as
 > 
 > I've tried the commands as root and using sudo. The array sits idle
 > after all of the above commands. The only thing I can actually get
 > checkarray to perform is to give me the help output if I pass it -h.
I
 > have attached, below, the current status of the mdadm managed array. 
 > Doing some Googling I haven't been able to find anyone else that
isn't
 > able to use the checkarray function so I must be doing something
wrong.
 > 
 > Any ideas?
 
 Well, yes, I've the same problem.
 
 Ubuntu 14.04.x with kernel 3.13, "checkarray" works.
 Ubuntu 14.04.x with kernel 4.11 (I think), "checkarray"
 does not work.
 
 The script runs with "dash" (not "bash") and it has
 a "read cur_status < something_from_sysfs" in order to check
 the array status.
 With kernel 3.13, the "read" returns the proper value,
 with kernel 4.11 (I think) the very same "read" exits
 the script without any message or else.
 
 One option is to use "bash", that is change the top
 of the script from: #!/bin/sh to #!/bin/bash
 
 Another is to change the "read", with a "cat", that is
 something like: cur_status=$( cat something_from_sysfs )
 
 You can check yourself, there is only one "read" in
 the script (if I recall correctly).
 
 Hope this helps,
 
 bye,
 
 pg
 
 > 
 > Rodman Frowert
 > 
 
 > 
 > cat /proc/mdstat shows:
 > ------------------
 > rodman@nas:/usr/share/mdadm$ cat /proc/mdstat
 > Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5]
 > [raid4] [raid10]
 > md0 : active raid1 sdc1[1] sdb1[0]
 > 5860389696 blocks super 1.2 [2/2] [UU]
 > -----------------
 > 
 > sudo mdadm --detail /dev/md0 shows:
 > ------------------
 > rodman@nas:/usr/share/mdadm$ sudo mdadm --detail /dev/md0
 > /dev/md0:
 > Version : 1.2
 > Creation Time : Fri Feb 26 14:07:40 2016
 > Raid Level : raid1
 > Array Size : 5860389696 (5588.90 GiB 6001.04 GB)
 > Used Dev Size : 5860389696 (5588.90 GiB 6001.04 GB)
 > Raid Devices : 2
 > Total Devices : 2
 > Persistence : Superblock is persistent
 > 
 > Update Time : Tue Mar 1 07:40:19 2016
 > State : clean
 > Active Devices : 2
 > Working Devices : 2
 > Failed Devices : 0
 > Spare Devices : 0
 > 
 > Name : nas:0 (local to host nas)
 > UUID : 4765e7df:0e1a6ad2:1321765f:a2d9f2c9
 > Events : 164
 > 
 > Number Major Minor RaidDevice State
 > 0 8 17 0 active sync /dev/sdb1
 > 1 8 33 1 active sync /dev/sdc1
 > 
 > -----------------
 > --
 > 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
 
 -- 
 
 piergiorgio
 --
 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

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

* Re: Checkarray doesn't seem to do anything
  2016-03-01 21:57 rodman
@ 2016-03-01 22:25 ` Piergiorgio Sartor
  0 siblings, 0 replies; 12+ messages in thread
From: Piergiorgio Sartor @ 2016-03-01 22:25 UTC (permalink / raw)
  To: rodman; +Cc: linux-raid

On Tue, Mar 01, 2016 at 02:57:21PM -0700, rodman@shellport.com wrote:
> Thank you for that information. My kernel is 4.2.0.

I guess the problem is the same.

> 
> Is this it's intended behavior or is it simply a bug that has not been
> corrected?

Well, I think it is a bug.
I'm not sure if "dash" bug or kernel bug.
I suspect "dash", since "bash" works...

> 
> I only bring this up as nearly all mdadm config tutorials at some point
> mention the checkarray function.  They also point out that checkarray is
> also auto configured in the cron tab (cron.d) to run once a month.  But
> of course, if checkarray doesn't work then people may think it is
> running once a month when it really isn't.

Exactly!
I've some Ubuntu 14.04.x with old kernel, and one
with new kernel.
This one has a "weak" HDD in RAID (one / some blocks
waiting for relocation).
In my sytems the check occurs weekly, but it did not!
Tried from command line to no avail...
Debugging the script led to the previous result.

I'm not sure, maybe someone should file a bug, but I
have not to much faith in Ubuntu md/mdadm support.
In the past they were slow or no reacting, and "mdadm"
was always an obsolete version (like it is in 14.04.x).
Maybe Debian could be a better place, not sure.

bye,

pg

> 
> 
> Rodman Frowert  -------- Original Message --------
>  Subject: Re: Checkarray doesn't seem to do anything
>  From: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>
>  Date: Tue, March 01, 2016 3:33 pm
>  To: rodman@shellport.com
>  Cc: linux-raid@vger.kernel.org
>  
>  On Tue, Mar 01, 2016 at 02:09:44PM -0700, rodman@shellport.com wrote:
>  > 
>  > Hello,
>  > 
>  > I have a question as it pertains to the checkarray function of Mdadm.
> I
>  > can't actually get it to do anything. I'm running Ubuntu 14.04.4
> Server
>  > LTS with the latest mdadm installed. I have a single RAID 1 mirror
>  > configured and working properly near as I can tell. 
>  > 
>  > I can force a check if I issue "echo check >
>  > /sys/block/md0/md/sync_action" as root. I can then see the status of
>  > the check via /proc/mdstat or using the --detail switch on mdadm
> itself.
>  > 
>  > However, nothing happens if I type in:
>  > /usr/share/mdadm/checkarray -a
>  > or
>  > /usr/share/mdadm/checkarray -a /dev/mdX
>  > or
>  > /usr/share/mdadm/checkarray -as
>  > 
>  > I've tried the commands as root and using sudo. The array sits idle
>  > after all of the above commands. The only thing I can actually get
>  > checkarray to perform is to give me the help output if I pass it -h.
> I
>  > have attached, below, the current status of the mdadm managed array. 
>  > Doing some Googling I haven't been able to find anyone else that
> isn't
>  > able to use the checkarray function so I must be doing something
> wrong.
>  > 
>  > Any ideas?
>  
>  Well, yes, I've the same problem.
>  
>  Ubuntu 14.04.x with kernel 3.13, "checkarray" works.
>  Ubuntu 14.04.x with kernel 4.11 (I think), "checkarray"
>  does not work.
>  
>  The script runs with "dash" (not "bash") and it has
>  a "read cur_status < something_from_sysfs" in order to check
>  the array status.
>  With kernel 3.13, the "read" returns the proper value,
>  with kernel 4.11 (I think) the very same "read" exits
>  the script without any message or else.
>  
>  One option is to use "bash", that is change the top
>  of the script from: #!/bin/sh to #!/bin/bash
>  
>  Another is to change the "read", with a "cat", that is
>  something like: cur_status=$( cat something_from_sysfs )
>  
>  You can check yourself, there is only one "read" in
>  the script (if I recall correctly).
>  
>  Hope this helps,
>  
>  bye,
>  
>  pg
>  
>  > 
>  > Rodman Frowert
>  > 
>  
>  > 
>  > cat /proc/mdstat shows:
>  > ------------------
>  > rodman@nas:/usr/share/mdadm$ cat /proc/mdstat
>  > Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5]
>  > [raid4] [raid10]
>  > md0 : active raid1 sdc1[1] sdb1[0]
>  > 5860389696 blocks super 1.2 [2/2] [UU]
>  > -----------------
>  > 
>  > sudo mdadm --detail /dev/md0 shows:
>  > ------------------
>  > rodman@nas:/usr/share/mdadm$ sudo mdadm --detail /dev/md0
>  > /dev/md0:
>  > Version : 1.2
>  > Creation Time : Fri Feb 26 14:07:40 2016
>  > Raid Level : raid1
>  > Array Size : 5860389696 (5588.90 GiB 6001.04 GB)
>  > Used Dev Size : 5860389696 (5588.90 GiB 6001.04 GB)
>  > Raid Devices : 2
>  > Total Devices : 2
>  > Persistence : Superblock is persistent
>  > 
>  > Update Time : Tue Mar 1 07:40:19 2016
>  > State : clean
>  > Active Devices : 2
>  > Working Devices : 2
>  > Failed Devices : 0
>  > Spare Devices : 0
>  > 
>  > Name : nas:0 (local to host nas)
>  > UUID : 4765e7df:0e1a6ad2:1321765f:a2d9f2c9
>  > Events : 164
>  > 
>  > Number Major Minor RaidDevice State
>  > 0 8 17 0 active sync /dev/sdb1
>  > 1 8 33 1 active sync /dev/sdc1
>  > 
>  > -----------------
>  > --
>  > 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
>  
>  -- 
>  
>  piergiorgio
>  --
>  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
> --
> 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

-- 

piergiorgio

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

* RE: Checkarray doesn't seem to do anything
@ 2016-03-01 23:00 rodman
  0 siblings, 0 replies; 12+ messages in thread
From: rodman @ 2016-03-01 23:00 UTC (permalink / raw)
  To: Piergiorgio Sartor; +Cc: linux-raid

Looks like it was reported in 2015:
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787950

Is Debian the sole maintainer for mdadm now?

Regards,

Rodman Frowert



-------- Original Message --------
Subject: Re: Checkarray doesn't seem to do anything
From: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>
Date: Tue, March 01, 2016 4:25 pm
To: rodman@shellport.com
Cc: linux-raid@vger.kernel.org

On Tue, Mar 01, 2016 at 02:57:21PM -0700, rodman@shellport.com wrote:
> Thank you for that information. My kernel is 4.2.0.

I guess the problem is the same.

> 
> Is this it's intended behavior or is it simply a bug that has not been
> corrected?

Well, I think it is a bug.
I'm not sure if "dash" bug or kernel bug.
I suspect "dash", since "bash" works...

> 
> I only bring this up as nearly all mdadm config tutorials at some point
> mention the checkarray function. They also point out that checkarray is
> also auto configured in the cron tab (cron.d) to run once a month. But
> of course, if checkarray doesn't work then people may think it is
> running once a month when it really isn't.

Exactly!
I've some Ubuntu 14.04.x with old kernel, and one
with new kernel.
This one has a "weak" HDD in RAID (one / some blocks
waiting for relocation).
In my sytems the check occurs weekly, but it did not!
Tried from command line to no avail...
Debugging the script led to the previous result.

I'm not sure, maybe someone should file a bug, but I
have not to much faith in Ubuntu md/mdadm support.
In the past they were slow or no reacting, and "mdadm"
was always an obsolete version (like it is in 14.04.x).
Maybe Debian could be a better place, not sure.

bye,

pg

> 
> 
> Rodman Frowert -------- Original Message --------
> Subject: Re: Checkarray doesn't seem to do anything
> From: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>
> Date: Tue, March 01, 2016 3:33 pm
> To: rodman@shellport.com
> Cc: linux-raid@vger.kernel.org
> 
> On Tue, Mar 01, 2016 at 02:09:44PM -0700, rodman@shellport.com wrote:
> > 
> > Hello,
> > 
> > I have a question as it pertains to the checkarray function of Mdadm.
> I
> > can't actually get it to do anything. I'm running Ubuntu 14.04.4
> Server
> > LTS with the latest mdadm installed. I have a single RAID 1 mirror
> > configured and working properly near as I can tell. 
> > 
> > I can force a check if I issue "echo check >
> > /sys/block/md0/md/sync_action" as root. I can then see the status of
> > the check via /proc/mdstat or using the --detail switch on mdadm
> itself.
> > 
> > However, nothing happens if I type in:
> > /usr/share/mdadm/checkarray -a
> > or
> > /usr/share/mdadm/checkarray -a /dev/mdX
> > or
> > /usr/share/mdadm/checkarray -as
> > 
> > I've tried the commands as root and using sudo. The array sits idle
> > after all of the above commands. The only thing I can actually get
> > checkarray to perform is to give me the help output if I pass it -h.
> I
> > have attached, below, the current status of the mdadm managed array. 
> > Doing some Googling I haven't been able to find anyone else that
> isn't
> > able to use the checkarray function so I must be doing something
> wrong.
> > 
> > Any ideas?
> 
> Well, yes, I've the same problem.
> 
> Ubuntu 14.04.x with kernel 3.13, "checkarray" works.
> Ubuntu 14.04.x with kernel 4.11 (I think), "checkarray"
> does not work.
> 
> The script runs with "dash" (not "bash") and it has
> a "read cur_status < something_from_sysfs" in order to check
> the array status.
> With kernel 3.13, the "read" returns the proper value,
> with kernel 4.11 (I think) the very same "read" exits
> the script without any message or else.
> 
> One option is to use "bash", that is change the top
> of the script from: #!/bin/sh to #!/bin/bash
> 
> Another is to change the "read", with a "cat", that is
> something like: cur_status=$( cat something_from_sysfs )
> 
> You can check yourself, there is only one "read" in
> the script (if I recall correctly).
> 
> Hope this helps,
> 
> bye,
> 
> pg
> 
> > 
> > Rodman Frowert
> > 
> 
> > 
> > cat /proc/mdstat shows:
> > ------------------
> > rodman@nas:/usr/share/mdadm$ cat /proc/mdstat
> > Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5]
> > [raid4] [raid10]
> > md0 : active raid1 sdc1[1] sdb1[0]
> > 5860389696 blocks super 1.2 [2/2] [UU]
> > -----------------
> > 
> > sudo mdadm --detail /dev/md0 shows:
> > ------------------
> > rodman@nas:/usr/share/mdadm$ sudo mdadm --detail /dev/md0
> > /dev/md0:
> > Version : 1.2
> > Creation Time : Fri Feb 26 14:07:40 2016
> > Raid Level : raid1
> > Array Size : 5860389696 (5588.90 GiB 6001.04 GB)
> > Used Dev Size : 5860389696 (5588.90 GiB 6001.04 GB)
> > Raid Devices : 2
> > Total Devices : 2
> > Persistence : Superblock is persistent
> > 
> > Update Time : Tue Mar 1 07:40:19 2016
> > State : clean
> > Active Devices : 2
> > Working Devices : 2
> > Failed Devices : 0
> > Spare Devices : 0
> > 
> > Name : nas:0 (local to host nas)
> > UUID : 4765e7df:0e1a6ad2:1321765f:a2d9f2c9
> > Events : 164
> > 
> > Number Major Minor RaidDevice State
> > 0 8 17 0 active sync /dev/sdb1
> > 1 8 33 1 active sync /dev/sdc1
> > 
> > -----------------
> > --
> > 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
> 
> -- 
> 
> piergiorgio
> --
> 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
> --
> 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

-- 

piergiorgio

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

* RE: Checkarray doesn't seem to do anything
@ 2016-03-02  0:50 rodman
  2016-03-02 17:44 ` Piergiorgio Sartor
  0 siblings, 1 reply; 12+ messages in thread
From: rodman @ 2016-03-02  0:50 UTC (permalink / raw)
  To: Piergiorgio Sartor; +Cc: linux-raid


It appears this is not an Mdadm bug but is in fact kernel/dash issue as
you noted, Piergiorgio.

From the bug tracker here: 
https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787950

"This is a kernel/dash issue. In kernel 4.0, the md sysfs implementation
does not work with partial reads from /sys/block/md0/md/sync_action;
the read syscall returns the entire contents of the file even if you
try to read less. Dash has an inefficient implementation which reads
input one byte at a time, and fails when it hits the kernel
misbehavior."

The work around is what you said.  Substitute bash for sh at the
beginning of the script.  Unfortunately that doesn't work for me as I
get this error when trying to run checkarray now:
"checkarray: E: /sys/block/md0/md/sync_action not writeable."

I'll do some research to see what's that's about.  I'm glad to know its
not a Mdadm issue per say.

Rodman Frowert

-------- Original Message --------
Subject: Re: Checkarray doesn't seem to do anything
From: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>
Date: Tue, March 01, 2016 4:25 pm
To: rodman@shellport.com
Cc: linux-raid@vger.kernel.org

On Tue, Mar 01, 2016 at 02:57:21PM -0700, rodman@shellport.com wrote:
> Thank you for that information. My kernel is 4.2.0.

I guess the problem is the same.

> 
> Is this it's intended behavior or is it simply a bug that has not been
> corrected?

Well, I think it is a bug.
I'm not sure if "dash" bug or kernel bug.
I suspect "dash", since "bash" works...

> 
> I only bring this up as nearly all mdadm config tutorials at some point
> mention the checkarray function. They also point out that checkarray is
> also auto configured in the cron tab (cron.d) to run once a month. But
> of course, if checkarray doesn't work then people may think it is
> running once a month when it really isn't.

Exactly!
I've some Ubuntu 14.04.x with old kernel, and one
with new kernel.
This one has a "weak" HDD in RAID (one / some blocks
waiting for relocation).
In my sytems the check occurs weekly, but it did not!
Tried from command line to no avail...
Debugging the script led to the previous result.

I'm not sure, maybe someone should file a bug, but I
have not to much faith in Ubuntu md/mdadm support.
In the past they were slow or no reacting, and "mdadm"
was always an obsolete version (like it is in 14.04.x).
Maybe Debian could be a better place, not sure.

bye,

pg

> 
> 
> Rodman Frowert -------- Original Message --------
> Subject: Re: Checkarray doesn't seem to do anything
> From: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>
> Date: Tue, March 01, 2016 3:33 pm
> To: rodman@shellport.com
> Cc: linux-raid@vger.kernel.org
> 
> On Tue, Mar 01, 2016 at 02:09:44PM -0700, rodman@shellport.com wrote:
> > 
> > Hello,
> > 
> > I have a question as it pertains to the checkarray function of Mdadm.
> I
> > can't actually get it to do anything. I'm running Ubuntu 14.04.4
> Server
> > LTS with the latest mdadm installed. I have a single RAID 1 mirror
> > configured and working properly near as I can tell. 
> > 
> > I can force a check if I issue "echo check >
> > /sys/block/md0/md/sync_action" as root. I can then see the status of
> > the check via /proc/mdstat or using the --detail switch on mdadm
> itself.
> > 
> > However, nothing happens if I type in:
> > /usr/share/mdadm/checkarray -a
> > or
> > /usr/share/mdadm/checkarray -a /dev/mdX
> > or
> > /usr/share/mdadm/checkarray -as
> > 
> > I've tried the commands as root and using sudo. The array sits idle
> > after all of the above commands. The only thing I can actually get
> > checkarray to perform is to give me the help output if I pass it -h.
> I
> > have attached, below, the current status of the mdadm managed array. 
> > Doing some Googling I haven't been able to find anyone else that
> isn't
> > able to use the checkarray function so I must be doing something
> wrong.
> > 
> > Any ideas?
> 
> Well, yes, I've the same problem.
> 
> Ubuntu 14.04.x with kernel 3.13, "checkarray" works.
> Ubuntu 14.04.x with kernel 4.11 (I think), "checkarray"
> does not work.
> 
> The script runs with "dash" (not "bash") and it has
> a "read cur_status < something_from_sysfs" in order to check
> the array status.
> With kernel 3.13, the "read" returns the proper value,
> with kernel 4.11 (I think) the very same "read" exits
> the script without any message or else.
> 
> One option is to use "bash", that is change the top
> of the script from: #!/bin/sh to #!/bin/bash
> 
> Another is to change the "read", with a "cat", that is
> something like: cur_status=$( cat something_from_sysfs )
> 
> You can check yourself, there is only one "read" in
> the script (if I recall correctly).
> 
> Hope this helps,
> 
> bye,
> 
> pg
> 
> > 
> > Rodman Frowert
> > 
> 
> > 
> > cat /proc/mdstat shows:
> > ------------------
> > rodman@nas:/usr/share/mdadm$ cat /proc/mdstat
> > Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5]
> > [raid4] [raid10]
> > md0 : active raid1 sdc1[1] sdb1[0]
> > 5860389696 blocks super 1.2 [2/2] [UU]
> > -----------------
> > 
> > sudo mdadm --detail /dev/md0 shows:
> > ------------------
> > rodman@nas:/usr/share/mdadm$ sudo mdadm --detail /dev/md0
> > /dev/md0:
> > Version : 1.2
> > Creation Time : Fri Feb 26 14:07:40 2016
> > Raid Level : raid1
> > Array Size : 5860389696 (5588.90 GiB 6001.04 GB)
> > Used Dev Size : 5860389696 (5588.90 GiB 6001.04 GB)
> > Raid Devices : 2
> > Total Devices : 2
> > Persistence : Superblock is persistent
> > 
> > Update Time : Tue Mar 1 07:40:19 2016
> > State : clean
> > Active Devices : 2
> > Working Devices : 2
> > Failed Devices : 0
> > Spare Devices : 0
> > 
> > Name : nas:0 (local to host nas)
> > UUID : 4765e7df:0e1a6ad2:1321765f:a2d9f2c9
> > Events : 164
> > 
> > Number Major Minor RaidDevice State
> > 0 8 17 0 active sync /dev/sdb1
> > 1 8 33 1 active sync /dev/sdc1
> > 
> > -----------------
> > --
> > 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
> 
> -- 
> 
> piergiorgio
> --
> 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
> --
> 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

-- 

piergiorgio

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

* Re: Checkarray doesn't seem to do anything
  2016-03-02  0:50 rodman
@ 2016-03-02 17:44 ` Piergiorgio Sartor
  2016-03-02 17:47   ` Roman Mamedov
  0 siblings, 1 reply; 12+ messages in thread
From: Piergiorgio Sartor @ 2016-03-02 17:44 UTC (permalink / raw)
  To: rodman; +Cc: Piergiorgio Sartor, linux-raid

On Tue, Mar 01, 2016 at 05:50:09PM -0700, rodman@shellport.com wrote:
> 
> It appears this is not an Mdadm bug but is in fact kernel/dash issue as
> you noted, Piergiorgio.
> 
> >From the bug tracker here: 
> https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787950
> 
> "This is a kernel/dash issue. In kernel 4.0, the md sysfs implementation
> does not work with partial reads from /sys/block/md0/md/sync_action;
> the read syscall returns the entire contents of the file even if you
> try to read less. Dash has an inefficient implementation which reads
> input one byte at a time, and fails when it hits the kernel
> misbehavior."

Just tested:

dd if=/sys/block/md0/md/sync_action bs=1 count=1

On kernel 3.x I get "i", on kernel 4.x I get "idle"... :-)

> 
> The work around is what you said.  Substitute bash for sh at the
> beginning of the script.  Unfortunately that doesn't work for me as I
> get this error when trying to run checkarray now:
> "checkarray: E: /sys/block/md0/md/sync_action not writeable."

Well, first check the permissions with:

ls -l /sys/block/md0/md/sync_action

Then make sure you're root, otherwise it will
not be possible to write, of course.

bye,

pg

> 
> I'll do some research to see what's that's about.  I'm glad to know its
> not a Mdadm issue per say.
> 
> Rodman Frowert
> 
> -------- Original Message --------
> Subject: Re: Checkarray doesn't seem to do anything
> From: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>
> Date: Tue, March 01, 2016 4:25 pm
> To: rodman@shellport.com
> Cc: linux-raid@vger.kernel.org
> 
> On Tue, Mar 01, 2016 at 02:57:21PM -0700, rodman@shellport.com wrote:
> > Thank you for that information. My kernel is 4.2.0.
> 
> I guess the problem is the same.
> 
> > 
> > Is this it's intended behavior or is it simply a bug that has not been
> > corrected?
> 
> Well, I think it is a bug.
> I'm not sure if "dash" bug or kernel bug.
> I suspect "dash", since "bash" works...
> 
> > 
> > I only bring this up as nearly all mdadm config tutorials at some point
> > mention the checkarray function. They also point out that checkarray is
> > also auto configured in the cron tab (cron.d) to run once a month. But
> > of course, if checkarray doesn't work then people may think it is
> > running once a month when it really isn't.
> 
> Exactly!
> I've some Ubuntu 14.04.x with old kernel, and one
> with new kernel.
> This one has a "weak" HDD in RAID (one / some blocks
> waiting for relocation).
> In my sytems the check occurs weekly, but it did not!
> Tried from command line to no avail...
> Debugging the script led to the previous result.
> 
> I'm not sure, maybe someone should file a bug, but I
> have not to much faith in Ubuntu md/mdadm support.
> In the past they were slow or no reacting, and "mdadm"
> was always an obsolete version (like it is in 14.04.x).
> Maybe Debian could be a better place, not sure.
> 
> bye,
> 
> pg
> 
> > 
> > 
> > Rodman Frowert -------- Original Message --------
> > Subject: Re: Checkarray doesn't seem to do anything
> > From: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>
> > Date: Tue, March 01, 2016 3:33 pm
> > To: rodman@shellport.com
> > Cc: linux-raid@vger.kernel.org
> > 
> > On Tue, Mar 01, 2016 at 02:09:44PM -0700, rodman@shellport.com wrote:
> > > 
> > > Hello,
> > > 
> > > I have a question as it pertains to the checkarray function of Mdadm.
> > I
> > > can't actually get it to do anything. I'm running Ubuntu 14.04.4
> > Server
> > > LTS with the latest mdadm installed. I have a single RAID 1 mirror
> > > configured and working properly near as I can tell. 
> > > 
> > > I can force a check if I issue "echo check >
> > > /sys/block/md0/md/sync_action" as root. I can then see the status of
> > > the check via /proc/mdstat or using the --detail switch on mdadm
> > itself.
> > > 
> > > However, nothing happens if I type in:
> > > /usr/share/mdadm/checkarray -a
> > > or
> > > /usr/share/mdadm/checkarray -a /dev/mdX
> > > or
> > > /usr/share/mdadm/checkarray -as
> > > 
> > > I've tried the commands as root and using sudo. The array sits idle
> > > after all of the above commands. The only thing I can actually get
> > > checkarray to perform is to give me the help output if I pass it -h.
> > I
> > > have attached, below, the current status of the mdadm managed array. 
> > > Doing some Googling I haven't been able to find anyone else that
> > isn't
> > > able to use the checkarray function so I must be doing something
> > wrong.
> > > 
> > > Any ideas?
> > 
> > Well, yes, I've the same problem.
> > 
> > Ubuntu 14.04.x with kernel 3.13, "checkarray" works.
> > Ubuntu 14.04.x with kernel 4.11 (I think), "checkarray"
> > does not work.
> > 
> > The script runs with "dash" (not "bash") and it has
> > a "read cur_status < something_from_sysfs" in order to check
> > the array status.
> > With kernel 3.13, the "read" returns the proper value,
> > with kernel 4.11 (I think) the very same "read" exits
> > the script without any message or else.
> > 
> > One option is to use "bash", that is change the top
> > of the script from: #!/bin/sh to #!/bin/bash
> > 
> > Another is to change the "read", with a "cat", that is
> > something like: cur_status=$( cat something_from_sysfs )
> > 
> > You can check yourself, there is only one "read" in
> > the script (if I recall correctly).
> > 
> > Hope this helps,
> > 
> > bye,
> > 
> > pg
> > 
> > > 
> > > Rodman Frowert
> > > 
> > 
> > > 
> > > cat /proc/mdstat shows:
> > > ------------------
> > > rodman@nas:/usr/share/mdadm$ cat /proc/mdstat
> > > Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5]
> > > [raid4] [raid10]
> > > md0 : active raid1 sdc1[1] sdb1[0]
> > > 5860389696 blocks super 1.2 [2/2] [UU]
> > > -----------------
> > > 
> > > sudo mdadm --detail /dev/md0 shows:
> > > ------------------
> > > rodman@nas:/usr/share/mdadm$ sudo mdadm --detail /dev/md0
> > > /dev/md0:
> > > Version : 1.2
> > > Creation Time : Fri Feb 26 14:07:40 2016
> > > Raid Level : raid1
> > > Array Size : 5860389696 (5588.90 GiB 6001.04 GB)
> > > Used Dev Size : 5860389696 (5588.90 GiB 6001.04 GB)
> > > Raid Devices : 2
> > > Total Devices : 2
> > > Persistence : Superblock is persistent
> > > 
> > > Update Time : Tue Mar 1 07:40:19 2016
> > > State : clean
> > > Active Devices : 2
> > > Working Devices : 2
> > > Failed Devices : 0
> > > Spare Devices : 0
> > > 
> > > Name : nas:0 (local to host nas)
> > > UUID : 4765e7df:0e1a6ad2:1321765f:a2d9f2c9
> > > Events : 164
> > > 
> > > Number Major Minor RaidDevice State
> > > 0 8 17 0 active sync /dev/sdb1
> > > 1 8 33 1 active sync /dev/sdc1
> > > 
> > > -----------------
> > > --
> > > 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
> > 
> > -- 
> > 
> > piergiorgio
> > --
> > 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
> > --
> > 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
> 
> -- 
> 
> piergiorgio

-- 

piergiorgio

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

* Re: Checkarray doesn't seem to do anything
  2016-03-02 17:44 ` Piergiorgio Sartor
@ 2016-03-02 17:47   ` Roman Mamedov
  2016-03-02 18:08     ` Piergiorgio Sartor
  0 siblings, 1 reply; 12+ messages in thread
From: Roman Mamedov @ 2016-03-02 17:47 UTC (permalink / raw)
  To: Piergiorgio Sartor; +Cc: rodman, linux-raid

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

On Wed, 2 Mar 2016 18:44:54 +0100
Piergiorgio Sartor <piergiorgio.sartor@nexgo.de> wrote:

> Just tested:
> 
> dd if=/sys/block/md0/md/sync_action bs=1 count=1
> 
> On kernel 3.x I get "i", on kernel 4.x I get "idle"... :-)

I am getting 'i' on 4.4.1.

# dd if=/sys/block/md0/md/sync_action bs=1 count=1
i1+0 records in
1+0 records out
1 byte (1 B) copied, 0.000218199 s, 4.6 kB/s

-- 
With respect,
Roman

[-- Attachment #2: OpenPGP digital signature --]
[-- Type: application/pgp-signature, Size: 181 bytes --]

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

* RE: Checkarray doesn't seem to do anything
@ 2016-03-02 17:56 rodman
  0 siblings, 0 replies; 12+ messages in thread
From: rodman @ 2016-03-02 17:56 UTC (permalink / raw)
  To: Piergiorgio Sartor; +Cc: linux-raid

Yup, I wasn't root.  My fault!


Rodman
  -------- Original Message --------
 Subject: Re: Checkarray doesn't seem to do anything
 From: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>
 Date: Wed, March 02, 2016 11:44 am
 To: rodman@shellport.com
 Cc: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>,
 linux-raid@vger.kernel.org
 
 On Tue, Mar 01, 2016 at 05:50:09PM -0700, rodman@shellport.com wrote:
 > 
 > It appears this is not an Mdadm bug but is in fact kernel/dash issue
as
 > you noted, Piergiorgio.
 > 
 > >From the bug tracker here: 
 > https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787950
 > 
 > "This is a kernel/dash issue. In kernel 4.0, the md sysfs
implementation
 > does not work with partial reads from /sys/block/md0/md/sync_action;
 > the read syscall returns the entire contents of the file even if you
 > try to read less. Dash has an inefficient implementation which reads
 > input one byte at a time, and fails when it hits the kernel
 > misbehavior."
 
 Just tested:
 
 dd if=/sys/block/md0/md/sync_action bs=1 count=1
 
 On kernel 3.x I get "i", on kernel 4.x I get "idle"... :-)
 
 > 
 > The work around is what you said. Substitute bash for sh at the
 > beginning of the script. Unfortunately that doesn't work for me as I
 > get this error when trying to run checkarray now:
 > "checkarray: E: /sys/block/md0/md/sync_action not writeable."
 
 Well, first check the permissions with:
 
 ls -l /sys/block/md0/md/sync_action
 
 Then make sure you're root, otherwise it will
 not be possible to write, of course.
 
 bye,
 
 pg
 
 > 
 > I'll do some research to see what's that's about. I'm glad to know
its
 > not a Mdadm issue per say.
 > 
 > Rodman Frowert
 > 
 > -------- Original Message --------
 > Subject: Re: Checkarray doesn't seem to do anything
 > From: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>
 > Date: Tue, March 01, 2016 4:25 pm
 > To: rodman@shellport.com
 > Cc: linux-raid@vger.kernel.org
 > 
 > On Tue, Mar 01, 2016 at 02:57:21PM -0700, rodman@shellport.com wrote:
 > > Thank you for that information. My kernel is 4.2.0.
 > 
 > I guess the problem is the same.
 > 
 > > 
 > > Is this it's intended behavior or is it simply a bug that has not
been
 > > corrected?
 > 
 > Well, I think it is a bug.
 > I'm not sure if "dash" bug or kernel bug.
 > I suspect "dash", since "bash" works...
 > 
 > > 
 > > I only bring this up as nearly all mdadm config tutorials at some
point
 > > mention the checkarray function. They also point out that
checkarray is
 > > also auto configured in the cron tab (cron.d) to run once a month.
But
 > > of course, if checkarray doesn't work then people may think it is
 > > running once a month when it really isn't.
 > 
 > Exactly!
 > I've some Ubuntu 14.04.x with old kernel, and one
 > with new kernel.
 > This one has a "weak" HDD in RAID (one / some blocks
 > waiting for relocation).
 > In my sytems the check occurs weekly, but it did not!
 > Tried from command line to no avail...
 > Debugging the script led to the previous result.
 > 
 > I'm not sure, maybe someone should file a bug, but I
 > have not to much faith in Ubuntu md/mdadm support.
 > In the past they were slow or no reacting, and "mdadm"
 > was always an obsolete version (like it is in 14.04.x).
 > Maybe Debian could be a better place, not sure.
 > 
 > bye,
 > 
 > pg
 > 
 > > 
 > > 
 > > Rodman Frowert -------- Original Message --------
 > > Subject: Re: Checkarray doesn't seem to do anything
 > > From: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>
 > > Date: Tue, March 01, 2016 3:33 pm
 > > To: rodman@shellport.com
 > > Cc: linux-raid@vger.kernel.org
 > > 
 > > On Tue, Mar 01, 2016 at 02:09:44PM -0700, rodman@shellport.com
wrote:
 > > > 
 > > > Hello,
 > > > 
 > > > I have a question as it pertains to the checkarray function of
Mdadm.
 > > I
 > > > can't actually get it to do anything. I'm running Ubuntu 14.04.4
 > > Server
 > > > LTS with the latest mdadm installed. I have a single RAID 1
mirror
 > > > configured and working properly near as I can tell. 
 > > > 
 > > > I can force a check if I issue "echo check >
 > > > /sys/block/md0/md/sync_action" as root. I can then see the status
of
 > > > the check via /proc/mdstat or using the --detail switch on mdadm
 > > itself.
 > > > 
 > > > However, nothing happens if I type in:
 > > > /usr/share/mdadm/checkarray -a
 > > > or
 > > > /usr/share/mdadm/checkarray -a /dev/mdX
 > > > or
 > > > /usr/share/mdadm/checkarray -as
 > > > 
 > > > I've tried the commands as root and using sudo. The array sits
idle
 > > > after all of the above commands. The only thing I can actually
get
 > > > checkarray to perform is to give me the help output if I pass it
-h.
 > > I
 > > > have attached, below, the current status of the mdadm managed
array. 
 > > > Doing some Googling I haven't been able to find anyone else that
 > > isn't
 > > > able to use the checkarray function so I must be doing something
 > > wrong.
 > > > 
 > > > Any ideas?
 > > 
 > > Well, yes, I've the same problem.
 > > 
 > > Ubuntu 14.04.x with kernel 3.13, "checkarray" works.
 > > Ubuntu 14.04.x with kernel 4.11 (I think), "checkarray"
 > > does not work.
 > > 
 > > The script runs with "dash" (not "bash") and it has
 > > a "read cur_status < something_from_sysfs" in order to check
 > > the array status.
 > > With kernel 3.13, the "read" returns the proper value,
 > > with kernel 4.11 (I think) the very same "read" exits
 > > the script without any message or else.
 > > 
 > > One option is to use "bash", that is change the top
 > > of the script from: #!/bin/sh to #!/bin/bash
 > > 
 > > Another is to change the "read", with a "cat", that is
 > > something like: cur_status=$( cat something_from_sysfs )
 > > 
 > > You can check yourself, there is only one "read" in
 > > the script (if I recall correctly).
 > > 
 > > Hope this helps,
 > > 
 > > bye,
 > > 
 > > pg
 > > 
 > > > 
 > > > Rodman Frowert
 > > > 
 > > 
 > > > 
 > > > cat /proc/mdstat shows:
 > > > ------------------
 > > > rodman@nas:/usr/share/mdadm$ cat /proc/mdstat
 > > > Personalities : [linear] [multipath] [raid0] [raid1] [raid6]
[raid5]
 > > > [raid4] [raid10]
 > > > md0 : active raid1 sdc1[1] sdb1[0]
 > > > 5860389696 blocks super 1.2 [2/2] [UU]
 > > > -----------------
 > > > 
 > > > sudo mdadm --detail /dev/md0 shows:
 > > > ------------------
 > > > rodman@nas:/usr/share/mdadm$ sudo mdadm --detail /dev/md0
 > > > /dev/md0:
 > > > Version : 1.2
 > > > Creation Time : Fri Feb 26 14:07:40 2016
 > > > Raid Level : raid1
 > > > Array Size : 5860389696 (5588.90 GiB 6001.04 GB)
 > > > Used Dev Size : 5860389696 (5588.90 GiB 6001.04 GB)
 > > > Raid Devices : 2
 > > > Total Devices : 2
 > > > Persistence : Superblock is persistent
 > > > 
 > > > Update Time : Tue Mar 1 07:40:19 2016
 > > > State : clean
 > > > Active Devices : 2
 > > > Working Devices : 2
 > > > Failed Devices : 0
 > > > Spare Devices : 0
 > > > 
 > > > Name : nas:0 (local to host nas)
 > > > UUID : 4765e7df:0e1a6ad2:1321765f:a2d9f2c9
 > > > Events : 164
 > > > 
 > > > Number Major Minor RaidDevice State
 > > > 0 8 17 0 active sync /dev/sdb1
 > > > 1 8 33 1 active sync /dev/sdc1
 > > > 
 > > > -----------------
 > > > --
 > > > 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
 > > 
 > > -- 
 > > 
 > > piergiorgio
 > > --
 > > 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
 > > --
 > > 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
 > 
 > -- 
 > 
 > piergiorgio
 
 -- 
 
 piergiorgio
 --
 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

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

* Re: Checkarray doesn't seem to do anything
  2016-03-02 17:47   ` Roman Mamedov
@ 2016-03-02 18:08     ` Piergiorgio Sartor
  0 siblings, 0 replies; 12+ messages in thread
From: Piergiorgio Sartor @ 2016-03-02 18:08 UTC (permalink / raw)
  To: Roman Mamedov; +Cc: Piergiorgio Sartor, rodman, linux-raid

On Wed, Mar 02, 2016 at 10:47:45PM +0500, Roman Mamedov wrote:
> On Wed, 2 Mar 2016 18:44:54 +0100
> Piergiorgio Sartor <piergiorgio.sartor@nexgo.de> wrote:
> 
> > Just tested:
> > 
> > dd if=/sys/block/md0/md/sync_action bs=1 count=1
> > 
> > On kernel 3.x I get "i", on kernel 4.x I get "idle"... :-)
> 
> I am getting 'i' on 4.4.1.
> 
> # dd if=/sys/block/md0/md/sync_action bs=1 count=1
> i1+0 records in
> 1+0 records out
> 1 byte (1 B) copied, 0.000218199 s, 4.6 kB/s

Interesting.
I tested kernel 4.1.x (Ubuntu) and now 4.3.6 (Fedora 22).
They both deliver "idle".
On kernel 4.4.2 (Fedora 23) I get back the "i" alone...

Really funny... :-)

bye,

> 
> -- 
> With respect,
> Roman



-- 

piergiorgio

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

* RE: Checkarray doesn't seem to do anything
@ 2016-03-02 19:53 rodman
  2016-09-05  8:15 ` Mikael Abrahamsson
  0 siblings, 1 reply; 12+ messages in thread
From: rodman @ 2016-03-02 19:53 UTC (permalink / raw)
  To: linux-raid

I, too, get idle on 4.2.0-30.

----
rodman@nas:/media/nas$ dd if=/sys/block/md0/md/sync_action bs=1 count=1
idle
1+0 records in
0+1 records out
5 bytes (5 B) copied, 7.9147e-05 s, 63.2 kB/s
-------

Regards,

Rodman Frowert

-------- Original Message --------
Subject: Re: Checkarray doesn't seem to do anything
From: Roman Mamedov <rm@romanrm.net>
Date: Wed, March 02, 2016 11:47 am
To: Piergiorgio Sartor <piergiorgio.sartor@nexgo.de>
Cc: rodman@shellport.com, linux-raid@vger.kernel.org

On Wed, 2 Mar 2016 18:44:54 +0100
Piergiorgio Sartor <piergiorgio.sartor@nexgo.de> wrote:

> Just tested:
> 
> dd if=/sys/block/md0/md/sync_action bs=1 count=1
> 
> On kernel 3.x I get "i", on kernel 4.x I get "idle"... :-)

I am getting 'i' on 4.4.1.

# dd if=/sys/block/md0/md/sync_action bs=1 count=1
i1+0 records in
1+0 records out
1 byte (1 B) copied, 0.000218199 s, 4.6 kB/s

-- 
With respect,
Roman

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

* RE: Checkarray doesn't seem to do anything
  2016-03-02 19:53 rodman
@ 2016-09-05  8:15 ` Mikael Abrahamsson
  0 siblings, 0 replies; 12+ messages in thread
From: Mikael Abrahamsson @ 2016-09-05  8:15 UTC (permalink / raw)
  To: linux-raid


I just wanted to say I ran into this on Ubuntu 16.04 just now, and it's 
still not fixed.

Seems there are multiple bug id:s

https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=787950#10
https://bugs.launchpad.net/debian/+source/mdadm/+bug/1550823

But this is still not fixed in Ubuntu 16.04, potentially in Debian as 
well.

So it might be good for everybody to know that their arrays most likely 
aren't being periodically checked if you upgrade to Ubuntu 16.04 
currently.

-- 
Mikael Abrahamsson    email: swmike@swm.pp.se

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

end of thread, other threads:[~2016-09-05  8:15 UTC | newest]

Thread overview: 12+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2016-03-01 21:09 Checkarray doesn't seem to do anything rodman
2016-03-01 21:33 ` Piergiorgio Sartor
  -- strict thread matches above, loose matches on Subject: below --
2016-03-01 21:57 rodman
2016-03-01 22:25 ` Piergiorgio Sartor
2016-03-01 23:00 rodman
2016-03-02  0:50 rodman
2016-03-02 17:44 ` Piergiorgio Sartor
2016-03-02 17:47   ` Roman Mamedov
2016-03-02 18:08     ` Piergiorgio Sartor
2016-03-02 17:56 rodman
2016-03-02 19:53 rodman
2016-09-05  8:15 ` Mikael Abrahamsson

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).