vBulletin Search Engine Optimization
| |||||||
| Register | FAQ | Members List | Calendar | Search | Today's Posts | Mark Forums Read |
| ||||
| Hi, I've successfully setup raid ( mirroring ) on 2 80gb drives. However, I can't get the machine to recognise and boot off the second drive. Presumably it's not marked as bootable, and may not have a boot loader? How can I fix this? I thought the raid would copy all this information too? This is on Centos 4.1, installed as raid from scratch. Rgds, Dan |
| |||
| Connor T <madman_dan@hotmail.com> wrote: > I've successfully setup raid ( mirroring ) on 2 80gb drives. Linux soft raid is per partition, not per "drive", so it is not clear what you mean (and it is a fairly silly idea IMNSHO to have / on a raid partition, since it should nearly never change, hence millisecond by millisecond mirroring is unneccesary and just complicates boot and makes it more unreliable - which you do not want). > However, I can't get the machine to recognise and boot off the second > drive. I don't know what you mean. Are you saying that if you take the first drive out then boot and let the bios read the MBR on the second drive, then that MBR turns out t pint to the first drive, and hence, nix, not, no. If so. > Presumably it's not marked as bootable There's no such thing. That's a widnos concept associated with a flag on the partition. It's meaningless to all the linux loaders I know. > and may not have a boot > loader? You tell me. How would we know? Did you put one there? If not, then no, there is none there. > How can I fix this? By putting one there, if indeed there is none. > I thought the raid would copy all this information I don't know what you mean. Anyway, "linux soft raid is per partition, not per disk". > too? But you don't want the information copied. You want different bootloaders, in principle, becuase the kernel image is on different disks - the bios device code would have to be different. SO what on EARTH are you on about? > This is on Centos 4.1, installed as raid from scratch. What do you mean? What is a "Centos 4.1"? Is it a distro? I suppose so! And what do you mean by "installed as raid"? Raid is a technology. Peter |
| |||
| Ok, I'll go back a step then. I have 2 disks, and I want to protect against disk failure. I dont care about the fact that / doesnt change much - I need to make sure I can boot when one disk fails. Unfortunately the machine doesnt have hardware raid, so I used the software option in the install. I have managed to get it to mirror everything, but yes, like you say when i put the second disk in as primary it wont boot from it. ( Centos is a RHEL clone ) So, are you saying I can't do that with linux software raid? Or is it simply i need to install a different bootloader on the second disk. Different how so? Rgds, Dan |
| |||
| Connor T <madman_dan@hotmail.com> wrote: > I have 2 disks, and I want to protect against disk failure. I dont > care about the fact that / doesnt change much - I need to make sure I > can boot when one disk fails. Then using RAID on the root partition is NOT the way to do it. It makes the boot process more fragile! You can't even manage to boot it now! The standard way to do what you want is to have a mirror root partition on the other disk - mirrored every day, or something. That also lets it act as a backup against stupid admin blunders like rm'ing something important. Raid, in contrast, instantly mirrors every stupid admin blunder. SInce 95% percent of failures are admin induced, that is not a terribly good idea. > Unfortunately the machine doesnt have > hardware raid, so I used the software option in the install. And what does it do? As I said, linux soft raid is per partition! > I have > managed to get it to mirror everything, but yes, like you say when i > put the second disk in as primary it wont boot from it. That is what I would expect. I suggest you put a boot sector on your second disk - one that is appropriate to your situation. The sector wants to point at your kernel image on your second disk, not the first disk. Whereas, of course, the boot sector on the first disk wants to point to your kernel image on your first disk. So you want them to be DIFFERENT, not "mirrored". > ( Centos is a RHEL clone ) And RHEL is some RH distro. Hmm. > So, are you saying I can't do that with linux software raid? You can do anything. > Or is it simply i need to install a different bootloader on the second > disk. Different how so? In the obvious way! I believe lilo has an option to do that automatically, or does do it autmatically. In fact, I guess it would have been done autmatically, which kind of makes me suspect that after taking out your first disk, you went on to change the boot order in the bios, or something, thus changing the device codes needed to access different devices. Or maybe you didn't, but maybe your bios can't boot from a slave device. Or maybe not from the second ide channel. Or maybe you took out the master on an ide channel, and left only the slave (which can't work on its own). Or maybe you switched master and slave jumpers round, so that the boot sector on the slave which really DID point to the slave is now pointing at the wrong place, since the disk is now in the master position. We don't know, since you don't tell! Peter |
| |||
| Yes, i did change the physically connected disks, that was because my bios wasnt giving me the option to boot from the secondary channel. So i wanted to find out if that was a bios restriction or if it was because the drive didnt have a bootloader. Note, it's the secondary channel, not a slave drive ( thats irrelevant ) This is not fundamentally hard what I want to do. This is exactly what linux raid does, and there must be loads of people with setups like this. You're making it sound like it's worse that it is. ( dont get me wrong I appreciate the help) The basic question is how do I make a drive which has an image on it, into a bootable drive? oh; I dont know where you got the 95% statistic from but thats not why i'm using raid. I need to protect against drive failure, nothing more. I'm not even fussed if i have to change drives physically when one dies, but just as long as I have the image there and ready to go! does that make sense? |
| |||
| Connor T <madman_dan@hotmail.com> wrote: > Yes, i did change the physically connected disks, that was because my > bios wasnt giving me the option to boot from the secondary channel. Aha. So there is no point in placing a raid-aware bios on the second disk (master on the second channel, I suppose) because your bios can't boot from there. So in the event of a breakdown you will survive for the moment, but you won't be able to reboot without thinking about it. And to insert a replacement first drive you will have to halt and reboot. Whoops. Sounds like your RAID strategy is all bollixed by the unfortunate facts of the matter :-). Never mind. It's not so bad. Just arrange for a mail to ne sent to you when the first disk breaks reminding you that to reboot you will need a boot medium with a kernel with raid support and to boot it with root=/dev/md0 with md0 set up just right. I told you that RAID on the root partition was a recipe for fragility, he heh. > So > i wanted to find out if that was a bios restriction or if it was > because the drive didnt have a bootloader. Note, it's the secondary > channel, not a slave drive ( thats irrelevant ) > This is not fundamentally hard what I want to do. This is exactly what > linux raid does, and there must be loads of people with setups like > this. You're making it sound like it's worse that it is. ( dont get > me wrong I appreciate the help) The basic question is how do I make a > drive which has an image on it, into a bootable drive? I don't know what you mean by "bootable". It's an ill-defined term. If you want, you can place a floppy in the hole and boot a j.random kernel on it with root=/dev/hdc5 (or whatever) and forget that raid nonsense when your first disk breaks. You don't have to mount the mirror half as raid! It's perfectly well mountable in its own right. Or you might cnsider copying the boot sector of the first disk to the second disk, then when the first disk breaks, simply take it out and replace it by the second, in the slot formerly occupied by the first disk. That should boot right up afterwards. > oh; I dont know where you got the 95% statistic from but thats not why I invented it. 95% of all statistics are invented. OTOH, it might be that thing called "experience". > i'm using raid. I need to protect against drive failure, nothing more. What do you mean by "protect"? Can you stop using vague terms and specify, exactly, what you want? You already have a copy of the data, up to the minute. Is that not "protection"? If not, what do you really want? > I'm not even fussed if i have to change drives physically when one > dies, but just as long as I have the image there and ready to go! > does that make sense? If you want to be able to REBOOT happily after a primary drive failure, all you need is a spare floppy. But you must have a boot sector prepared on a device that your bios can boot. That precludes, in your case, the disk on the second IDE channel, so there is NO WAY that you can reboot without performing at least some physical changes. Now, once youahve decided that you need to make physical changes, you need to decide what those will be. Once you have decided, you can decide what configurations of the boot sector are appropriate. Personally, I wouldn't bother with any of that nonsense. I'd just have a daily (cumulative) update of the root partition to a mirror copy, and in case of accident worry about rebooting some time later after checking that the DATA was still safe. After all, I'd liley put the DATA in another machine altogether, so who cares about the boot sector? But if you want a seamless failover through reboot, why not use a bios hat is up to the task. Come to that, why not use a (raid?) mirror to another disk on anther machine? Then failover would be rather easier to accomplish. But the way you are going about it is not going to get you what you want. You I think would do best to copy the first disks boot sector to the second disk, and plan on moving the disk should the first disk fail. Peter |
| |||
| On Tue, 04 Oct 2005 21:13:20 +0200, Connor T <madman_dan@hotmail.com> wrote: > Yes, i did change the physically connected disks, that was because my > bios wasnt giving me the option to boot from the secondary channel. So > i wanted to find out if that was a bios restriction or if it was > because the drive didnt have a bootloader. Note, it's the secondary > channel, not a slave drive ( thats irrelevant ) > > This is not fundamentally hard what I want to do. This is exactly what > linux raid does, and there must be loads of people with setups like > this. You're making it sound like it's worse that it is. ( dont get > me wrong I appreciate the help) The basic question is how do I make a > drive which has an image on it, into a bootable drive? > > oh; I dont know where you got the 95% statistic from but thats not why > i'm using raid. I need to protect against drive failure, nothing more. > I'm not even fussed if i have to change drives physically when one > dies, but just as long as I have the image there and ready to go! > > does that make sense? Perhaps it's time to look at what exactly went wrong when you tried to boot off the second disk? It sounds to me like we now have a bunch of factors on the table. and can begin thinking, tinkering, and experimenting. Suppose you have two boot partitions, one on each disk, and the contents are equal, say, both direct Grub to load a kernel from (hd0,0). If disk (hd0) i.e., primary ide, master, dies, and you reconnect the other disk so it becomes (hd0) - then it is probably OK to have identical contents. Is this what you tried, and it did not work? "Presumably it's not marked as bootable". As Peter said, Linux does not care about that flag. Boot loaders like Lilo and Grub happily boot with out regard to such flags. What boot loader do you have? etc. Good luck. Enrique |
| |||
| In comp.os.linux.setup Peter T. Breuer <ptb@oboe.it.uc3m.es>: > Connor T <madman_dan@hotmail.com> wrote: >> I have 2 disks, and I want to protect against disk failure. I dont >> care about the fact that / doesnt change much - I need to make sure I >> can boot when one disk fails. > Then using RAID on the root partition is NOT the way to do it. It > makes the boot process more fragile! You can't even manage to boot it > now! > The standard way to do what you want is to have a mirror root > partition on the other disk - mirrored every day, or something. That > also lets it act as a backup against stupid admin blunders like Sure if you can afford the downtime, it should be easier. Anyway disks tend to break that's all RAID does help you to survive. Even without hotplug allowing for uninterrupted services, you can still schedule the downtime, unlikely that the mirror disk will break in the next few hours. > rm'ing something important. Raid, in contrast, instantly mirrors every > stupid admin blunder. SInce 95% percent of failures are admin > induced, that is not a terribly good idea. It works just fine, if you happen to have the hardware. Sure you need to reboot if disks aren't hotplug able and even with it doesn't always work with softraid. But you can expect at least 75% chances that hotplug will work with softraid or even better haven't done enough tests for a halfway reliable data source. ;-) The nice thing about softraid, it allows to easily duplicate a system, only the better hardware raid controller can. [..] >> ( Centos is a RHEL clone ) > And RHEL is some RH distro. Hmm. >> So, are you saying I can't do that with linux software raid? > You can do anything. >> Or is it simply i need to install a different bootloader on the second >> disk. Different how so? > In the obvious way! I believe lilo has an option to do that > automatically, or does do it autmatically. Yep, just point the loader to the md device containing "/" and rerun 'lilo -v', you should see it writing on both disks and both will be perfectly bootable, at least with RHEL. > In fact, I guess it would have been done autmatically, which kind of > makes me suspect that after taking out your first disk, you went on to > change the boot order in the bios, or something, thus changing the > device codes needed to access different devices. > Or maybe you didn't, but maybe your bios can't boot from a slave > device. Or maybe not from the second ide channel. Or maybe you took > out the master on an ide channel, and left only the slave (which can't > work on its own). Or maybe you switched master and slave jumpers > round, so that the boot sector on the slave which really DID point to > the slave is now pointing at the wrong place, since the disk is now in > the master position. > We don't know, since you don't tell! -- Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94) mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/' #bofh excuse 224: Jan 9 16:41:27 huber su: 'su root' succeeded for .... on /dev/pts/1 |
| |||
| In comp.os.linux.setup Michael Heiming <michael+USENET@www.heiming.de>: > In comp.os.linux.setup Peter T. Breuer <ptb@oboe.it.uc3m.es>: >> Connor T <madman_dan@hotmail.com> wrote: [..] >>> ( Centos is a RHEL clone ) [..] >> In the obvious way! I believe lilo has an option to do that >> automatically, or does do it autmatically. > Yep, just point the loader to the md device containing "/" and > rerun 'lilo -v', you should see it writing on both disks and > both will be perfectly bootable, at least with RHEL. In addition, look at this example of a working softraid 1 configuration: Presuming "root=/dev/md5", put in lilo.conf: boot=/dev/md5 Now run 'lilo -v': # lilo -v LILO version 21.4-4, Copyright (C) 1992-1998 Werner Almesberger 'lba32' extensions Copyright (C) 1999,2000 John Coffman boot = /dev/sdb, map = /boot/map.0811 Reading boot sector from /dev/sdb Merging with /boot/boot.b [..] /boot/boot.0810 exists - no backup copy made. Writing boot sector. boot = /dev/sda, map = /boot/map.0801 Reading boot sector from /dev/sda Merging with /boot/boot.b [..] As you can see, lilo happily writes the boot sector to both disks and the system can boot from both. This example uses SCSI disks, but that doesn't matter, it works as fine with IDE. Just be aware that not all distro allow this out of the box. [..] -- Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94) mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/' #bofh excuse 376: Budget cuts forced us to sell all the power cords for the servers. |
| ||||
| Ok, many apolologies for taking so long to come back to this, but i've just tried this, got lilo installed, and it seems to update on both hdd's when i run lilo -v. So, I have /dev/md0 happily running. I turned the pc off, disconnected the primary hdd, and powered back on. The system came up, but LILO only got to the LI stage, which is apparently something to do with drive geometry differences? Admittedly the drives are _not_ identical. Any ideas? Michael Heiming wrote: > In comp.os.linux.setup Michael Heiming <michael+USENET@www.heiming.de>: > > In comp.os.linux.setup Peter T. Breuer <ptb@oboe.it.uc3m.es>: > >> Connor T <madman_dan@hotmail.com> wrote: > [..] > > >>> ( Centos is a RHEL clone ) > > [..] > > >> In the obvious way! I believe lilo has an option to do that > >> automatically, or does do it autmatically. > > > Yep, just point the loader to the md device containing "/" and > > rerun 'lilo -v', you should see it writing on both disks and > > both will be perfectly bootable, at least with RHEL. > > In addition, look at this example of a working softraid 1 > configuration: > > Presuming "root=/dev/md5", put in lilo.conf: > > boot=/dev/md5 > > Now run 'lilo -v': > > # lilo -v > LILO version 21.4-4, Copyright (C) 1992-1998 Werner Almesberger > 'lba32' extensions Copyright (C) 1999,2000 John Coffman > > boot = /dev/sdb, map = /boot/map.0811 > Reading boot sector from /dev/sdb > Merging with /boot/boot.b > [..] > /boot/boot.0810 exists - no backup copy made. > Writing boot sector. > boot = /dev/sda, map = /boot/map.0801 > Reading boot sector from /dev/sda > Merging with /boot/boot.b > [..] > > As you can see, lilo happily writes the boot sector to both disks > and the system can boot from both. This example uses SCSI disks, > but that doesn't matter, it works as fine with IDE. Just be aware > that not all distro allow this out of the box. > > [..] > > -- > Michael Heiming (X-PGP-Sig > GPG-Key ID: EDD27B94) > mail: echo zvpunry@urvzvat.qr | perl -pe 'y/a-z/n-za-m/' > #bofh excuse 376: Budget cuts forced us to sell all the power > cords for the servers. |