Re: gmirror and partitioning
Hi Laszlo, No bugs; I think this is normal. Both the BIOS and the OS are only going to see the blocks the hard drive thinks are useable. Bad sector information is also stored on the disk, and only the OS can interpret this information. Or is it possible that the manufacturer produces the hard drive first, then measures its real capacity and finally burns this info into a flash memory on the drive? :-) Even though the drive geometry is "fictitious", most people still recommend defining your slices to begin and end on cylinder boundaries. I assume this makes accessing blocks in the slice a few nanoseconds faster, but I'm actually not sure. Perhaps someone on the list knows more detail. In any case, if you do this for as10s1 gmirror will replicate this property to the other disk. You'll also most likely have a few blocks left over. As for units of MB, I'm not sure. Could be rounding. Can we assume your gmirror is now working? Oh yes, it is working. I do not care about that one lost MB. The lesson of the story: I'll leave 10MB empty space at the end of the disk whenever I need to use gmirror. Thank you for your help! :-) Laszlo ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
RE: gmirror and partitioning
> From: Nagy László Zsolt [mailto:[EMAIL PROTECTED] > Sent: Wednesday, May 17, 2006 12:29 AM > To: [EMAIL PROTECTED]; freebsd-questions@freebsd.org > Subject: Re: gmirror and partitioning > > > > >> acd0: CDROM at ata0-master PIO4 > >> ad8: 152626MB at ata4-master SATA150 > >> ad10: 152627MB at ata5-master SATA150 > >> > > Sadly, yes; or buy a bigger second disk. You could do the > install on the > > smaller disk first, or you could make ad10s1 smaller. > > > Okay, I did this. But I'm still interested in the topic. The > size of a > hard drive is determined by the manufacturer. It depends on how many > sectors, heads and cylinders present in the device. The > actual available > size can be smaller because of bad sectors on the disc. But > the BIOS (or > FreeBSD) should detect the full size, including all sectors. These > devices are identical. Then how in the hell could it add one > more MB to > the second device? I presume if I swap drives between ata4-master and > ata5-master then still ad10 would be bigger. Is this a bug in FreeBSD? > >Laszlo Hi Laszlo, No bugs; I think this is normal. Both the BIOS and the OS are only going to see the blocks the hard drive thinks are useable. Even though the drive geometry is "fictitious", most people still recommend defining your slices to begin and end on cylinder boundaries. I assume this makes accessing blocks in the slice a few nanoseconds faster, but I'm actually not sure. Perhaps someone on the list knows more detail. In any case, if you do this for as10s1 gmirror will replicate this property to the other disk. You'll also most likely have a few blocks left over. As for units of MB, I'm not sure. Could be rounding. Can we assume your gmirror is now working? Best regards, -gayn Bristol Systems Inc. 714/532-6776 www.bristolsystems.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: gmirror and partitioning
acd0: CDROM at ata0-master PIO4 ad8: 152626MB at ata4-master SATA150 ad10: 152627MB at ata5-master SATA150 Sadly, yes; or buy a bigger second disk. You could do the install on the smaller disk first, or you could make ad10s1 smaller. Okay, I did this. But I'm still interested in the topic. The size of a hard drive is determined by the manufacturer. It depends on how many sectors, heads and cylinders present in the device. The actual available size can be smaller because of bad sectors on the disc. But the BIOS (or FreeBSD) should detect the full size, including all sectors. These devices are identical. Then how in the hell could it add one more MB to the second device? I presume if I swap drives between ata4-master and ata5-master then still ad10 would be bigger. Is this a bug in FreeBSD? Laszlo ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
RE: gmirror and partitioning
> From: Nagy László Zsolt [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 16, 2006 10:41 AM > To: [EMAIL PROTECTED]; freebsd-questions@freebsd.org > Subject: Re: gmirror and partitioning > > > Hi Laszlo, > > > > Well it looks like you've got gm0 up and running. I assume you've > > edited /etc/fstab so that it boots cleanly. My first > thought is that > > you need to zero ad8 to make sure gmirror isn't confused. > Try that (dd > > if=/dev/zero of=/dev/ad8) at least for several blocks. > Then reboot and > > post dmesg. > > > > Hello Gayns, > > Good to see you again. :-) > > backupserver# dd if=/dev/zero of=/dev/ad8 count=4096 > 4096+0 records in > 4096+0 records out > 2097152 bytes transferred in 0.686872 secs (3053192 bytes/sec) > > < then I rebooted > > > backupserver# gmirror insert gm0 /dev/ad8 > Provider ad8 too small. > > Here are the important parts from my dmesg: > > ... > > atapci0: port > 0x9010-0x9017,0x9400-0x9403,0x9810-0x9817,0x9c00-0x9c03,0xa000-0xa00f > irq 22 at device 6.0 on pci4 > ata2: on atapci0 > ata3: on atapci0 > isab0: at device 31.0 on pci0 > isa0: on isab0 > atapci1: port > 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device > 31.1 on pci0 > ata0: on atapci1 > ata1: on atapci1 > atapci2: port > 0xd000-0xd007,0xd400-0xd403,0xd800-0xd807,0xdc00-0xdc03,0xe000-0xe00f > irq 19 at device 31.2 on pci0 > atapci2: failed to enable memory mapping! > > > > acd0: CDROM at ata0-master PIO4 > ad8: 152626MB at ata4-master SATA150 > ad10: 152627MB at ata5-master SATA150 > SMP: AP CPU #1 Launched! > GEOM_MIRROR: Device gm0 created (id=934763830). > GEOM_MIRROR: Device gm0: provider ad10 detected. > GEOM_MIRROR: Device gm0: provider ad10 activated. > GEOM_MIRROR: Device gm0: provider mirror/gm0 launched. > Trying to mount root from ufs:/dev/mirror/gm0s1a > bge0: link state changed to UP > > > This is really wreid! The hard disks are the same: SAMSUNG HD160JJ > ZM100-33. But one is bigger than the other. How could this happen? > Should I reinstall everything from the beginning? :-( > > > Best, > >Laszlo Sadly, yes; or buy a bigger second disk. You could do the install on the smaller disk first, or you could make ad10s1 smaller. -gayn Bristol Systems Inc. 714/532-6776 www.bristolsystems.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: gmirror and partitioning
Hi Laszlo, Well it looks like you've got gm0 up and running. I assume you've edited /etc/fstab so that it boots cleanly. My first thought is that you need to zero ad8 to make sure gmirror isn't confused. Try that (dd if=/dev/zero of=/dev/ad8) at least for several blocks. Then reboot and post dmesg. Hello Gayns, Good to see you again. :-) backupserver# dd if=/dev/zero of=/dev/ad8 count=4096 4096+0 records in 4096+0 records out 2097152 bytes transferred in 0.686872 secs (3053192 bytes/sec) < then I rebooted > backupserver# gmirror insert gm0 /dev/ad8 Provider ad8 too small. Here are the important parts from my dmesg: ... atapci0: port 0x9010-0x9017,0x9400-0x9403,0x9810-0x9817,0x9c00-0x9c03,0xa000-0xa00f irq 22 at device 6.0 on pci4 ata2: on atapci0 ata3: on atapci0 isab0: at device 31.0 on pci0 isa0: on isab0 atapci1: port 0x1f0-0x1f7,0x3f6,0x170-0x177,0x376,0xf000-0xf00f at device 31.1 on pci0 ata0: on atapci1 ata1: on atapci1 atapci2: port 0xd000-0xd007,0xd400-0xd403,0xd800-0xd807,0xdc00-0xdc03,0xe000-0xe00f irq 19 at device 31.2 on pci0 atapci2: failed to enable memory mapping! acd0: CDROM at ata0-master PIO4 ad8: 152626MB at ata4-master SATA150 ad10: 152627MB at ata5-master SATA150 SMP: AP CPU #1 Launched! GEOM_MIRROR: Device gm0 created (id=934763830). GEOM_MIRROR: Device gm0: provider ad10 detected. GEOM_MIRROR: Device gm0: provider ad10 activated. GEOM_MIRROR: Device gm0: provider mirror/gm0 launched. Trying to mount root from ufs:/dev/mirror/gm0s1a bge0: link state changed to UP This is really wreid! The hard disks are the same: SAMSUNG HD160JJ ZM100-33. But one is bigger than the other. How could this happen? Should I reinstall everything from the beginning? :-( Best, Laszlo ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
RE: gmirror and partitioning
> From: Nagy László Zsolt [mailto:[EMAIL PROTECTED] > Sent: Tuesday, May 16, 2006 8:27 AM > To: [EMAIL PROTECTED]; freebsd-questions@freebsd.org > Subject: Re: gmirror and partitioning > > > > > Laszlo, > > > > You're making gmirror way too difficult. In short, install > FreeBSD with > > however many partitions you want, then install gmirror and replicate > > your disk to the second disk. > > > > The standard howto documents are: > > > > http://dannyman.toldme.com/2005/01/24/freebsd-howto-gmirror-system/ > > > > http://www.onlamp.com/pub/a/bsd/2005/11/10/FreeBSD_Basics.html > > > > http://people.freebsd.org/~rse/mirror/ > > > > I've used Danny's and Ralf's (the first and third). > Danny's is simpler, > > but Ralf's has the advantage that it can be done remotely. Danny's > > website now recommends Dru's (the second). You may want to try that > > first. > > > > Let us know how it goes, > > > I tried the second link, as you suggested. It does not work for me. I > have to identical disks on /dev/ad10 and /dev/ad8. I have installed > FreeBSD on /dev/ad10 and I initialized gmirror on that disk. Here is > what df says: > > backupserver# df -h > Filesystem Size Used Avail Capacity Mounted on > /dev/mirror/gm0s1a 4.8G 34M 4.4G 1% / > devfs 1.0K 1.0K 0B 100% /dev > /dev/mirror/gm0s1e 9.7G 12K 8.9G 0% /tmp > /dev/mirror/gm0s1f 115G 261M 106G 0% /usr > /dev/mirror/gm0s1d 9.7G 232K 8.9G 0% /var > backupserver# swapinfo > Device 1K-blocks Used Avail Capacity > /dev/mirror/gm0s1b 5242880 0 5242880 0%Bristol Systems Inc. 714/532-6776 www.bristolsystems.com > backupserver# > > > Then I try to add the ad8 device: > > backupserver# gmirror insert gm0 /dev/ad8 > Provider ad8 too small. > backupserver# > > But of course this is not true. ad8 and ad10 are identical > 160GB SATA disks. > What am I doing wrong? Please help. > > Laszlo Hi Laszlo, Well it looks like you've got gm0 up and running. I assume you've edited /etc/fstab so that it boots cleanly. My first thought is that you need to zero ad8 to make sure gmirror isn't confused. Try that (dd if=/dev/zero of=/dev/ad8) at least for several blocks. Then reboot and post dmesg. -gayn ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: gmirror and partitioning
Laszlo, You're making gmirror way too difficult. In short, install FreeBSD with however many partitions you want, then install gmirror and replicate your disk to the second disk. The standard howto documents are: http://dannyman.toldme.com/2005/01/24/freebsd-howto-gmirror-system/ http://www.onlamp.com/pub/a/bsd/2005/11/10/FreeBSD_Basics.html http://people.freebsd.org/~rse/mirror/ I've used Danny's and Ralf's (the first and third). Danny's is simpler, but Ralf's has the advantage that it can be done remotely. Danny's website now recommends Dru's (the second). You may want to try that first. Let us know how it goes, I tried the second link, as you suggested. It does not work for me. I have to identical disks on /dev/ad10 and /dev/ad8. I have installed FreeBSD on /dev/ad10 and I initialized gmirror on that disk. Here is what df says: backupserver# df -h Filesystem Size Used Avail Capacity Mounted on /dev/mirror/gm0s1a 4.8G 34M 4.4G 1% / devfs 1.0K 1.0K 0B 100% /dev /dev/mirror/gm0s1e 9.7G 12K 8.9G 0% /tmp /dev/mirror/gm0s1f 115G 261M 106G 0% /usr /dev/mirror/gm0s1d 9.7G 232K 8.9G 0% /var backupserver# swapinfo Device 1K-blocks Used Avail Capacity /dev/mirror/gm0s1b 5242880 0 5242880 0% backupserver# Then I try to add the ad8 device: backupserver# gmirror insert gm0 /dev/ad8 Provider ad8 too small. backupserver# But of course this is not true. ad8 and ad10 are identical 160GB SATA disks. What am I doing wrong? Please help. Laszlo ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: gmirror and partitioning
Hi, I have installed GEOM RAID-1 on three production servers based on Dru's article - with separate / /usr /var /tmp /swap slices. No drama on installation. You also have to figure out what to do when primary or secondary hard disk fails. According to the examples in the gmirror man pages, it is a case of shutting down-replacing hdd-booting up-and recreate the mirror. Only the procedure is a bit confusing. Any problem with GEOM, send an email to the gmirror mailing list. They (Pawel) is very helpful. Kind regards, Yance Kowara --- Nagy László Zsolt <[EMAIL PROTECTED]> wrote: > > > Laszlo, > > > > You're making gmirror way too difficult. In > short, install FreeBSD with > > however many partitions you want, then install > gmirror and replicate > > your disk to the second disk. > > > > The standard howto documents are: > > > > > http://dannyman.toldme.com/2005/01/24/freebsd-howto-gmirror-system/ > > > > > http://www.onlamp.com/pub/a/bsd/2005/11/10/FreeBSD_Basics.html > > > > http://people.freebsd.org/~rse/mirror/ > > > > I've used Danny's and Ralf's (the first and > third). Danny's is simpler, > > but Ralf's has the advantage that it can be done > remotely. Danny's > > website now recommends Dru's (the second). You > may want to try that > > first. > > > > Let us know how it goes, > > > This looks easy. I'll get the hardware on 19th, but > I'll let you know > how it goes. > Thank you! > >Laszlo > > > ___ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to > "[EMAIL PROTECTED]" > __ Do You Yahoo!? Tired of spam? Yahoo! Mail has the best spam protection around http://mail.yahoo.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
Re: gmirror and partitioning
Laszlo, You're making gmirror way too difficult. In short, install FreeBSD with however many partitions you want, then install gmirror and replicate your disk to the second disk. The standard howto documents are: http://dannyman.toldme.com/2005/01/24/freebsd-howto-gmirror-system/ http://www.onlamp.com/pub/a/bsd/2005/11/10/FreeBSD_Basics.html http://people.freebsd.org/~rse/mirror/ I've used Danny's and Ralf's (the first and third). Danny's is simpler, but Ralf's has the advantage that it can be done remotely. Danny's website now recommends Dru's (the second). You may want to try that first. Let us know how it goes, This looks easy. I'll get the hardware on 19th, but I'll let you know how it goes. Thank you! Laszlo ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"
RE: gmirror and partitioning
> From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of User Gandalf > Sent: Friday, May 12, 2006 7:26 AM > To: freebsd-questions@freebsd.org > Subject: gmirror and partitioning > > > > Hello! > > I would like to install a new FreeBSD 6.1 system on a > computer that has > two SATA drives. They are the same type. I would like to use > gmirror. I > read the handbook here: > http://www.freebsd.org/doc/en_US.ISO8859-1/books/handbook/geom-mirror.ht ml > But there is something I do not understand. The handbook suggest that I > install FreeBSD on only two partitions: a swap and the root fs. But I > would like to create many partitions. I think I can do it the following way: 1. Install a basic system on drive /dev/ad0, using two smaller partitions (2GB for swap and 10GB for the root fs). 2. Create the /dev/mirror/gm device on /dev/ad1, as suggested by the handbook 3. When doing 'bsdlabel -wB /dev/mirror/gm0s1', I can allocate gm0s1a and gm0s1b with the same sizes (10GB and 2GB) but I can also add other partitions for /usr, /tmp and /var. Can I? 4. Then I can copy the whole system from ad0s1a to /dev/mirror/gm0s1a, and continue the installation, following the instructions in the handbook 5. Finally, after I added /dev/ad0 to /dev/gm0 and I'm done with synchronization, I would like to format the additional partitions, dump and restore my current /usr, /tmp and /var directories, change my fstab and reboot... > Will this work? Sorry for the dumb question, but I have never done this > before. The handbook only suggest that I install FreeBSD on one / > partition only, but it does not tell how to create new partitions after > mirroring. > Thanks, > Laszlo Laszlo, You're making gmirror way too difficult. In short, install FreeBSD with however many partitions you want, then install gmirror and replicate your disk to the second disk. The standard howto documents are: http://dannyman.toldme.com/2005/01/24/freebsd-howto-gmirror-system/ http://www.onlamp.com/pub/a/bsd/2005/11/10/FreeBSD_Basics.html http://people.freebsd.org/~rse/mirror/ I've used Danny's and Ralf's (the first and third). Danny's is simpler, but Ralf's has the advantage that it can be done remotely. Danny's website now recommends Dru's (the second). You may want to try that first. Let us know how it goes, -gayn Bristol Systems Inc. 714/532-6776 www.bristolsystems.com ___ freebsd-questions@freebsd.org mailing list http://lists.freebsd.org/mailman/listinfo/freebsd-questions To unsubscribe, send any mail to "[EMAIL PROTECTED]"