raidstart program device detect problem
Hi,
I found some problem in raidtools2.
raiddevice md1 cannot start if raiddevice md10 was setup and running.
raidstart program check running device partially.
raid_io.c renamed from raidtools2-0.90.20010914/raid_io.c +3 -1
@@ -528,12 +528,14 @@if ((ch =strstr (p->md_name,"/md" )) ==NULL )return 0 ;strcpy (buffer, ch+1 ); +strcat (buffer," : active" );if ((fp =fopen ("/proc/mdstat" ,"r" )) ==NULL )return 0 ;while (1 ) {if ((fgets (line,MAX_LINE_LENGTH , fp)) ==NULL )break ; -if (strstr (line, buffer) && !strstr (line,"inactive" )) { +if (strstr (line, buffer)) + {fprintf (stderr,"%s: active -- run raidstop\n" , p->md_name);fclose (fp);return 1 ;
As far as I know raidtools is not supported anymore. But raidtools2 is new to me. So, not sure. mdadm is the preferred tool.
Guy
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Kenji Miyake
Sent: Wednesday, December 01, 2004 6:10 AM
To: [email protected]
Subject: raidstart program device detect problem
Hi,
I found some problem in raidtools2.
raiddevice md1 cannot start if raiddevice md10 was setup and running.
raidstart program check running device partially.
raid_io.c renamed from raidtools2-0.90.20010914/raid_io.c +3 -1
@@ -528,12 +528,14 @@if ((ch =strstr (p->md_name,"/md" )) ==NULL )return 0 ;strcpy (buffer, ch+1 ); +strcat (buffer," : active" );if ((fp =fopen ("/proc/mdstat" ,"r" )) ==NULL )return 0 ;while (1 ) {if ((fgets (line,MAX_LINE_LENGTH , fp)) ==NULL )break ; -if (strstr (line, buffer) && !strstr (line,"inactive" )) { +if (strstr (line, buffer)) + { fprintf(stderr, "%s: active -- run raidstop\n",
p->md_name);
fclose(fp);
return 1;
-
To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html
Quoted 2 lines · Guy
As far as I know raidtools is not supported anymore. But raidtools2 is new to me. So, not sure.
raidtools2 is what Debian calls the current 'raidtools' programs.
Quoted 1 line
mdadm is the preferred tool.
Debian (woody) has mdadm too:
mdadm - v0.7.2 - 21 March 2002
Gordon
Quoted 46 lines
Guy
-----Original Message-----
From: [email protected] [mailto:[email protected]] On Behalf Of Kenji Miyake
Sent: Wednesday, December 01, 2004 6:10 AM
To: [email protected]
Subject: raidstart program device detect problemHi,
I found some problem in raidtools2.raiddevice md1 cannot start if raiddevice md10 was setup and running.
raidstart program check running device partially.
raid_io.c renamed from raidtools2-0.90.20010914/raid_io.c +3
-1@@ -528,12 +528,14 @@if ((ch =strstr (p->md_name,"/md" )) ==NULL )return 0 ;strcpy (buffer, ch+1 ); +strcat (buffer," : active" );if ((fp =fopen ("/proc/mdstat" ,"r" )) ==NULL )return 0 ;while (1 ) {if ((fgets (line,MAX_LINE_LENGTH , fp)) ==NULL )break ; -if (strstr (line, buffer) && !strstr (line,"inactive" )) { +if (strstr (line, buffer)) + {fprintf (stderr,"%s: active -- run raidstop\n" , p->md_name);fclose (fp);raid_io.c renamed from raidtools2-0.90.20010914/raid_io.c +0
-1return 1 ; -To unsubscribe from this list: send the line "unsubscribe linux-raid" in the body of a message to [email protected]
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 [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html