On Sat, Feb 06, 2016 at 02:00:25PM -0500, Johan Huldtgren wrote:
> >I would compile a kernel with 'option SR_DEBUG', and with
> >'uint32_t sr_debug = SR_D_STATE' in sys/dev/softraid.c line 63.
> >
> >This might shed light on which chunks have a problem.
> 
> at boot I now see this:
> 
> softraid0 at root
> scsibus5 at softraid0: 256 targets
> softraid0: trying to bring up sd9 degraded
> softraid0: sd9 was not shutdown properly
> softraid0: sd9: sr_raid_set_vol_state
> softraid0: sd9: sr_raid5_set_vol_state 0 -> 1
> softraid0: sd9 is offline, will not be brought online
> softraid0: sr_sensors_delete
> 
> I don't see anything else different. The bioctl
> commands I ran previously show the exact same output
> (and nothing in dmesg or console). Anything specific
> I should be doing to trigger some output?

This should show chunk states. To map from number this prints to a state,
see the #defines listed at struct bioc_disk.bd_status in sys/dev/biovar.h
starting line 92.

Index: softraid_raid5.c
===================================================================
RCS file: /cvs/src/sys/dev/softraid_raid5.c,v
retrieving revision 1.23
diff -u -p -r1.23 softraid_raid5.c
--- softraid_raid5.c    21 Jul 2015 03:30:51 -0000      1.23
+++ softraid_raid5.c    6 Feb 2016 19:25:16 -0000
@@ -234,6 +234,10 @@ sr_raid5_set_vol_state(struct sr_discipl
 
        for (i = 0; i < nd; i++) {
                s = sd->sd_vol.sv_chunks[i]->src_meta.scm_status;
+               DNPRINTF(SR_D_STATE, "%s: %s: %s: chunk state is %d\n",
+                   DEVNAME(sd->sd_sc),
+                   sd->sd_meta->ssd_devname,
+                   sd->sd_vol.sv_chunks[i]->src_meta.scmi.scm_devname, s);
                if (s >= SR_MAX_STATES)
                        panic("%s: %s: %s: invalid chunk state",
                            DEVNAME(sd->sd_sc),

Reply via email to