Date: Sat, 21 Apr 2007 00:42:12 -0700 (PDT) From: L Goodwin <xrayv19@yahoo.com> To: Jerry McAllister <jerrymc@msu.edu> Cc: Jerry McAllister <jerrymc@msu.edu>, Nagy László Zsolt <nagylzs@freemail.hu>, freebsd-questions@freebsd.org Subject: Re: Samba and RAID 1 using gmirror on 2 new disks Message-ID: <847747.31102.qm@web58112.mail.re3.yahoo.com> In-Reply-To: <20070420232135.GA71589@gizmo.acns.msu.edu>
next in thread | previous in thread | raw e-mail | index | archive | help
The "fdisk -I da1" failed with SCSI parity error, so I took another look at the manual for the 9GB drives and noticed that the J-4 pin block (12 pairs of pins where SCSI Device ID's are set) on these drives says Pin 11 is a "Disable SCSI Parity Check" jumper. I added a jumper on pin 11 on both 9GB drives. This resolved the SCSI parity error (note that SCSI Parity Checking is still Enabled in the SCSI BIOS). Then I did: 1) dd if=/dev/zero of=/dev/da1 bs=512 count=1024 RESULT: OK 2) fdisk -I da1 RESULT: ERROR - Output: ******* Working on device /dev/da1 ******* fdisk: invalid fdisk partition table found fdisk: Geom not found 3) gmirror label -v -b round-robin gm0 /dev/da1 (to see what would happen) RESULT: OK! Metadata value stored on /dev/da1. Done. 4) dd if=/dev/zero of=/dev/da1s1 bs=512 count=1024 RESULT: OK 5) bsdlabel -w da1s1 RESULT: OK 6) bsdlabel -e da1s1 Confusion on what to do here and why. Your instructions were: "Then in the editor it brings up, put all the slice in a: - just copy the c: line and change the type to BSD4.2 from UNUSED and make the [fsize bsize bps/cpg] columns be 2048 16384 28552" Why "copy the c: line"? Shouldn't I just edit the "a:" line and leave the "c:" line alone? Here's what it looks like unmodified: ------------------------------------------------------------- # /dev/da1s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 17908300 16 unused 0 0 c: 17908316 0 unused 0 0 # "raw" part, don't edit ------------------------------------------------------------- Is this what it should look like after mods, or should I change size to 17908316 and offset to 0?: ------------------------------------------------------------- # /dev/da1s1: 8 partitions: # size offset fstype [fsize bsize bps/cpg] a: 17908300 16 4.2BSD 2048 16384 28552 c: 17908316 0 unused 0 0 # "raw" part, don't edit ------------------------------------------------------------- More questions later... (thanks) Jerry McAllister <jerrymc@msu.edu> wrote: On Fri, Apr 20, 2007 at 03:12:46PM -0700, L Goodwin wrote: > Hi, Jerry: > > Yes, I want to run Samba (sorry the list of requirements from my original email got left off). I also want to have the server run scheduled backups of the mirror disk. However... OK. I saw that later in your subject line, but all information should be in the body of the message too. > > I am not able to initialize da1 and da2 successfully. I went through the process of running FDISK and the Label Editor from the sysinstall menu, both without any error messages, but it does not work! (see the steps I took below) > > Here are the detailed steps I took and results (FAIL). Did I miss any important steps or do something incorrectly, or is there a problem with these disks?: > > 1) Boot FreeBSD and login as user "root". > > 2) Start sysinstall from the shell prompt. > > 3) Select the Configure menu option and run FDISK. > > 4) Created a single slice ("da1s1") on da1, then repeated the process for da2 ("da2s1"). Both slices are the same size (17912475 blocks). > > 5) Select "Label Disk Label Editor" in FreeBSD Configuration Menu. > [See attached file containing FDISK and Label settings] > > 6) I then tried to format the "da1s1" partition using: > newfs /dev/da1s1d > ...which failed with "newfs /dev/sa1s1d: could not find special device" Is there any reason you were making it a partition 'd:' instead of 'a:' I don't think it would matter, but it might lead to errors keeping track of things when typing in commands. > Checked /dev and found "da1" and "da2", but not the expected "da1s1d" and "da2s1d", so I tried: > newfs /da1 > ...which failed with: > ... > (da1:ahc0:0:1:0): WRITE(06). CDB: a 0 0 a0 80 0 > (da1:ahc0:0:1:0): CAM Status: SCSI Status Error > (da1:ahc0:0:1:0): SCSI Status: Check Condition > (da1:ahc0:0:1:0): ABORTED COMMAND asc:47,0 > (da1:ahc0:0:1:0): SCSI parity error > (da1:ahc0:0:1:0): Retries Exhausted > newfs: wtfs: 65536 bytes at sector 160: Input/output error Well, a SCSI parity error is a bad sign. That is pointing to a hardware problem of some kind. It could be media (disk) or cables or controller failure, etc. Try this and if you still get SCSI parity errors, better open up the box and work on parts. NOTE that those two dd commands are not quite the same. The first writes to da1 and the second to da1s1 dd if=/dev/zero of=/dev/da1 bs=512 count=1024 fdisk -I da1 dd if=/dev/zero of=/dev/da1s1 bs=512 count=1024 bsdlabel -w da1s1 bsdlabel -e da1s1 Then in the editor it brings up, put all the slice in a: - just copy the c: line and change the type to BSD4.2 from UNUSED and make the [fsize bsize bps/cpg] columns be 2048 16384 28552 Then do: newfs /dev/da1s1a If that still gets SCSI errors, then your problems are below the level of the software. ////jerry > > I then tried "fdisk -BI da1" from the shell prompt, I get "fdisk: Failed to write sector zero" (SCSI parity error). > > There's something fishy going on here, but I don't know what to do about it. > As stated in a previous posting, I ran the "Verify Disk Media" and "Low-level Format" on both disks last night (no media problems found). NOW, WHAT??? > > Jerry McAllister wrote: On Fri, Apr 20, 2007 at 12:39:28PM -0700, L Goodwin wrote: > > > Thanks for the steps, Laszlo. I got as far as creating a freebsd slice on da1 (both da1 and da2 have been low-level formatted). > > Now I have two questions: > > > > 1) When creating the slice on da1, I specified to use the entire disk, but there are 2 unused sections -- one before and one after the new slice (please see attached file). Should I start over and specify a smaller size? What size should I specify?:' > > > > 2) About creating partitions on da1: You specified to add partitions to the slice (/dev/da1s1a, /dev/da1s1b,/dev/da1s1c etc.). > > > > Please note: > > a) The entire FreeBSD filesystem is on da0. > > b) I want to use the entire da1 disk for users on Windows clients to store files/documents on. I also want the mirror disk (da2) to be backed up regularly. > > > > Do I need to create more than one partition on da1? What are the requirements for naming partitions in this situation? > > Probably there is some confusion. > If you alredy have your FreeBSD stuff on da0 and only want to put > the windows stuff on da1, then you don't need it divided up in > to all the extra partitions. > > If you want Windows clients to use it, do you plan to run Samba? > If not, maybe you should just make the disk a Windows disk, but make > it FAT32 so FreeBSD can both read and write it. If it will be the > store for Samba, then forget this comment. > > As for the unused bit before and after the slice, if I understand what > you are pointing to, that is normal. It is now normal to just skip > the first whole track where an MBR might be written rather than just > one sector. That is the 63 extra blocks at the beginning. > Then, fdisk will ignore trailing stuff that doesn't conveniently fit > in to the addressing scheme. Neither part amounts to much actual > disk space by today's standards so it is just ignored. If you are > going to make a mirror, then try to get the two slices to come out > to the same size. Otherwise don't worry about it. > > ////jerry > > > > > Thanks! > > > > Nagy László Zsolt wrote: *L Goodwin wrote: > > > > > > Both assume you only have 2 drives and want to mirror the drive > > containing FreeBSD. I only want to mirror the data drive da1, and would > > appreciate a concise set of steps for doing this right the first time. > > 1. First of all, you should install the base system on da0 and boot it. > > (Leave da1 and da2 untouched) > > 2. Create a slice on da1 ("fdisk"). The name of the new slice will > > probably be "da1s1". (You will find this inside sysinstall) I found that > > sometimes I had to use a bit smaller slice than the available space, > > because equally looking disks are not always equal. (Not kidding!) > > 3. Use disklabel editor to add partitions to the slice > > (/dev/da1s1a,/dev/da1s1b,/dev/da1s1c etc.) and format them with newfs as > > needed. > > 4. Change loader.conf, add this line: > > > > geom_mirror_load="YES" > > > > 5. Execute these: > > > > gmirror load > > gmirror label -v -b round-robin gm0 /dev/da1 > > > > > > 6. Carefully rename all references in /etc/fstab > > > > /dev/da1s1X becomes /dev/mirror/gm0s1X (where X can be a,b,c,d etc.) > > > > 7. Reboot > > > > 8. Check your mirror with "gmirror list" and "gmirror status", and see > > if your filesystems are mounted with "df". > > > > 9. Add da2 to your mirror with this command: > > > > gmirror insert gm0 /dev/da2 > > > > > > Please ask others, as I did not try this and I'm not 100% sure it will > > work. But I think it should. > > > > Best, > > > > Laszlo > > > > > > * > > > > > > > > --------------------------------- > > Ahhh...imagining that irresistible "new car" smell? > > Check outnew cars at Yahoo! Autos. > Content-Description: 2793854837-FDISK.txt > > Prepare disks da1 and da2 (after low-level format): > > > > Run FDISK from systinstall: > > > > DISK name: da1 FDISK Partition Editor > > Disk Geometry: 1115 cyls/255 heads/63 sectors = 17912475 sectors > > > > Offset Size(ST) End Name PType Desc Subtype Flags > > 0 17916240 17916239 - 12 unused 0 > > > > After Create slice (size = 17916240, type = 165): > > > > Offset Size(ST) End Name PType Desc Subtype Flags > > 0 63 62 - 12 unused 0 > > 63 17912412 1912474 da1s1 8 freebsd 165 > > 17912475 3765 17916239 - 12 unused 0 > > > _______________________________________________ > > freebsd-questions@freebsd.org mailing list > > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > > > > --------------------------------- > Ahhh...imagining that irresistible "new car" smell? > Check outnew cars at Yahoo! Autos. > _______________________________________________ > freebsd-questions@freebsd.org mailing list > http://lists.freebsd.org/mailman/listinfo/freebsd-questions > To unsubscribe, send any mail to "freebsd-questions-unsubscribe@freebsd.org" > --------------------------------- Ahhh...imagining that irresistible "new car" smell? Check outnew cars at Yahoo! Autos.
Want to link to this message? Use this URL: <https://mail-archive.FreeBSD.org/cgi/mid.cgi?847747.31102.qm>