newbie question
Greetings, If this is documented somewhere feel free to tell me where it is: I just setup a software RAID 1 using 2 IDE disks and no spares. I'm using the kernel that comes with the RH beta (md 0.90.0, raidtools 0.90). Anyway to test it, I halted the machine then disconnected one of the drives. Booted the machine, it goes into degraded mode. Everything fine. Power down. Reconnect drive. Restart. The array still stays in degraded mode :( (timecounter was out by 2). Looking at the source this is the intended behaviour if the md devices are out of sync by more than one time increment. I managed to then find the command raidhotadd, and was thus able to add the extra partitions back into the array (I am using 5 md devices) manually, and everything was peachy again. Only problem was that it was ugly having to specify each of the individual partitions/md devices. Question: Without having spare disks is there a way to get md to automatically start a reconstruction using the "freshest" copy? (besides getting rid of the test in the source). Is there a reason why it should not do this? Thanks. emmanuel
Re: newbie question
you could write a simple shell or perl script to do this using the /proc/mdstat as a reference, but it is a bad idea to put in a drive and have the kernel _assume_ you want to put things back the way they were. i prefer the control, rather than have the kernel assume. allan Emmanuel Galanos [EMAIL PROTECTED] said: Greetings, If this is documented somewhere feel free to tell me where it is: I just setup a software RAID 1 using 2 IDE disks and no spares. I'm using the kernel that comes with the RH beta (md 0.90.0, raidtools 0.90). Anyway to test it, I halted the machine then disconnected one of the drives. Booted the machine, it goes into degraded mode. Everything fine. Power down. Reconnect drive. Restart. The array still stays in degraded mode :( (timecounter was out by 2). Looking at the source this is the intended behaviour if the md devices are out of sync by more than one time increment. I managed to then find the command raidhotadd, and was thus able to add the extra partitions back into the array (I am using 5 md devices) manually, and everything was peachy again. Only problem was that it was ugly having to specify each of the individual partitions/md devices. Question: Without having spare disks is there a way to get md to automatically start a reconstruction using the "freshest" copy? (besides getting rid of the test in the source). Is there a reason why it should not do this? Thanks. emmanuel --
Newbie question
Dear Raiders, I'm running Suse 6.3 with a 2.2.13 kernel. I'd want to use my scsi disks in a raid 5 with hot spares configuration. For this I follow the Howto from Jakob Østergaard v. 0.90.7 19th of January 2000 (http://ostenfeld.dk/~jakob/Software-RAID.HOWTO/). I'm a bit lost about how to proceed. I've got the 2.2.16 kernel and tried to apply the patch named 'raid-2.2.16-A0.txt' (from http://people.redhat.com/mingo/raid-patches/) with the following command: 'patch -b raid-2.2.16-A0.txt patchoutput.txt'. (I could not find a patch for 2.2.13) In the output file, patch tells me that it cannot find the files to patch. I started this command from /usr/src where linux is a link to the sources 2.2.16. Then the /usr/src directory gets cluttered with a lot of files that I can delete. What am I missing? Help and many thanks, Nick Art
Re: Newbie question
try: cd /usr/src/linux patch -p1 raid-2.2.16-A0.txt patchoutput.txt Does this help? Phil On Mon, Jul 24, 2000 at 11:14:49PM +0200, Art wrote: Dear Raiders, [ "Raiders for the lost docs?" :'] I'm a bit lost about how to proceed. I've got the 2.2.16 kernel and tried to apply the patch named 'raid-2.2.16-A0.txt' (from http://people.redhat.com/mingo/raid-patches/) with the following command: 'patch -b raid-2.2.16-A0.txt patchoutput.txt'. (I could not find a patch for 2.2.13) In the output file, patch tells me that it cannot find the files to patch. I started this command from /usr/src where linux is a link to the sources [...] -- Philip Edelbrock -- IS Manager -- Edge Design, Corvallis, OR [EMAIL PROTECTED] -- http://www.netroedge.com/~phil PGP F16: 01 D2 FD 01 B5 46 F4 F0 3A 8B 9D 7E 14 7F FB 7A
newbie question about patches
Hi, Sorry for the stupid newby question but here goes. I have downloaded the kernel 2.2.13 and it has raid stuff in it and it is working fine. In ftp://ftp.kernel.org/pub/linux/daemons/raid/alpha/ there are kernel patches. How do these patches differ from the raid code that is already in the kernel above ? As I said, stupid newby question but I cant find the answer to it. Thanks. -- Lyndon David Internet and Intranet development Sentinet Ltd http://www.sentinet.co.uk
RAID Newbie Question
Over the weekend, I got RAID1 running on my RedHat 2.2.11 box. Following the advice on this list, I fetched raidtools-19990824-0.90.tar, and the raid0145-19990824-2.2.11 kernel patch. I applied the patch to a pristine kernel tree, compiled, rebooted, and it started working. I followed the instructions at: http://ostenfeld.dk/~jakob/Software-RAID.HOWTO/ to help me get things working. I think everything is working OK, but I guess I have a question or two. I created /etc/raidtab as follows: raiddev /dev/md0 raid-level 1 nr-raid-disks 2 nr-spare-disks 0 chunk-size 4 persistent-superblock 1 device /dev/sda3 raid-disk 0 device /dev/sdb2 raid-disk 1 I got it working, laid down a file system, and followed the instructions to get autodetection working. To make a long story short, autodetect only works if I keep /etc/raidtab moved out of the way. If present, it chokes and drops me in single user mode. So, /etc/raidtab is not present, and everything works. Is this normal? I didn't see anything in the HOWTO about moving /etc/raidtab. Here's some output from dmesg: md driver 0.90.0 MAX_MD_DEVS=256, MAX_REAL=12 raid1 personality registered [ ...irrelevant stuff deleted... ] md.c: sizeof(mdp_super_t) = 4096 RAMDISK: Compressed image found at block 0 autodetecting RAID arrays (read) sda3's sb offset: 1052160 [events: 000e] (read) sdb2's sb offset: 1052160 [events: 000e] autorun ... considering sdb2 ... adding sdb2 ... adding sda3 ... created md0 bindsda3,1 bindsdb2,2 running: sdb2sda3 now! sdb2's event counter: 000e sda3's event counter: 000e md0: max total readahead window set to 128k md0: 1 data-disks, max readahead per data-disk: 128k raid1: device sdb2 operational as mirror 1 raid1: device sda3 operational as mirror 0 (checking disk 0) (really checking disk 0) (checking disk 1) (really checking disk 1) (checking disk 2) (checking disk 3) (checking disk 4) (checking disk 5) (checking disk 6) (checking disk 7) (checking disk 8) (checking disk 9) (checking disk 10) (checking disk 11) raid1: raid set md0 active with 2 out of 2 mirrors md: updating md0 RAID superblock on device sdb2 [events: 000f](write) sdb2's sb offset: 1052160 sda3 [events: 000f](write) sda3's sb offset: 1052160 . ... autorun DONE. VFS: Mounted root (ext2 filesystem). autodetecting RAID arrays could not import sda3! could not import sdb2! autorun ... ... autorun DONE. Do these messages seem OK? Thanks. -- "I'm not afraid of dying, I just don't want to be there when it happens." -- Woody Allen 8:02pm up 1 day, 10:53, 3 users, load average: 1.26, 1.19, 1.37
Basic newbie question
Is there an FAQ for doing software mirror using the 2.2 series kernel? -- Kevin Carpenter Kevin's Home Page: http://www.monrou.com/kevinc (Expressing his comments from home in St. Louis, where this message originated)
Re: Newbie question
I have a running system that I would like to put into raid1. However, what I have read is that the mkraid command would erase everything. Is this true? Will I loose my data that I have, or is it only the second disk that bites it. There is a way to preserve the data on the existing disk. Go, and fetch the latest Software-RAID HowTo. http://ostenfeld.dk/~jakob/Software-RAID.HOWTO/ I'm probably losing it, but where in this HOWTO is the trick for raid1'ing a currently working drive covered? Speaking of which, something I didn't quite get is why a "chunk-size" was defined for raid1... Since they're mirrors, what's a chunk size mean in raid1? Thanks, James -- Miscellaneous Engineer --- IBM Netfinity Performance Development
Re: Newbie question
On 18-Aug-99 James Manning wrote: Speaking of which, something I didn't quite get is why a "chunk-size" was defined for raid1... Since they're mirrors, what's a chunk size mean in raid1? Yes, RAID1 is a mirror, so a chink size cannot increase write speed, but when reading this can be done "in parallel" from the two (or thre or whatever number) of disks if date is contiguous... --- Christian Ordig | Homepage: http://thor.prohosting.com/~chrordig/ Germany |eMail: Christian Ordig [EMAIL PROTECTED] __ _ | / / (_)__ __ __ | Why Linux? Because it is free, stable, and / /__/ / _ \/ // /\ \/ / | bugs can be fixed in source opposed to waiting //_/_//_/\_,_/ /_/\_\ | for a stable WinTendo from Micro$oft.
Re: Newbie question
There is a way to preserve the data on the existing disk. Go, and fetch the latest Software-RAID HowTo. http://ostenfeld.dk/~jakob/Software-RAID.HOWTO/ I couldn't find that part on the RAID-HOWTO. Could you send it to me? Since it's not really referred to in the RAID-1 section (a navigation link there might help :) you'll need to read the misnomer section "Booting on RAID" which starts with " ... kernel cannot be loaded at boot-time from a RAID device ... " (perhaps Root RAID instead?) http://ostenfeld.dk/~jakob/Software-RAID.HOWTO/Software-RAID.HOWTO-4.html#ss4.11 James -- Miscellaneous Engineer --- IBM Netfinity Performance Development
Newbie question
I have a running system that I would like to put into raid1. However, what I have read is that the mkraid command would erase everything. Is this true? Will I loose my data that I have, or is it only the second disk that bites it. Thanks Michael
Re: Newbie question - Setting up a raid-linear, raid-1
On Tue, 17 Aug 1999, Michael Ghens wrote: I have a running system that I would like to put into raid1. However, what I have read is that the mkraid command would erase everything. Is this true? Will I loose my data that I have, or is it only the second disk that bites it. Michael, you cannot (as yet, AFAIK) take an existing ext2 partition and raid it without "reformatting" it. The only way to do it is to back up your data, repartition (as necessary), set up your raid, mkfs, and then restore the data into the new (multi-partition/drive-based) filesystem. Also, to share some of my experiences (suppliment the out-of-date documentation, really) having just set up a raid-linear successfully - I hope... ;) I'll recount what happened to me: Needing to use a new 2.2 kernel for other reasons, I had to go to a current raid ftp archive and FTP both the raidtools (19990724) and kernel patch for 2.2.10. Then I had to patch the kernel (in /usr/src/linux): cd /usr/src patch -p0 raid0145-19990724-2.2.10 and recompile. Then compile the matching raidtools distribution. Once booted with the patched kernel, you make an /etc/raidtab file. I found the instructions for doing so, even in the updated HOWTO given in the raidtools archive, were incorrect for raid-linear; though I gather this isn't a very fashionable use for software raid, it seems to be what I need (just a whopping huge single partition)... anyway, I trust the raid-1 config examples actually do work better. BTW; if there is a good reason _not_ to have really big (i.e. 30 gig) md partitions, I'd like to hear it. In my case, I discovered that in addition to: raiddev /dev/md0 raid-level linear nr-raid-disks 2 persistent-superblock 1 device /dev/sdb6 raid-disk 0 device /dev/sdc5 raid-disk 1 seeming to confuse the parser in the raidtools somehow, when I remove all the extra spaces, mkraid still fails with a lot of debug output. When I was pouring through it, it occurred to me that perhaps mkraid was expecting a chunk-size parameter as well. I put in chunk-size 8 after the persistent-superblock line, and sure enough, mkraid worked, and after typing both my partitions 0xfd, the kernel automatically recognizes them on boot, as well. Of course, the number 8 came right out of my ass (or some other example for some other raid level somewhere), and I have no idea what chunk size means in the context of raid-linear. But whatever, it seems to work. Then I just ran mke2fs /dev/md0 and then you can mount it, add /dev/md0 to your /etc/fstab, or whatever. Of course, raid-1 has additional considerations vis-a-vis how it handles failures, how to add/remove additional mirrors (I assume), etc... but just to get it working, I hope this is helpful... David Wood | Templar Studios Inc. 157 Ludlow Street N 600 | New York, NY 10002 tel 212.982.9360 | fax 212.982.9370
Re: Newbie question - Setting up a raid-linear, raid-1
On 17-Aug-99 David Wood wrote: Michael, you cannot (as yet, AFAIK) take an existing ext2 partition and raid it without "reformatting" it. The only way to do it is to back up your data, repartition (as necessary), set up your raid, mkfs, and then restore the data into the new (multi-partition/drive-based) filesystem. Have you read the latest Software-RAID HowTo? There is a description how to setup a Root-RAID system using an existing disk and another one without destroying the contents of the existing disk. This also works for non-Root FS setups, of course. cu. --- Christian Ordig | Homepage: http://thor.prohosting.com/~chrordig/ Germany |eMail: Christian Ordig [EMAIL PROTECTED] __ _ | / / (_)__ __ __ | Why Linux? Because it is free, stable, and / /__/ / _ \/ // /\ \/ / | bugs can be fixed in source opposed to waiting //_/_//_/\_,_/ /_/\_\ | for a stable WinTendo from Micro$oft.
Re: Newbie question - Setting up a raid-linear, raid-1
On Tue, 17 Aug 1999, David Wood wrote: On Tue, 17 Aug 1999, Michael Ghens wrote: I have a running system that I would like to put into raid1. However, what I have read is that the mkraid command would erase everything. Is this true? Will I loose my data that I have, or is it only the second disk that bites it. Michael, you cannot (as yet, AFAIK) take an existing ext2 partition and raid it without "reformatting" it. The only way to do it is to back up your data, repartition (as necessary), set up your raid, mkfs, and then restore the data into the new (multi-partition/drive-based) filesystem. Hmm. I just realized this may not actually be true, although I can't find anything in the faq about it one way or the other. I guess in theory, you could set up raid-1 with an already working partition as the first disk, and when you turned it on, the reconstruction would mirror it to the others? Though that's a totally arbitrary guess - I wouldn't try it. Even if something like this worked, you wouldn't be able to write persistent superblocks - this would foil your filesystem, I believe? David Wood | Templar Studios Inc. 157 Ludlow Street N 600 | New York, NY 10002 tel 212.982.9360 | fax 212.982.9370
Re: Newbie question - Setting up a raid-linear, raid-1
On Wed, 18 Aug 1999, Christian Ordig wrote: Michael, you cannot (as yet, AFAIK) take an existing ext2 partition and raid it without "reformatting" it. The only way to do it is to back up your data, repartition (as necessary), set up your raid, mkfs, and then restore the data into the new (multi-partition/drive-based) filesystem. Have you read the latest Software-RAID HowTo? There is a description how to setup a Root-RAID system using an existing disk and another one without destroying the contents of the existing disk. This also works for non-Root FS setups, of course. Ahah. The root-raid section was the only place I hadn't thought to look for this info. Thanks! David Wood | Templar Studios Inc. 157 Ludlow Street N 600 | New York, NY 10002 tel 212.982.9360 | fax 212.982.9370