GithubHelp home page GithubHelp logo

Comments (11)

GoogleCodeExporter avatar GoogleCodeExporter commented on June 10, 2024
It is an arithmetic issue (big numbers with 3TB disks, probably awk %d should 
be replaced with a %f).

The issue must be at /usr/www/cgi-bin/status.cgi, at around line 295 (where 
$mdev is md0 in your case)

compl=$(drawbargraph $(awk '{printf "%d", $1 * 100 / $3}' 
/sys/block/$mdev/md/sync_completed))
speed=$(cat /sys/block/$mdev/md/sync_speed)
exp=$(awk '{printf "%.1fmin", ($3 - $1) * 512 / 1000 / '$speed' / 60}' 
/sys/block/$mdev/md/sync_completed 2> /dev/null)

If it is still resync can you please post the output of

cat /sys/block/md0/md/sync_completed
cat /sys/block/md0/md/sync_speed

Thanks

Original comment by [email protected] on 1 May 2013 at 2:46

from alt-f.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 10, 2024
Still going. Web currently says md0 2794.0 GB raid1 active OK resync 20% 
142.2min
which I would think was ok except /proc/mdstat sadly disagrees :-(

$ cat /proc/mdstat
Personalities : [linear] [raid1] 
md0 : active raid1 sda2[1] sdb2[0]
      2929740112 blocks super 1.2 [2/2] [UU]
      [===============>.....]  resync = 78.6% (2303036672/2929740112) finish=108.9min speed=95859K/sec
      bitmap: 6/22 pages [24KB], 65536KB chunk

unused devices: <none>
$ cat /sys/block/md0/md/sync_completed
310542592 / 1564512928
$ cat /sys/block/md0/md/sync_speed
89338

awk saying 20% is about right for that sync_completed numbers.

And I just manually tried some big numbers in awk, and it doesn't seem to 
overflow, so I think awk must be using fp or longs for those calculations 
already.

So looks like we have a kernel overflow issue here...

Yeah, I just had a look at kernel source md.c, sync_completed_show function.
It uses unsigned long in 2.6.25, and has been fixed to long long sometime since.

Might be wise to change the web script to parse it out of /proc/mdstat instead!

Original comment by [email protected] on 1 May 2013 at 6:12

from alt-f.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 10, 2024
/proc/mdstat contains very different type/formated information, it is difficult 
to parse it.

I'm trying to port Alt-F to a more recent kernel, 3.8.11, and perhaps that will 
solve the issue.

Original comment by [email protected] on 24 May 2013 at 11:48

from alt-f.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 10, 2024
From what I saw in the kernel source, it was definitely fixed by that
version.

Original comment by [email protected] on 25 May 2013 at 11:31

from alt-f.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 10, 2024
I can confirm this on my recently flashed DLINK DNS-323 running Alt-F 0.1RC3. I 
built a 2x3TB array Raid1 and am seeing he same here - Currently:

RAID
Dev.    Capacity    Level   State   Status  Action  Done    ETA
md0     2794.0 GB   raid1   active  OK  resync  210%    -152.4min

Original comment by [email protected] on 28 Jun 2013 at 10:47

from alt-f.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 10, 2024

Original comment by [email protected] on 29 Jun 2013 at 4:27

  • Changed state: Accepted

from alt-f.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 10, 2024
Same here, see my ticket on sourceforge for details:  
https://sourceforge.net/p/alt-f/tickets/10/ 

RAID
Dev.    Capacity    Level   State   Status  Action  Done    ETA
md0     2794.0 GB   raid1   active  OK  resync  158%    -6517.8min

how can I make sure this is a false positive and that the resyncing is actually 
done?

Stephane

Original comment by [email protected] on 2 Sep 2013 at 6:29

from alt-f.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 10, 2024
[deleted comment]

from alt-f.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 10, 2024
I tried the same commands on my box. our problem looks similar

$ cat /sys/block/md0/md/sync_completed
2564345088 / 1564512928

$ cat /sys/block/md0/md/sync_speed
150809

$ cat /proc/mdstat
Personalities : [linear] [raid1]
md0 : active raid1 sda2[1] sdb2[0]
      2929740112 blocks super 1.2 [2/2] [UU]
      [========>............]  resync = 43.8% (1285270528/2929740112) finish=189.7min speed=144439K/sec
      bitmap: 13/22 pages [52KB], 65536KB chunk

unused devices: <none>



Original comment by [email protected] on 2 Sep 2013 at 6:47

from alt-f.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 10, 2024
Don't worry, cat /proc/mdstat is telling the truth about what's happening, its 
only the other numbers used by the web interface that are overflowing. (We 
found there was a fixed kernel bug)

Original comment by [email protected] on 2 Sep 2013 at 7:32

from alt-f.

GoogleCodeExporter avatar GoogleCodeExporter commented on June 10, 2024
Yep I realized that. Thanks Brian! 

Original comment by [email protected] on 2 Sep 2013 at 9:46

from alt-f.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.