* Setting a buffer_heads 'real_device' @ 2002-07-10 11:25 Mario Vodisek 2002-07-10 13:10 ` Multiple disk failure - recover? Danilo Godec 0 siblings, 1 reply; 9+ messages in thread From: Mario Vodisek @ 2002-07-10 11:25 UTC (permalink / raw) To: linux-raid [-- Attachment #1: Type: text/plain, Size: 611 bytes --] Hi, I'm writing a virtual disk driver consisting of serveral real disks. Hence I've to map read/write requests for my virtual device to underlying real devices, like md does so for RAID-Arrays. So my question is how a virtual device driver (like 'md') manages the read/write request associated with a virtual (md-) device to get data from a specific real device within a 'block_read/block/write()' invokation ! I know that the buffer head-structure contains an entry for a virtual and a real device, but i don't know when and in which proper way to set these components. Somebody to help me ?? Mario Vodisek [-- Warning: decoded text below may be mangled, UTF-8 assumed --] [-- Attachment #2: Visitenkarte für Mario Vodisek --] [-- Type: text/x-vcard; charset=us-ascii; name="vodisek.vcf", Size: 363 bytes --] begin:vcard n:Vodisek;Mario tel;fax:--- tel;home:0160/632 96 92 tel;work:--- x-mozilla-html:FALSE org:University of Paderborn;AG Meyer auf der Heide - Theoretical computing - version:2.1 email;internet:vodisek@upb.de title:research assistant adr;quoted-printable:;;Liebfrauenweg 9=0D=0A ;33334 Gütersloh;;;Germany x-mozilla-cpt:;-9984 fn:Mario Vodisek end:vcard ^ permalink raw reply [flat|nested] 9+ messages in thread
* Multiple disk failure - recover? 2002-07-10 11:25 Setting a buffer_heads 'real_device' Mario Vodisek @ 2002-07-10 13:10 ` Danilo Godec 2002-07-10 13:17 ` Mike Black 0 siblings, 1 reply; 9+ messages in thread From: Danilo Godec @ 2002-07-10 13:10 UTC (permalink / raw) To: linux-raid Hi! I have (had) a three disk RAID5 array. One of the disks (sdb2) has failed, however, under circumstances, two of the diskes were kicked out of the array. I tried re-assembling the array using 'mdadm --assemble --force /dev/md1 /dev/sda2 /dev/sdc2 /dev/sdb2', but it always takes the sdc2 & sdb2 as OK disks and sda2 as failed. Of course, when the reconstruction hits the bad area on sdb2, it all fails again. How can I tell mdadm that /dev/sda2 and /dev/sdc2 are the disks I want as 'good'!? Thanks, D. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Multiple disk failure - recover? 2002-07-10 13:10 ` Multiple disk failure - recover? Danilo Godec @ 2002-07-10 13:17 ` Mike Black 2002-07-10 13:36 ` Neil Brown 2002-07-10 13:42 ` Danilo Godec 0 siblings, 2 replies; 9+ messages in thread From: Mike Black @ 2002-07-10 13:17 UTC (permalink / raw) To: Danilo Godec, linux-raid You don't say why two disks were kicked or when it happend so sdc may be out-of-whack a bit. Sounds like sdc got kicked first. So...I would do a bad-block scan on sdb2 so it can remap the bad section and re-build as you've been trying to do. If you REALLY want to use sda and sdc just rebuild the array with --create and leave sdb out of it. You shouldn't lose much data if sdc is current. ----- Original Message ----- From: "Danilo Godec" <danci@agenda.si> To: <linux-raid@vger.kernel.org> Sent: Wednesday, July 10, 2002 9:10 AM Subject: Multiple disk failure - recover? > Hi! > > I have (had) a three disk RAID5 array. One of the disks (sdb2) has failed, > however, under circumstances, two of the diskes were kicked out of the > array. > > I tried re-assembling the array using 'mdadm --assemble --force /dev/md1 > /dev/sda2 /dev/sdc2 /dev/sdb2', but it always takes the sdc2 & sdb2 as OK > disks and sda2 as failed. > > Of course, when the reconstruction hits the bad area on sdb2, it all fails > again. > > How can I tell mdadm that /dev/sda2 and /dev/sdc2 are the disks I want as > 'good'!? > > Thanks, D. > > > > - > 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 ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Multiple disk failure - recover? 2002-07-10 13:17 ` Mike Black @ 2002-07-10 13:36 ` Neil Brown 2002-07-10 13:43 ` Danilo Godec 2002-07-10 13:42 ` Danilo Godec 1 sibling, 1 reply; 9+ messages in thread From: Neil Brown @ 2002-07-10 13:36 UTC (permalink / raw) To: Mike Black; +Cc: Danilo Godec, linux-raid On Wednesday July 10, mblack@csi-inc.com wrote: > You don't say why two disks were kicked or when it happend so sdc may be out-of-whack a bit. Sounds like sdc got kicked first. > So...I would do a bad-block scan on sdb2 so it can remap the bad section and re-build as you've been trying to do. > > If you REALLY want to use sda and sdc just rebuild the array with --create and leave sdb out of it. You shouldn't lose much data if > sdc is current. Better still, do that --assemble and leave sdb out of it. i.e. mdadm --assemble --force /dev/md1 /dev/sda2 /dev/sdc2 Then it will have to use a2 and c2. NeilBrown ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Multiple disk failure - recover? 2002-07-10 13:36 ` Neil Brown @ 2002-07-10 13:43 ` Danilo Godec 2002-07-10 13:55 ` Neil Brown 0 siblings, 1 reply; 9+ messages in thread From: Danilo Godec @ 2002-07-10 13:43 UTC (permalink / raw) To: Neil Brown; +Cc: linux-raid On Wed, 10 Jul 2002, Neil Brown wrote: > mdadm --assemble --force /dev/md1 /dev/sda2 /dev/sdc2 > > Then it will have to use a2 and c2. I tried that, but it refused to do it (something about 2/3 drives failed)!? Maybe my mdadm version is old (v1.0.0)? D. ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Multiple disk failure - recover? 2002-07-10 13:43 ` Danilo Godec @ 2002-07-10 13:55 ` Neil Brown 2002-07-10 14:13 ` Danilo Godec 0 siblings, 1 reply; 9+ messages in thread From: Neil Brown @ 2002-07-10 13:55 UTC (permalink / raw) To: Danilo Godec; +Cc: linux-raid On Wednesday July 10, danci@agenda.si wrote: > On Wed, 10 Jul 2002, Neil Brown wrote: > > > mdadm --assemble --force /dev/md1 /dev/sda2 /dev/sdc2 > > > > Then it will have to use a2 and c2. > > I tried that, but it refused to do it (something about 2/3 drives > failed)!? Maybe my mdadm version is old (v1.0.0)? Hmmm. Should work, but might need a "--run" as well... Can you get me an exact error message, and maybe the output of mdadm --examine /dev/sd[abc]2 NeilBrown ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Multiple disk failure - recover? 2002-07-10 13:55 ` Neil Brown @ 2002-07-10 14:13 ` Danilo Godec 2002-07-10 14:30 ` Neil Brown 0 siblings, 1 reply; 9+ messages in thread From: Danilo Godec @ 2002-07-10 14:13 UTC (permalink / raw) To: Neil Brown; +Cc: linux-raid [-- Attachment #1: Type: TEXT/PLAIN, Size: 698 bytes --] On Wed, 10 Jul 2002, Neil Brown wrote: > On Wednesday July 10, danci@agenda.si wrote: > > On Wed, 10 Jul 2002, Neil Brown wrote: > > > > > mdadm --assemble --force /dev/md1 /dev/sda2 /dev/sdc2 > > > > > > Then it will have to use a2 and c2. > > > > I tried that, but it refused to do it (something about 2/3 drives > > failed)!? Maybe my mdadm version is old (v1.0.0)? > > Hmmm. Should work, but might need a "--run" as well... > > Can you get me an exact error message, and maybe the output of > mdadm --examine /dev/sd[abc]2 > > NeilBrown > OK, it's all attached. One file contains results of mdadm --examine, the other is what I get on the screen with mdadm --assemble (w/wo --run)... D. [-- Attachment #2: Type: TEXT/PLAIN, Size: 1086 bytes --] [root@lmq MDADM]# mdadm --assemble --force /dev/md1 /dev/sda2 /dev/sdc2 md: md1 stopped. md: unbind<sdc2,0> md: export_rdev(sdc2) [events: 00000058] md: bind<sdc2,1> mdadm: /dev/md1 assembled from 1 drive - not enough to start it (use --run to insist). [root@lmq MDADM]# mdadm --assemble --force /dev/md1 --run /dev/sda2 /dev/sdc2 md: md1 stopped. md: unbind<sdc2,0> md: export_rdev(sdc2) [events: 00000058] md: bind<sdc2,1> md: sdc2's event counter: 00000058 md1: removing former faulty sdb2! md1: max total readahead window set to 496k md1: 2 data-disks, max readahead per data-disk: 248k raid5: device sdc2 operational as raid disk 1 raid5: not enough operational devices for md1 (2/3 failed) RAID5 conf printout: --- rd:3 wd:1 fd:2 disk 0, s:0, o:0, n:0 rd:0 us:1 dev:[dev 00:00] disk 1, s:0, o:1, n:1 rd:1 us:1 dev:sdc2 disk 2, s:0, o:0, n:2 rd:2 us:1 dev:[dev 00:00] raid5: failed to run raid set md1 md: pers->run() failed ... md: md1 stopped. md: unbind<sdc2,0> md: export_rdev(sdc2) mdadm: failed to RUN_ARRAY /dev/md1: Invalid argument [-- Attachment #3: Type: TEXT/PLAIN, Size: 2748 bytes --] /dev/sda2: Magic : a92b4efc Version : 00.90.00 UUID : d1b50184:535ff73c:48dba5c1:e94fc70e Creation Time : Mon Jul 16 13:53:51 2001 Raid Level : raid5 Device Size : 17623232 (16.80 GiB 18.04 GB) Raid Devices : 3 Total Devices : 4 Preferred Minor : 1 Update Time : Wed Jul 10 15:18:37 2002 State : dirty, no-errors Active Devices : 2 Working Devices : 3 Failed Devices : 1 Spare Devices : 1 Checksum : 79f828e5 - correct Events : 0.82 Layout : left-asymmetric Chunk Size : 32K Number Major Minor RaidDevice State this 3 8 2 3 /dev/sda2 0 0 8 18 0 active sync /dev/sdb2 1 1 8 34 1 active sync /dev/sdc2 2 2 0 0 2 faulty removed 3 3 8 2 3 /dev/sda2 /dev/sdb2: Magic : a92b4efc Version : 00.90.00 UUID : d1b50184:535ff73c:48dba5c1:e94fc70e Creation Time : Mon Jul 16 13:53:51 2001 Raid Level : raid5 Device Size : 17623232 (16.80 GiB 18.04 GB) Raid Devices : 3 Total Devices : 3 Preferred Minor : 1 Update Time : Wed Jul 10 15:36:39 2002 State : dirty, no-errors Active Devices : 2 Working Devices : 2 Failed Devices : 1 Spare Devices : 0 Checksum : 79f82d2f - correct Events : 0.86 Layout : left-asymmetric Chunk Size : 32K Number Major Minor RaidDevice State this 0 8 18 0 active sync /dev/sdb2 0 0 8 18 0 active sync /dev/sdb2 1 1 8 34 1 active sync /dev/sdc2 2 2 0 0 2 faulty removed /dev/sdc2: Magic : a92b4efc Version : 00.90.00 UUID : d1b50184:535ff73c:48dba5c1:e94fc70e Creation Time : Mon Jul 16 13:53:51 2001 Raid Level : raid5 Device Size : 17623232 (16.80 GiB 18.04 GB) Raid Devices : 3 Total Devices : 3 Preferred Minor : 1 Update Time : Wed Jul 10 16:08:35 2002 State : clean, no-errors Active Devices : 1 Working Devices : 1 Failed Devices : 2 Spare Devices : 0 Checksum : 79f834ba - correct Events : 0.88 Layout : left-asymmetric Chunk Size : 32K Number Major Minor RaidDevice State this 1 8 34 1 active sync /dev/sdc2 0 0 8 18 0 faulty /dev/sdb2 1 1 8 34 1 active sync /dev/sdc2 2 2 0 0 2 faulty removed ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Multiple disk failure - recover? 2002-07-10 14:13 ` Danilo Godec @ 2002-07-10 14:30 ` Neil Brown 0 siblings, 0 replies; 9+ messages in thread From: Neil Brown @ 2002-07-10 14:30 UTC (permalink / raw) To: Danilo Godec; +Cc: linux-raid On Wednesday July 10, danci@agenda.si wrote: > OK, it's all attached. One file contains results of mdadm --examine, the > other is what I get on the screen with mdadm --assemble (w/wo --run)... Hmmm. Yes --force isn't doing all that it should do. I'll have to look into that. You should be able to use create successfully. If the original order was b2,c2,a2, which is what the --examine suggests, and you want to not use b2, then mdadm --create /dev/md1 -l5 -c32 -n3 missing /dev/sdc2 /dev/sda2 should work. It will not start a rebuild so you can mount it read-only and if something was wrong, you can "mdadm --stop" and try again with a different arrangement of drives. If b2 and c2 are really the most recent, as it appears, then you might want to use those: mdadm --create /dev/md1 -l5 -c32 -n3 /dev/sdb2 /dev/sdc2 missing Again, this wont do a resync and as long as you don't touch the bad block on b2, you should be able to access data. NeilBrown ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Multiple disk failure - recover? 2002-07-10 13:17 ` Mike Black 2002-07-10 13:36 ` Neil Brown @ 2002-07-10 13:42 ` Danilo Godec 1 sibling, 0 replies; 9+ messages in thread From: Danilo Godec @ 2002-07-10 13:42 UTC (permalink / raw) To: Mike Black; +Cc: linux-raid On Wed, 10 Jul 2002, Mike Black wrote: > You don't say why two disks were kicked or when it happend so sdc may > be out-of-whack a bit. Sounds like sdc got kicked first. I'm not 100% sure, but I think either of sda or sdb was the first kicked... Dunno. > So...I would do a bad-block scan on sdb2 so it can remap the bad > section and re-build as you've been trying to do. What tool would you use? I think that linux' badblocks operates on the FS level... So it's useless on Software RAID5... > > If you REALLY want to use sda and sdc just rebuild the array with --create and leave sdb out of it. You shouldn't lose much data if > sdc is current. I tried that and it simply ignores /dev/sda2... I only need to recover as much data as possible. It's not that bad if I loose yesterdays stuff. D. ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2002-07-10 14:30 UTC | newest] Thread overview: 9+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2002-07-10 11:25 Setting a buffer_heads 'real_device' Mario Vodisek 2002-07-10 13:10 ` Multiple disk failure - recover? Danilo Godec 2002-07-10 13:17 ` Mike Black 2002-07-10 13:36 ` Neil Brown 2002-07-10 13:43 ` Danilo Godec 2002-07-10 13:55 ` Neil Brown 2002-07-10 14:13 ` Danilo Godec 2002-07-10 14:30 ` Neil Brown 2002-07-10 13:42 ` Danilo Godec
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.