Re: mirrored root fs?
On Tue, 7 Jan 2003, Soeren Schmidt wrote: For those that are brave enough to play with this I just created the following small change to ata-raid.c. Now it will always rebuild the array on creation, using the first disk as the master image. This allows you to turn any set of ATA disks into a mirror on the fly.. Remember to rename you filesystems in fstab before booting :) Thanks, couple comments: * You should be able to use M_WAITOK in your mallocs for all funcs called by ioctl since you have a process context * Shouldn't you only do the rebuild automatically if the raid type is AR_F_FREEBSD_RAID? It's not necessary if it's hw raid, right? * Should this be optional so that it's not rebuilt every time you run atacontrol create? -Nate To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
It seems Nate Lawson wrote: On Tue, 7 Jan 2003, Soeren Schmidt wrote: For those that are brave enough to play with this I just created the following small change to ata-raid.c. Now it will always rebuild the array on creation, using the first disk as the master image. This allows you to turn any set of ATA disks into a mirror on the fly.. Remember to rename you filesystems in fstab before booting :) Thanks, couple comments: * You should be able to use M_WAITOK in your mallocs for all funcs called by ioctl since you have a process context Good point.. * Shouldn't you only do the rebuild automatically if the raid type is AR_F_FREEBSD_RAID? It's not necessary if it's hw raid, right? If you create the RAID from within FreeBSD on a running system it is needed for all controllers. I also need to defer access through *strategy while doing the setup, and let it loose when the build is running. * Should this be optional so that it's not rebuilt every time you run atacontrol create? Yes, this was a quick fix, I need an extra argument from atacontrol to flag rebuilding. I'm in the process of refining the RAID ioctl interface so that I can use it for the SuperTrak (ie intelligent) controllers as well, we dont need more XXXcontrol programs... -Søren To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
It seems Soeren Schmidt wrote: It should work on 4.7 forward, but its been a while since I played with it. Another thing is that its a pain to make a mirror on an already running system (which is often wanted), so I plan to add an option to atacontrol to tell where to get the master from, and then do an automatic rebuild during the create phase ie: atacontrol create RAID1 ad0 ad2 source ad0 This will create a mirror using ad0 and ad2, and start a rebuild to build the master with data from ad0. This way you can do a normal install, add a second (identical or bigger) disk, and make a mirror out of those. You just have to change your fstab before rebooting (ad0 - ar0) in order to boot... For those that are brave enough to play with this I just created the following small change to ata-raid.c. Now it will always rebuild the array on creation, using the first disk as the master image. This allows you to turn any set of ATA disks into a mirror on the fly.. Remember to rename you filesystems in fstab before booting :) Index: ata-raid.c === RCS file: /home/ncvs/src/sys/dev/ata/ata-raid.c,v retrieving revision 1.50 diff -u -r1.50 ata-raid.c --- ata-raid.c 2 Oct 2002 07:44:17 - 1.50 +++ ata-raid.c 7 Jan 2003 10:02:50 - @@ -374,7 +374,14 @@ rdp-flags |= AR_F_READY; ar_table[array] = rdp; + +/* kick off rebuild here */ +if (setup-type == 2) { + rdp-disks[1].flags = ~AR_DF_ONLINE; + rdp-disks[1].flags |= AR_DF_SPARE; +} ar_attach_raid(rdp, 1); +ata_raid_rebuild(array); setup-unit = array; return 0; } -Søren To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
Quoting Soeren Schmidt [EMAIL PROTECTED]: | It seems Soeren Schmidt wrote: | | It should work on 4.7 forward, but its been a while since I played with | it. | Another thing is that its a pain to make a mirror on an already running | system (which is often wanted), so I plan to add an option to atacontrol | to tell where to get the master from, and then do an automatic rebuild | during the create phase ie: | | atacontrol create RAID1 ad0 ad2 source ad0 | | This will create a mirror using ad0 and ad2, and start a rebuild to | build the master with data from ad0. This way you can do a normal | install, add a second (identical or bigger) disk, and make a | mirror out of those. You just have to change your fstab before | rebooting (ad0 - ar0) in order to boot... | | For those that are brave enough to play with this I just created the | following small change to ata-raid.c. Now it will always rebuild the | array on creation, using the first disk as the master image. This | allows you to turn any set of ATA disks into a mirror on the fly.. | Remember to rename you filesystems in fstab before booting :) | | Index: ata-raid.c | === | RCS file: /home/ncvs/src/sys/dev/ata/ata-raid.c,v | retrieving revision 1.50 | diff -u -r1.50 ata-raid.c | --- ata-raid.c 2 Oct 2002 07:44:17 - 1.50 | +++ ata-raid.c 7 Jan 2003 10:02:50 - | @@ -374,7 +374,14 @@ | rdp-flags |= AR_F_READY; | | ar_table[array] = rdp; | + | +/* kick off rebuild here */ | +if (setup-type == 2) { | + rdp-disks[1].flags = ~AR_DF_ONLINE; | + rdp-disks[1].flags |= AR_DF_SPARE; | +} | ar_attach_raid(rdp, 1); | +ata_raid_rebuild(array); | setup-unit = array; | return 0; | } Søren, This is a real temptation. Let me be sure that I'm understanding correctly. I have an old machine, but running today's current, with only one disk, ad0. Could I do the following? o- Add ad2 o- run atacontrol create RAID1 ad0 ad2 source ad0 o- change ad0s1a to ar0s1a through ad0s1f to ar0s1f in fstab o- reboot and enjoy my new mirror. If ar0 were to die, I would just take it out connect ar2 and boot as ? I could then do the same with a new mirror, I suppose? If I'm understanding correctly, I could use any disk ad0 as the mirror. Is that correct? One last question, what prompted you to preceed the patch with For those that are brave enough to play with this, where could it come back and bit me? :-) Thanks, ed - To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
It seems [EMAIL PROTECTED] wrote: Søren, This is a real temptation. Let me be sure that I'm understanding correctly. I have an old machine, but running today's current, with only one disk, ad0. Could I do the following? o- Add ad2 o- run atacontrol create RAID1 ad0 ad2 source ad0 o- change ad0s1a to ar0s1a through ad0s1f to ar0s1f in fstab o- reboot and enjoy my new mirror. Exactly, modulo the source ad0 bit which is not in atacontrol (yet), it will always the the first disk (ad0 here) in the mirror as the master to make the mirror from. If ar0 were to die, I would just take it out connect ar2 and boot as ? I could then do the same with a new mirror, I suppose? If one of the disks die, you can boot on the degraded mirror, one caveat is that your BIOS might not want to boot from ad2 just from ad0, if thats the case swap the drives, and boot... Then when you are up, atacontrol detach the failed device, swap it with a new one, atacontrol attach, atacontrol rebuild, voila... Another way is to boot the degraded mirror, then when its up you do a atacontrol delete to get rid of the mirror, remember to change your fstab back to adX instead of arX, and reboot... If I'm understanding correctly, I could use any disk ad0 as the mirror. Is that correct? Yes, as it is currently it must be on another non-RAID controller, or the BIOS on there will get mighty confused only having part of a RAID config on it :) One last question, what prompted you to preceed the patch with For those that are brave enough to play with this, where could it come back and bit me? :-) Doing stuff to your root filesystems is always dangerous, so you have been warned :) -Søren To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
Quoting Soeren Schmidt [EMAIL PROTECTED]: | Doing stuff to your root filesystems is always dangerous, so you | have been warned :) | Thanks, Søren. Indeed I have:-) I'll give it a try over the coming weekend after backing up everything:). Will this patch be committed to the tree, before then? This is really great news. I sometimes feel like I live under a rock, I didn't realize that atacontrol raid was working so well. Do you know of any documentation on setting it up on a new system install, especially atacontrol RAID1+0? I haven't used vinum because of the root partition limitations and the complexity of the first configuration although I have been on the verge several times. BTW, is this an integration of vinum? To not have to be limited to hw raid by having similar flexibility and ease of use with software raid will be/is, IMO, fantastic. Thanks, ed - To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
It seems [EMAIL PROTECTED] wrote: | Doing stuff to your root filesystems is always dangerous, so you | have been warned :) Thanks, Søren. Indeed I have:-) I'll give it a try over the coming weekend after backing up everything:). Will this patch be committed to the tree, before then? Maybe, I'm still thinking about if I should make it an option in atacontrol to do the mirror rebuild on create... This is really great news. I sometimes feel like I live under a rock, I didn't realize that atacontrol raid was working so well. Do you know of any documentation on setting it up on a new system install, especially atacontrol RAID1+0? man atacontrol :) However if you want to use RAID1+0 and you want to be able to boot from it you *need* a RAID capable controller BIOS, there is no way to make a stock BIOS boot from a RAID0... If you need it on install you probably also need at RAID capable controller, if you define the RAID BIOS there, it will show up in sysinstall.. I haven't used vinum because of the root partition limitations and the complexity of the first configuration although I have been on the verge several times. BTW, is this an integration of vinum? To not have to be limited to hw raid by having similar flexibility and ease of use with software raid will be/is, IMO, fantastic. No, the RAID part of the ATA driver has nothing to do with vinum. Vinum has several limitations that make it useless in this context. Mainly that the RAID config layout on disk need to be of different formats depending on what controller BIOS we have, and there is no place to put all the extra volume stuff that vinum needs. The ATA RAID code is very generic instead, with backends that converts the internal RAID info to/from the needed info on disk depending on controller type. -Søren To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
Quoting Soeren Schmidt [EMAIL PROTECTED]: | man atacontrol :) I did that but it sounded too easy :) | | However if you want to use RAID1+0 and you want to be able to | boot from it you *need* a RAID capable controller BIOS, there is | no way to make a stock BIOS boot from a RAID0... | If you need it on install you probably also need at RAID capable | controller, if you define the RAID BIOS there, it will show up | in sysinstall.. The solution that pops into my mind is to have a small ad0 for boot and / partition. and ad1,ad2,ad3 as raid0+1 or ad1 and 2 as raid1 raid1 should solve my problem. Would either of these be configurable on sysinstall to have the /var and /usr partitions on the raid disks? If not that should be easy enough after a minimal install and reboot on ad0. | | I haven't used vinum because of the root partition limitations and | the complexity of the first configuration although I have been on the | verge several times. BTW, is this an integration of vinum? To not | have to be limited to hw raid by having similar flexibility and ease | of use with software raid will be/is, IMO, fantastic. | | No, the RAID part of the ATA driver has nothing to do with vinum. | Vinum has several limitations that make it useless in this context. | Mainly that the RAID config layout on disk need to be of different | formats depending on what controller BIOS we have, and there is no | place to put all the extra volume stuff that vinum needs. | The ATA RAID code is very generic instead, with backends that converts | the internal RAID info to/from the needed info on disk depending | on controller type. Thanks for the clarification, Søren. Please forgive my basic, uninitiated questions. I really should probably have been paying more attention as these features were being added. ed - To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
It seems [EMAIL PROTECTED] wrote: | man atacontrol :) I did that but it sounded too easy :) It actually is :) | However if you want to use RAID1+0 and you want to be able to | boot from it you *need* a RAID capable controller BIOS, there is | no way to make a stock BIOS boot from a RAID0... | If you need it on install you probably also need at RAID capable | controller, if you define the RAID BIOS there, it will show up | in sysinstall.. The solution that pops into my mind is to have a small ad0 for boot and / partition. and ad1,ad2,ad3 as raid0+1 or ad1 and 2 as raid1 raid1 should solve my problem. Would either of these be configurable on sysinstall to have the /var and /usr partitions on the raid disks? If not that should be easy enough after a minimal install and reboot on ad0. You need 4 disks for RAID0+1, and if you want to see the RAID's in sysinstall you need to have them created first, either by having a real ATA RAID controller, or having made it beforehand on the disks in possibly another machine or from a minimal install. Once the RAID's has been setup, sysinstall will pick them up.. (Maybe one can boot the fixit thingy and run atacontrol from the live filesystem, havn't tried)... | No, the RAID part of the ATA driver has nothing to do with vinum. | Vinum has several limitations that make it useless in this context. | Mainly that the RAID config layout on disk need to be of different | formats depending on what controller BIOS we have, and there is no | place to put all the extra volume stuff that vinum needs. | The ATA RAID code is very generic instead, with backends that converts | the internal RAID info to/from the needed info on disk depending | on controller type. Thanks for the clarification, Søren. Please forgive my basic, uninitiated questions. I really should probably have been paying more attention as these features were being added. No problem, feel free to ask, we add so many features to FreeBSD all the time it can be hard to follow them all... -Søren To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
mirrored root fs?
I'd like to have a mirrored root partition. I tried ccd(4) but the boot blocks couldn't find the fs. Any idea how much work it would take to enable booting a ccd root? Also, does vinum already support this? Thanks, Nate To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
It seems Nate Lawson wrote: I'd like to have a mirrored root partition. I tried ccd(4) but the boot blocks couldn't find the fs. Any idea how much work it would take to enable booting a ccd root? Also, does vinum already support this? If you use ATA drives you can use atacontrol to make the mirror on two ATA disks, but there are some gotcha's, see atacontrol(1) -Søren To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
In message [EMAIL PROTECTED], Nate Lawson wri tes: I'd like to have a mirrored root partition. I tried ccd(4) but the boot blocks couldn't find the fs. Any idea how much work it would take to enable booting a ccd root? Also, does vinum already support this? The best way to do this is to get a cheap ATA raid controller (I use a promise). That way the bios can load your OS if a mirror side drops. -- Poul-Henning Kamp | UNIX since Zilog Zeus 3.20 [EMAIL PROTECTED] | TCP/IP since RFC 956 FreeBSD committer | BSD since 4.3-tahoe Never attribute to malice what can adequately be explained by incompetence. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
On Mon, 6 Jan 2003, Soeren Schmidt wrote: It seems Nate Lawson wrote: I'd like to have a mirrored root partition. I tried ccd(4) but the boot blocks couldn't find the fs. Any idea how much work it would take to enable booting a ccd root? Also, does vinum already support this? If you use ATA drives you can use atacontrol to make the mirror on two ATA disks, but there are some gotcha's, see atacontrol(1) Interesting. To support booting, I'd probably need to hack /etc/rc to enable the mirror before mounting fs r/w. Also, does it matter which of the /dev/ad* entries are used as the mount device? -Nate To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
It seems [EMAIL PROTECTED] wrote: On Mon, Jan 06, 2003 at 07:29:51PM +0100, Soeren Schmidt wrote: It seems Nate Lawson wrote: I'd like to have a mirrored root partition. I tried ccd(4) but the boot blocks couldn't find the fs. Any idea how much work it would take to enable booting a ccd root? Also, does vinum already support this? If you use ATA drives you can use atacontrol to make the mirror on two ATA disks, but there are some gotcha's, see atacontrol(1) Using non-raid controllers for building raid-arrays would be a cool feature if `atacontrol rebuild` would work... Is there simple way, i.e. without copying the content of the array to a temporary location, to recover from disk-failures when doing raid1 on non-raid controllers ? The problem is that if its the drive that on you primary channel that dies, not all BIOS's can be taught to boot from the other drive on the secondary channel. The solution is to swap the drives... -Søren To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
On Mon, Jan 06, 2003 at 08:08:09PM +0100, Soeren Schmidt wrote: It seems [EMAIL PROTECTED] wrote: On Mon, Jan 06, 2003 at 07:29:51PM +0100, Soeren Schmidt wrote: It seems Nate Lawson wrote: I'd like to have a mirrored root partition. I tried ccd(4) but the boot blocks couldn't find the fs. Any idea how much work it would take to enable booting a ccd root? Also, does vinum already support this? If you use ATA drives you can use atacontrol to make the mirror on two ATA disks, but there are some gotcha's, see atacontrol(1) Using non-raid controllers for building raid-arrays would be a cool feature if `atacontrol rebuild` would work... Is there simple way, i.e. without copying the content of the array to a temporary location, to recover from disk-failures when doing raid1 on non-raid controllers ? The problem is that if its the drive that on you primary channel that dies, not all BIOS's can be taught to boot from the other drive on the secondary channel. The solution is to swap the drives... Well, and how would one rebuild the array after swaping the drive from the secondary channel to the primary and hooking up a replacement drive to the secondary channel or if one doesn't want to boot from the array at all ? To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
On Mon, Jan 06, 2003 at 10:27:21AM -0800, Nate Lawson wrote: I'd like to have a mirrored root partition. I tried ccd(4) but the boot blocks couldn't find the fs. Any idea how much work it would take to enable booting a ccd root? Also, does vinum already support this? I've moved ccdconfig and ccd.conf to /boot and made /boot its own FS, wiht the intention of doing what you want to do. I never got around to testing this setup. :-( To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
It seems [EMAIL PROTECTED] wrote: if `atacontrol rebuild` would work... Is there simple way, i.e. without copying the content of the array to a temporary location, to recover from disk-failures when doing raid1 on non-raid controllers ? The problem is that if its the drive that on you primary channel that dies, not all BIOS's can be taught to boot from the other drive on the secondary channel. The solution is to swap the drives... Well, and how would one rebuild the array after swaping the drive from the secondary channel to the primary and hooking up a replacement drive to the secondary channel or if one doesn't want to boot from the array at all ? You can boot off the half-mirror and the rebuild with atacontrol once the system is up (its done in the background so you can continue to run but access speed will be degraded). If you want to not use the array you just delete it with atatcontrol and the disk will be seen as a normal ATA drive again. -Søren To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
On Mon, Jan 06, 2003 at 08:36:20PM +0100, Soeren Schmidt wrote: It seems [EMAIL PROTECTED] wrote: if `atacontrol rebuild` would work... Is there simple way, i.e. without copying the content of the array to a temporary location, to recover from disk-failures when doing raid1 on non-raid controllers ? The problem is that if its the drive that on you primary channel that dies, not all BIOS's can be taught to boot from the other drive on the secondary channel. The solution is to swap the drives... Well, and how would one rebuild the array after swaping the drive from the secondary channel to the primary and hooking up a replacement drive to the secondary channel or if one doesn't want to boot from the array at all ? You can boot off the half-mirror and the rebuild with atacontrol once the system is up (its done in the background so you can continue to run but access speed will be degraded). And how is this to be done ? :) `atacontrol rebuild ar0` didn't work here (not configured IIRC) with a raid1-array on a non-raid controller and atacontrol(8) also states: rebuild Rebuild a RAID1 array on a RAID capable ATA controller. If you want to not use the array you just delete it with atatcontrol and the disk will be seen as a normal ATA drive again. I recovered by copying the content of the half-mirror to another location, unmounting ar0, `atacontrol create ar0 ...` after replacing the broken drive, ..., and finally copying the data back to the array. A simpler way would be fine. To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
On Mon, 6 Jan 2003, David O'Brien wrote: On Mon, Jan 06, 2003 at 10:27:21AM -0800, Nate Lawson wrote: I'd like to have a mirrored root partition. I tried ccd(4) but the boot blocks couldn't find the fs. Any idea how much work it would take to enable booting a ccd root? Also, does vinum already support this? I've moved ccdconfig and ccd.conf to /boot and made /boot its own FS, wiht the intention of doing what you want to do. I never got around to testing this setup. :-( That is suboptimal for me since I'd still have to manually mirror the /boot partition (dd) every time I updated the kernel. Not a huge problem but not quite what I want to do. The way I tested this was take a second drive, disklabeled it accordingly: disklabel ad2s1 to create an 'a' partition ccdconfig ccd0 128 none /dev/ad2s1a disklabel -w ccd0c auto newfs /dev/ccd0c cp / to ccd0c Thus there's a one-drive ccd partition. I added boot blocks and attempted to boot it but got a not ufs error. The ccd partition format is different from a normal ufs partition. My question was how different? and how much work to have the boot blocks find the right offset to the fs? ccdconfig is on /sbin so post kernel load should have worked fine. -Nate To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
At 11:54 AM -0800 1/6/03, Nate Lawson wrote: On Mon, 6 Jan 2003, David O'Brien wrote: On Mon, Jan 06, 2003 at 10:27:21AM -0800, Nate Lawson wrote: I'd like to have a mirrored root partition. I tried ccd(4) but the boot blocks couldn't find the fs. Any idea how much work it would take to enable booting a ccd root? Also, does vinum already support this? I've moved ccdconfig and ccd.conf to /boot and made /boot its own FS, with the intention of doing what you want to do. I never got around to testing this setup. :-( That is suboptimal for me since I'd still have to manually mirror the /boot partition (dd) every time I updated the kernel. Not a huge problem but not quite what I want to do. That is not necessarily a problem. I've meant to setup something where I would create a snapshot of the root partition, and then duplicate data from that snapshot to a different partition. My thinking was that I could set this up as a cron job, and back up the root partition every night. Probably do a 'dd' or an 'rsync', followed by a step to change /etc/fstab on the destination so it would be right for the destination. (create a snapshot in the UFS/softupdates sense of the phrase) This wouldn't be as up-to-date as official mirroring, but then my root partition doesn't change all that much, so a daily snapshot should be fine. Of course, I've never actually gotten around to implementing this, but my guess is that it's very doable and the result would be very flexible. (no special hardware, no special software, no special configs) About all I've done is that I always create a spare partition that's the same size as my root partition, and occasionally I test a backup to it... :-) -- Garance Alistair Drosehn= [EMAIL PROTECTED] Senior Systems Programmer or [EMAIL PROTECTED] Rensselaer Polytechnic Instituteor [EMAIL PROTECTED] To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
On Mon, 6 Jan 2003, Nate Lawson wrote: I'd like to have a mirrored root partition. I tried ccd(4) but the boot blocks couldn't find the fs. Any idea how much work it would take to enable booting a ccd root? Also, does vinum already support this? I gave this the old college try a while ago, here's what I found out about the different methods: 1) CCD -- no info I never really tried CCD as there seem to be much better options with atacontrol, vinum, and RAIDFrame. 2) 3Ware Escalade Cards Advantanges: They work like a charm and look just like a SCSI controller Disadvantages: Extra hardware. Expense. Proprietary. 3) atacontrol Probably your best choice right now if you have a real RAID controller on your motherboard. The BIOS takes care of most of the nasty booting details. If you don't have a real RAID controller on the motherboard, stop now. Rebuilds don't work if you don't have a real RAID controller. You can recover, but it requires some dancing with dd (search the archives). Advantages: BIOS handles bootup issues. Very little required from OS Disadvantages: Hardware required. Proprietary. Will not rebuild a broken array without hardware RAID The next two methods require only FreeBSD. They both share the same problem: you have to boot a kernel from somewhere non-RAID and then the kernel can autodetect RAID configurations as it boots. Autodetection of the RAID systems before mounting root is the key here. If something needs to mount / before it can configure, you can't mirror / since FreeBSD has no method for remounting /. Perhaps this has changed with the new GEOM code, somebody might want to ask Poul about this. 4) vinum ( http://www.vinumvm.org/ ) The older of the two general RAID systems for FreeBSD. vinum *can* be fairly complex as it was meant for doing more than just RAID (it is meant to be something akin to Veritas for full logical volume management). However, standard RAID 1 is a fairly simple configuration. At one point, I somehow managed to get vinum to autodetect /, but that was more than a year ago on -stable, I haven't tried -current. Advantages: No extra hardware required (beyond the disks themseleves). All code contained in FreeBSD (nothing proprietary) Does more than just RAID Disadvantages: Kernel required to be booted from somewhere non-RAID Unknown status with respect to SMP and GEOM 5) RAIDFrame ( http://people.freebsd.org/~scottl/rf/ ) RAIDFrame is the newer kid on the block in FreeBSD RAID. It is a port of the RAIDFrame code from NetBSD (which is itself a port of the RAIDFrame code from CMU, IIRC). Back in -stable within the last year, I managed to get RAIDFrame to autodetect on boot. Unknown in -current. Advantages: No extra hardware required (beyond the disks themseleves). All code contained in FreeBSD (nothing proprietary) Disadvantages: Kernel required to be booted from somewhere non-RAID Unknown status with respect to SMP and GEOM (although this stuff is on the radar screen) The following is not a true RAID solution, but it seems to be popular: 6) root partition pseudo-mirror using dd with RAID on other partitions ( http://ezine.daemonnews.org/200111/vinum.html ) This is what most people who use FreeBSD kernel-based RAID mirroring currently do. CAUTION: This does *not* have the reliability advantages of true RAID 1 mirroring. If the disk containing your root filesystem goes down, so does your system. This may not matter to you, but it is something you should be aware of. Advantages: No extra hardware required (beyond the disks themseleves). All code contained in FreeBSD (nothing proprietary) Kernel booted from pseudo-mirror Disadvantages: Root partition disk crash takes out system Manual copying of root partition required Mirroring with dd may fail on open files As always, these opinions are my own. Your mileage may vary. All disclaimers apply. Yadda, yadda, yadda, etc., etc. ;) Hope this helps, -a To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
On Monday, 6 January 2003 at 10:27:21 -0800, Nate Lawson wrote: I'd like to have a mirrored root partition. I tried ccd(4) but the boot blocks couldn't find the fs. Any idea how much work it would take to enable booting a ccd root? Also, does vinum already support this? I've had this working with Vinum, but the method abused the devstat subsystem, and was deeemed inappropriate. I have code in development which would do it. You're welcome to it if you want to implement it. Greg -- See complete headers for address and phone numbers To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
It seems Andrew P. Lentvorski, Jr. wrote: Probably your best choice right now if you have a real RAID controller on your motherboard. The BIOS takes care of most of the nasty booting details. If you don't have a real RAID controller on the motherboard, stop now. Rebuilds don't work if you don't have a real RAID controller. You can recover, but it requires some dancing with dd (search the archives). Advantages: BIOS handles bootup issues. Very little required from OS Disadvantages: Hardware required. Proprietary. Will not rebuild a broken array without hardware RAID Not true, you can boot off a broken mirror on a non-RAID ATA controller, and then rebuild on the fly with atacontrol once the system is up, you do not need the RAID BIOS for rebuilding a broken mirror. Proprietary, well, in the case of using a stock ATA controller for this its certainly not :) The only caveat is that not all motherboard BIOS's allow you to boot from anything but the disk on the primary ATA channel. If you have such an animal you need to swap drives if it is the primary channel drive that is dead. -Søren To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
On Tue, 7 Jan 2003, Soeren Schmidt wrote: Not true, you can boot off a broken mirror on a non-RAID ATA controller, and then rebuild on the fly with atacontrol once the system is up Is this new (ie. since August 22, 2002)? I attempted to do this back then and I couldn't actually get a rebuild to work for stock ATA controllers. At that point, I kept getting: atacontrol: ioctl(ATARAIDREBUILD): Operation not supported by device See: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=698625+0+archive/2002/freebsd-stable/20020825.freebsd-stable for details on my abortive attempts to get this to work. Will I get different results if I try this procedure again, now? Alternatively, what did I do wrong in the original procedure? Thanks, -a To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message
Re: mirrored root fs?
It seems Andrew P. Lentvorski, Jr. wrote: On Tue, 7 Jan 2003, Soeren Schmidt wrote: Not true, you can boot off a broken mirror on a non-RAID ATA controller, and then rebuild on the fly with atacontrol once the system is up Is this new (ie. since August 22, 2002)? I attempted to do this back then and I couldn't actually get a rebuild to work for stock ATA controllers. At that point, I kept getting: atacontrol: ioctl(ATARAIDREBUILD): Operation not supported by device See: http://docs.freebsd.org/cgi/getmsg.cgi?fetch=698625+0+archive/2002/freebsd-stable/20020825.freebsd-stable for details on my abortive attempts to get this to work. Will I get different results if I try this procedure again, now? Alternatively, what did I do wrong in the original procedure? It should work on 4.7 forward, but its been a while since I played with it. Another thing is that its a pain to make a mirror on an already running system (which is often wanted), so I plan to add an option to atacontrol to tell where to get the master from, and then do an automatic rebuild during the create phase ie: atacontrol create RAID1 ad0 ad2 source ad0 This will create a mirror using ad0 and ad2, and start a rebuild to build the master with data from ad0. This way you can do a normal install, add a second (identical or bigger) disk, and make a mirror out of those. You just have to change your fstab before rebooting (ad0 - ar0) in order to boot... -Søren To Unsubscribe: send mail to [EMAIL PROTECTED] with unsubscribe freebsd-current in the body of the message