RAID 1 bug, nr_disks incorrect

2000-08-02 Thread Anton Blanchard


Hi,

While testing raid1 (raidsetfaulty, raidhotremove, raidhotadd, repeat),
I managed to get one raid set in a state where nr_disks was incorrect.
This became a problem when trying to use lilo, because it would only write
to one of the disks (since nr_disks was 1).

With one disk in the set nr_disks was 0:

Aug  2 13:15:00 hotbox kernel: RAID1 conf printout: 
Aug  2 13:15:00 hotbox kernel:  --- wd:1 rd:2 nd:0 
Aug  2 13:15:00 hotbox kernel:  disk 0, s:0, o:0, n:0 rd:0 us:0 dev:[dev 00:00] 
Aug  2 13:15:00 hotbox kernel:  disk 1, s:0, o:1, n:1 rd:1 us:1 dev:sda1 
Aug  2 13:15:00 hotbox kernel:  disk 2, s:0, o:0, n:0 rd:0 us:0 dev:[dev 00:00] 
Aug  2 13:15:00 hotbox kernel:  disk 3, s:0, o:0, n:0 rd:0 us:0 dev:[dev 00:00] 

After adding a disk nr_disks was 1:

Aug  2 13:15:01 hotbox kernel: RAID1 conf printout: 
Aug  2 13:15:01 hotbox kernel:  --- wd:1 rd:2 nd:1 
Aug  2 13:15:01 hotbox kernel:  disk 0, s:0, o:0, n:0 rd:0 us:0 dev:[dev 00:00] 
Aug  2 13:15:01 hotbox kernel:  disk 1, s:0, o:1, n:1 rd:1 us:1 dev:sda1 
Aug  2 13:15:01 hotbox kernel:  disk 2, s:1, o:0, n:2 rd:2 us:1 dev:sdb1 
Aug  2 13:15:01 hotbox kernel:  disk 3, s:0, o:0, n:0 rd:0 us:0 dev:[dev 00:00] 

I wrote the following hack so it would fix this.

Anton


--- linux/drivers/block/raid1.c Thu Jul 27 12:47:48 2000
+++ ../linux-2.4.0-test4-pre4/drivers/block/raid1.c Wed Aug  2 13:43:46 2000
@@ -1690,8 +1692,14 @@
disk->head_position = 0;
}
}
+
+   if (sb->raid_disks > sb->nr_disks)
+   sb->nr_disks = sb->raid_disks;
+
conf->raid_disks = sb->raid_disks;
conf->nr_disks = sb->nr_disks;



Re: FAQ

2000-08-02 Thread Ilia Baldine


Can we get the list administrator to add a footer to each
message that has the URL of one of the archives?
It will cut down on the questions like "...where is the
FAQ?"
-ilia
Gregory Leblanc wrote:
Here's a quickie FAQ, it's very incomplete, but I
wanted to get some
feedback on what I've got right now.  Thanks,
    Greg
Linux-RAID FAQ
Gregory Leblanc
 
gleblanc (at) cu-portland.edu
   Revision History
   Revision v0.01 31 July 2000 Revised by: gml
   Initial draft of this FAQ.
   This is a FAQ for the Linux-RAID mailing list, hosted on
   vger.rutgers.edu. It's intended as a supplement to the
existing
   Linux-RAID HOWTO, to cover questions that keep occurring
on the mailing
   list. PLEASE read this document before your post to the
list.
 _
   1. General
    1.1. Where can I find archives
for the linux-raid mailing list?
   2. Kernel
    2.1. I'm running the DooDad
Linux Distribution. Do I need to
   
patch my kernel to make RAID work?
    2.2. How can I tell if I
need to patch my kernel?
    2.3. Where can I get the
latest RAID patches for my kernel?
    2.4. How do I apply the
patch to a kernel that I just downloaded
   
from ftp.kernel.org?
1. General
   1.1. Where can I find archives for the linux-raid mailing
list?
   My favorite archives are at Geocrawler.
   Other archives are available at
   http://marc.theaimsgroup.com/?l=linux-raid&r=1&w=2
   Another archive site is
   http://www.mail-archive.com/linux-raid@vger.rutgers.edu/.
2. Kernel
   2.1. I'm running the DooDad Linux Distribution. Do I need
to patch my
   kernel to make RAID work?
   Well, the short answer is, it depends. Distributions that
are keeping
   up to date have the RAID patches included in their kernels.
The kernel
   that RedHat distributes, as do some others. If you download
a 2.2.x
   kernel from ftp.kernel.org, then you will need to patch
your kernel.
   2.2. How can I tell if I need to patch my kernel?
   The easiest way is to check what's in /proc/mdstat. Here's
a sample
   from a 2.2.x kernel, with the RAID patches applied.
[gleblanc@grego1 gleblanc]$ cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid5] [translucent]
read_ahead not set
unused devices: 
[gleblanc@grego1 gleblanc]$
   If the contents of /proc/mdstat looks like the above, then
you don't
   need to patch your kernel.
   I'll get a copy of something from an UN-patched 2.2.x kernel
and put
   it here shortly. If your /proc/mdstat looks like this
one, then you
   need to patch your kernel.
   2.3. Where can I get the latest RAID patches for my kernel?
   The patches for the 2.2.x kernels up to, and including,
2.2.13 are
   available from ftp.kernel.org. Use the kernel patch that
most closely
   matches your kernel revision. For example, the 2.2.11
patch can also
   be used on 2.2.12 and 2.2.13.
   The patches for 2.2.14 and later kernels are at
   http://people.redhat.com/mingo/raid-patches/.
Use the right patch for
   your kernel, these patches haven't worked on other kernel
revisions
   yet.
   2.4. How do I apply the patch to a kernel that I just downloaded
from
   ftp.kernel.org?
   Put the downloaded kernel in /usr/src. Change to this directory,
and
   move any directory called linux to something else. Then,
type tar
   -Ixvf kernel-2.2.16.tar.bz2, replacing kernel-2.2.16.tar.bz2
with your
   kernel. Then cd to /usr/src/linux, and run patch -p1 <
raid-2.2.16-A0.
   Then compile the kernel as usual.

-- 
-+--
Ilia Baldine | [EMAIL PROTECTED]
Network Research Engineer,   | ph#:(919)248-1847
Advanced Networking Research, MCNC   | FAX:(919)248-1455
-+--
"I used to think the brain was the most important part 
of the body, but then I realized who was telling me that."
    -Emo Philips

 


Re: OT: best cross-OS filesystem

2000-08-02 Thread James Manning

[Edward Schernau]
> Sorry to waste bandwidth, but I'm looking at a way for better
> cross-OS performance on my "shared" partition - are there ext2fs
> drivers for NT somewhere, or maybe hpfs drivers for NT?  I have some
> very large directories with 100's of files, and I want to be able to
> get in and around them easily...

FAT32 appears to be the dominate cross-OS filesystem of choice,
combining long-filename support with native read-write capability
in Linux, 95/98, NT/2000

James
-- 
James Manning <[EMAIL PROTECTED]>
GPG Key fingerprint = B913 2FBD 14A9 CE18 B2B7  9C8E A0BF B026 EEBB F6E4



OT: best cross-OS filesystem

2000-08-02 Thread Edward Schernau

Sorry to waste bandwidth, but I'm looking at a way for better
cross-OS performance on my "shared" partition - are there ext2fs
drivers for NT somewhere, or maybe hpfs drivers for NT?  I have some
very large directories with 100's of files, and I want to be able to
get in and around them easily...



R: raid and 2.4 kernels

2000-08-02 Thread Gianluca Cecchi

This my experience with raid0 and 2.2.14/2.4*. Below an e-mail I sent in
another list and probably Glenn cc'ed it also here (about 24/07).
It seems the main problem is kswapd sucking of resources not totally fixed
(some better result from 2.3.99 to 2.4.0-test5, but not sufficient).
If you make "vmstat 3", then P (to sort by cpu usage), during heavy I/O
operation you see after several seconds the block in/block out performances
decreasing stabilyzing to poor numbers.
It doesn't matter using tagged/notagged with my system: in both 2.2 and 2.4
the performance don't change. The mail refers to test4, but also
in test5 the numbers are similar.
Anyone knows the progress on thi problem with 2.4 thread?
A curiosity: I have not worked much on it but yesterday I compiled a 2.2.16
standard kernel and it seems to have similar bad performance like 2.4 ones.
Anyone registered this with 2.2.16. Could be redhat particular patches that
speed up raid0 with their kernel in 6.2 release?
Bye
Gianluca


My mail:
The system:

MB: Supermicro P6SBU (Adaptec 7890 on board)
CPU: 1 pentium III 500 MHz
Mem: 256Mb

1x9.1Gb IBM DNES-309170W disk on fast/se channel
4x18.2Gb IBM DNES-318350W on ultra2 channel
The 18.2 Gb disks are in raid0 software. Below the /etc/raidtab file:

raiddev /dev/md0
  raid-level  0
  nr-raid-disks   4
  persistent-superblock 1
  chunk-size 128
  device  /dev/sdb1
  raid-disk   0
  device  /dev/sdc1
  raid-disk   1
  device  /dev/sdd1
  raid-disk   2
  device  /dev/sde1
  raid-disk   3

output of dmesg related to scsi conf (in 2.4.0-test4 boot):

md.c: sizeof(mdp_super_t) = 4096
(scsi0)  found at PCI 0/14/0
(scsi0) Wide Channel, SCSI ID=7, 32/255 SCBs
(scsi0) Downloading sequencer code... 392 instructions downloaded
scsi0 : Adaptec AHA274x/284x/294x (EISA/VLB/PCI-Fast SCSI) 5.2.1/5.2.0
   
scsi : 1 host.
(scsi0:0:5:0) Synchronous at 10.0 Mbyte/sec, offset 15.
  Vendor: SONY  Model: SDT-9000  Rev: 0400
  Type:   Sequential-Access  ANSI SCSI revision: 02
(scsi0:0:6:0) Synchronous at 40.0 Mbyte/sec, offset 31.
  Vendor: IBM   Model: DNES-309170W  Rev: SA30
  Type:   Direct-Access  ANSI SCSI revision: 03
Detected scsi disk sda at scsi0, channel 0, id 6, lun 0
(scsi0:0:8:0) Synchronous at 80.0 Mbyte/sec, offset 31.
  Vendor: IBM   Model: DNES-318350W  Rev: SA30
  Type:   Direct-Access  ANSI SCSI revision: 03
Detected scsi disk sdb at scsi0, channel 0, id 8, lun 0
(scsi0:0:9:0) Synchronous at 80.0 Mbyte/sec, offset 31.
  Vendor: IBM   Model: DNES-318350W  Rev: SA30
  Type:   Direct-Access  ANSI SCSI revision: 03
Detected scsi disk sdc at scsi0, channel 0, id 9, lun 0
(scsi0:0:10:0) Synchronous at 80.0 Mbyte/sec, offset 31.
  Vendor: IBM   Model: DNES-318350W  Rev: SA30
  Type:   Direct-Access  ANSI SCSI revision: 03
Detected scsi disk sdd at scsi0, channel 0, id 10, lun 0
(scsi0:0:12:0) Synchronous at 80.0 Mbyte/sec, offset 31.
  Vendor: IBM   Model: DNES-318350W  Rev: SA30
  Type:   Direct-Access  ANSI SCSI revision: 03
Detected scsi disk sde at scsi0, channel 0, id 12, lun 0
scsi : detected 5 SCSI disks total.
SCSI device sda: hdwr sector= 512 bytes. Sectors= 17916240 [8748 MB] [8.7
GB]
Partition check:
 sda: sda1 sda2 < sda5 sda6 sda7 >
SCSI device sdb: hdwr sector= 512 bytes. Sectors= 35843670 [17501 MB] [17.5
GB]
 sdb: sdb1
SCSI device sdc: hdwr sector= 512 bytes. Sectors= 35843670 [17501 MB] [17.5
GB]
 sdc: sdc1
SCSI device sdd: hdwr sector= 512 bytes. Sectors= 35843670 [17501 MB] [17.5
GB]
 sdd: sdd1
SCSI device sde: hdwr sector= 512 bytes. Sectors= 35843670 [17501 MB] [17.5
GB]
 sde: sde1

[snipped]

(read) sdb1's sb offset: 17920384 [events: 0085]
(read) sdc1's sb offset: 17920384 [events: 0085]
(read) sdd1's sb offset: 17920384 [events: 0085]
(read) sde1's sb offset: 17920384 [events: 0085]
autorun ...
considering sde1 ...
  adding sde1 ...
  adding sdd1 ...
  adding sdc1 ...
  adding sdb1 ...
created md0
bind
bind
bind
bind
running: 
now!
sde1's event counter: 0085
sdd1's event counter: 0085
sdc1's event counter: 0085
sdb1's event counter: 0085
raid0 personality registered
md0: max total readahead window set to 2048k
md0: 4 data-disks, max readahead per data-disk: 512k
raid0: looking at sdb1
raid0:   comparing sdb1(17920384) with sdb1(17920384)
raid0:   END
raid0:   ==> UNIQUE
raid0: 1 zones
raid0: looking at sdc1
raid0:   comparing sdc1(17920384) with sdb1(17920384)
raid0:   EQUAL
raid0: looking at sdd1
raid0:   comparing sdd1(17920384) with sdb1(17920384)
raid0:   EQUAL
raid0: looking at sde1
raid0:   comparing sde1(17920384) with sdb1(17920384)
raid0:   EQUAL
raid0: FINAL 1 zones
zone 0
 checking sdb1 ... contained as device 0
  (17920384) is smallest!.

FAQ

2000-08-02 Thread Gregory Leblanc

Here's a quickie FAQ, it's very incomplete, but I wanted to get some
feedback on what I've got right now.  Thanks,
Greg

Linux-RAID FAQ

Gregory Leblanc

  gleblanc (at) cu-portland.edu
   
   Revision History
   Revision v0.01 31 July 2000 Revised by: gml
   Initial draft of this FAQ.
   
   This is a FAQ for the Linux-RAID mailing list, hosted on
   vger.rutgers.edu. It's intended as a supplement to the existing
   Linux-RAID HOWTO, to cover questions that keep occurring on the mailing
   list. PLEASE read this document before your post to the list.
 _
   
   1. General
  
1.1. Where can I find archives for the linux-raid mailing list?

   2. Kernel
  
2.1. I'm running the DooDad Linux Distribution. Do I need to
patch my kernel to make RAID work?

2.2. How can I tell if I need to patch my kernel?
2.3. Where can I get the latest RAID patches for my kernel?
2.4. How do I apply the patch to a kernel that I just downloaded
from ftp.kernel.org?

1. General

   1.1. Where can I find archives for the linux-raid mailing list?
   
   My favorite archives are at Geocrawler.
   
   Other archives are available at
   http://marc.theaimsgroup.com/?l=linux-raid&r=1&w=2
   
   Another archive site is
   http://www.mail-archive.com/linux-raid@vger.rutgers.edu/.
   
2. Kernel

   2.1. I'm running the DooDad Linux Distribution. Do I need to patch my
   kernel to make RAID work?
   
   Well, the short answer is, it depends. Distributions that are keeping
   up to date have the RAID patches included in their kernels. The kernel
   that RedHat distributes, as do some others. If you download a 2.2.x
   kernel from ftp.kernel.org, then you will need to patch your kernel.
   
   2.2. How can I tell if I need to patch my kernel?
   
   The easiest way is to check what's in /proc/mdstat. Here's a sample
   from a 2.2.x kernel, with the RAID patches applied.
[gleblanc@grego1 gleblanc]$ cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid5] [translucent]
read_ahead not set
unused devices: 
[gleblanc@grego1 gleblanc]$


   If the contents of /proc/mdstat looks like the above, then you don't
   need to patch your kernel.
   
   I'll get a copy of something from an UN-patched 2.2.x kernel and put
   it here shortly. If your /proc/mdstat looks like this one, then you
   need to patch your kernel.
   
   2.3. Where can I get the latest RAID patches for my kernel?
   
   The patches for the 2.2.x kernels up to, and including, 2.2.13 are
   available from ftp.kernel.org. Use the kernel patch that most closely
   matches your kernel revision. For example, the 2.2.11 patch can also
   be used on 2.2.12 and 2.2.13.
   
   The patches for 2.2.14 and later kernels are at
   http://people.redhat.com/mingo/raid-patches/. Use the right patch for
   your kernel, these patches haven't worked on other kernel revisions
   yet.
   
   2.4. How do I apply the patch to a kernel that I just downloaded from
   ftp.kernel.org?
   
   Put the downloaded kernel in /usr/src. Change to this directory, and
   move any directory called linux to something else. Then, type tar
   -Ixvf kernel-2.2.16.tar.bz2, replacing kernel-2.2.16.tar.bz2 with your
   kernel. Then cd to /usr/src/linux, and run patch -p1 < raid-2.2.16-A0.
   Then compile the kernel as usual.



raid-2.2.17-A0 cleanup for LVM

2000-08-02 Thread Andrea Arcangeli

This patch cleanups the new raid code so that we have a chance that LVM on
top of RAID will keep working. It's untested at the moment.


ftp://ftp.*.kernel.org/pub/linux/kernel/people/andrea/patches/v2.2/2.2.17pre13/raid-2.2.17-A0/raid-lvm-cleanup-1

Andrea




Re: Raid1 lilo-21.5 error 0x80. [solved with default=]

2000-08-02 Thread Diego Liziero

I've solved the problem adding the "default=" line to lilo.conf

(I know, the solution was written so many times in the mailing list archive,
but I thougt that this option was useless for a single label lilo installation)

Thanks to all people that answered my questions!

Ciao,
Diego Liziero ([EMAIL PROTECTED])

--lilo.conf--
boot = /dev/md0 # root raid1 partition
default = linux-raid# <<--- needed for raid to work
linear
image = /vmlinuz-2.2.16-RAID
root = /dev/md0
label = linux-raid
read-only