On Thu, 9 Sep 1999 [EMAIL PROTECTED] wrote:
>David,
>
>It looks like your system and syslog are very similar to mine.
>Are you using two aic7xxx controllers for 8 * 9Gb disks?
>And is it SMP?
I have an SMP system (Dual PII 350 on Supermicro motherboard) with tho
Qlogic controllers, one with four internal disks, one with four external
disks (all 9Gb). I am runing 2.2.12+RAID patches (990824) + knfsd 1.4.6
>Mine is PII-500 2CPU, with 9 * 18GB on two aic7xxx U2W.
>I've got very same scsi errors with you.
It is very easy to get SCSI error due to termination problems, or cable
length (should be less than 1.5 m).
I actually wrote a tiny program that fires up a few threads and creates
some large files, which are then read and written more or less randomly.
It succeeds locking up my computer almost. It might be worth a try (see
below)
Groeten, David.
________________________________________________________________________
Dr. David van der Spoel Biomedical center, Dept. of Biochemistry
s-mail: Husargatan 3, Box 576, 75123 Uppsala, Sweden
e-mail: [EMAIL PROTECTED] www: http://zorn.bmc.uu.se/~spoel
phone: 46 18 471 4205 fax: 46 18 511 755
++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++++
#include <stdio.h>
#include <unistd.h>
#define MAXOPEN 32
#define BUFS 2048
#define max(a,b) ((a) > (b)) ? (a) : (b)
#define min(a,b) ((a) < (b)) ? (a) : (b)
FILE *mk_file(int n)
{
char buf[32];
if ((n < 0) || (n > MAXOPEN)) {
return NULL;
}
sprintf(buf,"de-junk%d.bin",n);
if (fopen(buf,"r") == NULL)
/* File does not exist */
return fopen(buf,"w+");
else
return NULL;
}
void seekit(FILE *fp,int length,int nseek)
{
int i,j,step,step0=17,size;
char buf[BUFS];
step = length - 137;
while (step < 0)
step += length;
rewind(fp);
for(i=0; (i<nseek); i++) {
/* Even iterations reading */
if ((j % 2) == 0) {
step0 = (step0 + step) % length;
fseek(fp,step0,SEEK_SET);
size = min(BUFS,length-step0);
fread(buf,size,1,fp);
}
else {
/* Odd iterations writing */
fseek(fp,step0,SEEK_SET);
size = min(BUFS,length-step0);
for(j=0; (j<BUFS); j++)
buf[j] = !buf[j];
fwrite(buf,min(BUFS,length-step0),1,fp);
}
}
}
void justdoit(int i,int bufs,int nblocks,int nseek)
{
FILE *fp;
int j,k;
char *buf;
/* Open a file */
fprintf(stderr,"Just do it %d\n",i);
if ((fp = mk_file(i)) != NULL) {
/* Create a buffer */
if ((buf = (char *)malloc(bufs)) == NULL) {
fclose(fp);
return;
}
/* Write the buffer to file a couple of times */
for(k=0; (k<nblocks); k++)
fwrite(buf,bufs,1,fp);
seekit(fp,bufs*nblocks,nseek);
/* Clean up */
free(buf);
fclose(fp);
}
else
fprintf(stderr,"Can't create file\n");
}
void doit(int n,int bufs,int nblocks,int nseek)
{
if ((n > 0) && (fork() == 0))
doit(n-1,bufs,nblocks,nseek);
else if (n > 0)
justdoit(n,bufs,nblocks,nseek);
}
void main(int argc,char *argv[])
{
int nproc = 4;
int bufs = 20435;
int nblock = 1379;
int nseek = 8795;
fprintf(stderr,"%s\n",argv[0]);
if (argc >= 2)
nproc = atoi(argv[1]);
if (nproc >= MAXOPEN) {
fprintf(stderr,"Usage: %s nprocess [ less than %d ]\n",argv[0],MAXOPEN);
exit(1);
}
fprintf(stderr,"Starting %s with nproc=%d, bufs=%d, nblocks=%d, nseek=%d\n",
argv[0],nproc,bufs,nblock,nseek);
doit(nproc,bufs,nblock,nseek);
}