Linux RAID subsystem development
 help / color / mirror / Atom feed
From: "David M. Strang" <dstrang@shellpower.net>
To: Neil Brown <neilb@cse.unsw.edu.au>
Cc: linux-raid@vger.kernel.org
Subject: Re: Raid5 Failure
Date: Sun, 17 Jul 2005 21:31:52 -0400	[thread overview]
Message-ID: <003a01c58b38$79eb9980$c200a8c0@NCNF5131FTH> (raw)
In-Reply-To: 002901c58b37$ace88970$c200a8c0@NCNF5131FTH

Oops -

forgot this part:

(gdb) print array
$1 = {major_version = -1208614704, minor_version = 134596176, patch_version 
= -1079477788, ctime = -1209047397, level = 5, size = -1079477052, nr_disks 
= 134623392, raid_disks = 134623456,
  md_minor = -1079477212, not_persistent = 0, utime = -1208577344, state 
= -1208582100, active_disks = -1208448832, working_disks = -1079477752, 
failed_disks = -1209047199, spare_disks = 5,
  layout = -1079477052, chunk_size = 134623392}

-- David M. Strang
----- Original Message ----- 
From: David M. Strang
To: unlisted-recipients: ; no To-header on input
Cc: linux-raid@vger.kernel.org
Sent: Sunday, July 17, 2005 9:26 PM
Subject: Re: Raid5 Failure


-(root@abyss)-(~)- # gdb mdadm
GNU gdb 6.2
Copyright 2004 Free Software Foundation, Inc.
GDB is free software, covered by the GNU General Public License, and you are
welcome to change it and/or distribute copies of it under certain
conditions.
Type "show copying" to see the conditions.
There is absolutely no warranty for GDB.  Type "show warranty" for details.
This GDB was configured as "i686-pc-linux-gnu"...Using host libthread_db
library "/lib/libthread_db.so.1".

(gdb) b 'Manage_subdevs'
Breakpoint 1 at 0x804fcb6: file Manage.c, line 174.
(gdb) run --manage --add /dev/md0 /dev/sdaa
Starting program: /sbin/mdadm --manage --add /dev/md0 /dev/sdaa
warning: Unable to find dynamic linker breakpoint function.
GDB will be unable to debug shared library initializers
and track explicitly loaded dynamic code.

Breakpoint 1, Manage_subdevs (devname=0xbfe0de75 "/dev/md0", fd=7,
devlist=0x8067018) at Manage.c:174
174             void *dsuper = NULL;
(gdb) n
176             if (ioctl(fd, GET_ARRAY_INFO, &array)) {
(gdb) n
181             for (dv = devlist ; dv; dv=dv->next) {
(gdb) n
182                     if (stat(dv->devname, &stb)) {
(gdb) n
187                     if ((stb.st_mode & S_IFMT) != S_IFBLK) {
(gdb) n
192                     switch(dv->disposition){
(gdb) n
200                             tfd = open(dv->devname, O_RDONLY|O_EXCL);
(gdb) n
201                             if (tfd < 0) {
(gdb) n
206                             close(tfd);
(gdb) n
210                                     if (md_get_version(fd)%100 < 2) {
(gdb) n
212                                     if (ioctl(fd, HOT_ADD_DISK,
(gdb) n
219                                     fprintf(stderr, Name ": hot add
failed for %s: %s\n",
(gdb) n
mdadm: hot add failed for /dev/sdaa: Invalid argument
221                                     return 1;
(gdb) n
307     }
(gdb) n
main (argc=5, argv=0xbfe0cb14) at mdadm.c:810
810                     if (!rv && readonly < 0)
(gdb) n
812                     if (!rv && runstop)
(gdb) n
1072            exit(rv);
(gdb) n

Program exited with code 01.

-- David M. Strang
----- Original Message ----- 
From: Neil Brown
To: David M. Strang
Cc: linux-raid@vger.kernel.org
Sent: Sunday, July 17, 2005 9:06 PM
Subject: Re: Raid5 Failure


On Sunday July 17, dstrang@shellpower.net wrote:
> I'm not real good with GDB... but I'm giving it a shot.
>
> (gdb) run -a /dev/md0 /dev/sdaa
> Starting program: /sbin/mdadm -a /dev/md0 /dev/sdaa
> warning: Unable to find dynamic linker breakpoint function.
> GDB will be unable to debug shared library initializers
> and track explicitly loaded dynamic code.
>
> Breakpoint 1, Manage_subdevs (devname=0xbfe75e5f "/dev/md0", fd=7,
> devlist=0x8067018) at Manage.c:174
> 174             void *dsuper = NULL;
> (gdb) c

At this point you need to use 'n' for 'next', to step through the code
one statement at a time.
When you see:
 176            if (ioctl(fd, GET_ARRAY_INFO, &array)) {
enter 'n' again, to execute that, then
  print array
to print the 'array' structure.
Then continue with 'n' repeatedly.

NeilBrown
-
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 


  reply	other threads:[~2005-07-18  1:31 UTC|newest]

Thread overview: 26+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2005-07-17 15:44 Raid5 Failure David M. Strang
2005-07-17 22:05 ` Neil Brown
2005-07-17 23:15   ` David M. Strang
2005-07-18  0:05     ` Tyler
2005-07-18  0:23       ` David M. Strang
2005-07-18  0:06     ` Neil Brown
2005-07-18  0:52       ` David M. Strang
2005-07-18  1:06         ` Neil Brown
2005-07-18  1:26           ` David M. Strang
2005-07-18  1:31             ` David M. Strang [this message]
     [not found]           ` <001601c58b37$620c69d0$c200a8c0@NCNF5131FTH>
2005-07-18  1:33             ` Neil Brown
2005-07-18  1:46               ` David M. Strang
2005-07-18  2:10                 ` Tyler
2005-07-18  2:12                   ` David M. Strang
2005-07-18  2:15                 ` Neil Brown
2005-07-18  2:24                   ` David M. Strang
2005-07-18  2:09               ` bug report: mdadm-devel-2 , superblock version 1 Tyler
2005-07-18  2:19                 ` Tyler
2005-07-25  0:37                   ` Neil Brown
2005-07-25  0:36                 ` Neil Brown
2005-07-25  3:47                   ` Tyler
2005-07-27  2:08                     ` Neil Brown
  -- strict thread matches above, loose matches on Subject: below --
2005-07-15  0:39 Raid5 Failure David M. Strang
2005-07-15  1:43 ` Neil Brown
2005-07-15  2:16   ` David M. Strang
2005-07-15 20:25     ` David M. Strang

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to='003a01c58b38$79eb9980$c200a8c0@NCNF5131FTH' \
    --to=dstrang@shellpower.net \
    --cc=linux-raid@vger.kernel.org \
    --cc=neilb@cse.unsw.edu.au \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox