Re: bioctl & replacing a failed mirror
On Mon, Sep 02, 2013 at 01:19:47PM -0400, John Hynes wrote: > I posted a dmesg earlier in the thread, that showed all three drives had > the same number of sectors as far as the kernel is concerned. After > replacing the drive with the one I "assumed" to be identical (a new sd2), > here's what the kernel thought: > > sd2: 476940MB, 512 bytes/sector, 976773168 sectors > > For reference, here's what I posted in the other message from dmesg: > > sd0: 476940MB, 512 bytes/sector, 976773168 sectors > sd1: 476940MB, 512 bytes/sector, 976773168 sectors Ok. Maybe you should post the complete output of fdisk and disklabel for all three disks, as well. Cheers, Erling
Re: bioctl & replacing a failed mirror
On Mon, Sep 2, 2013 at 12:36 PM, Nick Holland wrote: > On 09/02/13 08:19, John Hynes wrote: > ... > > The "new" sd2 is identical to the old, which is identical to the other > > disks. > > you provide ZERO proof of this, which makes me guess that you buy disks > of the same maker and same model number and assume the rest. > > This is very often wrong. > > Proof of that is hanging out of my hw raid box on this computer right > now -- two "identical" drives, purchased on the same date from the same > store. one is a few sectors larger than the other. Smaller drive can > be mirrored to larger, larger can not be mirrored to smaller. > > Nick. > > I posted a dmesg earlier in the thread, that showed all three drives had the same number of sectors as far as the kernel is concerned. After replacing the drive with the one I "assumed" to be identical (a new sd2), here's what the kernel thought: sd2: 476940MB, 512 bytes/sector, 976773168 sectors For reference, here's what I posted in the other message from dmesg: sd0: 476940MB, 512 bytes/sector, 976773168 sectors sd1: 476940MB, 512 bytes/sector, 976773168 sectors
Re: bioctl & replacing a failed mirror
On 09/02/13 08:19, John Hynes wrote: ... > The "new" sd2 is identical to the old, which is identical to the other > disks. you provide ZERO proof of this, which makes me guess that you buy disks of the same maker and same model number and assume the rest. This is very often wrong. Proof of that is hanging out of my hw raid box on this computer right now -- two "identical" drives, purchased on the same date from the same store. one is a few sectors larger than the other. Smaller drive can be mirrored to larger, larger can not be mirrored to smaller. Nick.
Re: bioctl & replacing a failed mirror
On Mon, Sep 02, 2013 at 08:20:11AM -0400, John Hynes wrote: > On Mon, Sep 2, 2013 at 8:07 AM, Kenneth R Westerback > wrote: > > > On Mon, Sep 02, 2013 at 07:50:41AM -0400, John Hynes wrote: > > > Greetings All, > > > > > > I have a softraid device, sd3, which was created as follows: > > > > > > bioctl -c 1 -l /dev/sd0a,/dev/sd1a,/dev/sd2a softraid0 > > > > > > The chunk sd2a failed. bioctl shows the RAID1 as degraded, and chunk > > sd2a > > > as OFFLINE. > > > > > > In order to rebuild, I'd need to set up the new sd2. After replacing and > > > zeroing the drive, I replaced the MBR with fdisk -yi /dev/sd2, which > > worked > > > fine. Next, I copied the disklabel from sd0 to sd2, but disklabel > > refused > > > to write the new label, saying: > > > > > > disklabel: ioctl DIOCWDINFO: Open partition would move or shrink > > > disklabel: unable to write label > > > > How exactly are you copying the disklabel? Is sd2 the same size as sd0? > > > > disklabel sd0 > disklabel.sd2; disklabel -R sd2 disklabel.sd0 > > The "new" sd2 is identical to the old, which is identical to the other > disks. Then the output from 'disklabel sd0', 'disklabel sd2', 'fdisk sd0' and 'fdisk sd2' would be useful. I suspect the 'c' partition location/size is the cause of the confusion. I thought 'c' was ignored by '-R', but a quick glance at the code does not support that. :-) Ken > > > > > > As always a dmesg would help. In this case by answering the latter. :-) > > > > Here's the dmesg from earlier, before the drive croaked: > > OpenBSD 5.3 (GENERIC.MP) #0: Thu Aug 15 09:24:05 EDT 2013 > r...@flotsam.primebuchholz.com:/usr/src/sys/arch/amd64/compile/ > GENERIC.MP > real mem = 17160536064 (16365MB) > avail mem = 16681234432 (15908MB) > mainbus0 at root > bios0 at mainbus0: SMBIOS rev. 2.6 @ 0x9f000 (40 entries) > bios0: vendor American Megatrends Inc. version "3.0a" date 05/07/2013 > bios0: Supermicro H8SGL > acpi0 at bios0: rev 2 > acpi0: sleep states S0 S1 S4 S5 > acpi0: tables DSDT FACP APIC MCFG OEMB HPET SRAT SSDT EINJ BERT ERST HEST > acpi0: wakeup devices PC02(S4) PC03(S4) PC04(S4) PC05(S4) PC06(S4) PC07(S4) > PC09(S4) PC0A(S4) PC0B(S4) PC0C(S4) SBAZ(S4) PSKE(S4) PSMS(S4) ECIR(S4) > P0PC(S4) UHC1(S4) UHC2(S4) UHC3(S4) USB4(S4) UHC5(S4) UHC6(S4) UHC7(S4) > acpitimer0 at acpi0: 3579545 Hz, 24 bits > acpimadt0 at acpi0 addr 0xfee0: PC-AT compat > cpu0 at mainbus0: apid 32 (boot processor) > cpu0: AMD Opteron(tm) Processor 6344 , 2600.38 MHz > cpu0: > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,NODEID,TBM,TOPEXT,ITSC,BMI1 > cpu0: 64KB 64b/line 2-way I-cache, 16KB 64b/line 4-way D-cache, 2MB > 64b/line 16-way L2 cache, 12MB 64b/line 128-way L3 cache > cpu0: ITLB 48 4KB entries fully associative, 24 4MB entries fully > associative > cpu0: DTLB 64 4KB entries fully associative, 64 4MB entries fully > associative > cpu0: apic clock running at 199MHz > cpu1 at mainbus0: apid 33 (application processor) > cpu1: AMD Opteron(tm) Processor 6344 , 249.48 MHz > cpu1: > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,NODEID,TBM,TOPEXT,ITSC,BMI1 > cpu1: 64KB 64b/line 2-way I-cache, 16KB 64b/line 4-way D-cache, 2MB > 64b/line 16-way L2 cache, 12MB 64b/line 128-way L3 cache > cpu1: ITLB 48 4KB entries fully associative, 24 4MB entries fully > associative > cpu1: DTLB 64 4KB entries fully associative, 64 4MB entries fully > associative > cpu2 at mainbus0: apid 34 (application processor) > cpu2: AMD Opteron(tm) Processor 6344 , 249.45 MHz > cpu2: > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,NODEID,TBM,TOPEXT,ITSC,BMI1 > cpu2: 64KB 64b/line 2-way I-cache, 16KB 64b/line 4-way D-cache, 2MB > 64b/line 16-way L2 cache, 12MB 64b/line 128-way L3 cache > cpu2: ITLB 48 4KB entries fully associative, 24 4MB entries fully > associative > cpu2: DTLB 64 4KB entries fully associative, 64 4MB entries fully > associative > cpu3 at mainbus0: apid 35 (application processor) > cpu3: AMD Opteron(tm) Processor 6344 , 249.47 MHz > cpu3: > FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUSH,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCNT,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SSE4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,NODEID,TBM,TOPEXT,ITSC,BMI1 > cpu3: 64KB 64b/line 2-wa
Re: bioctl & replacing a failed mirror
On Mon, Sep 02, 2013 at 08:20:11AM -0400, John Hynes wrote: > On Mon, Sep 2, 2013 at 8:07 AM, Kenneth R Westerback > wrote: > > > On Mon, Sep 02, 2013 at 07:50:41AM -0400, John Hynes wrote: > > > Greetings All, > > > > > > I have a softraid device, sd3, which was created as follows: > > > > > > bioctl -c 1 -l /dev/sd0a,/dev/sd1a,/dev/sd2a softraid0 > > > > > > The chunk sd2a failed. bioctl shows the RAID1 as degraded, and chunk > > sd2a > > > as OFFLINE. > > > > > > In order to rebuild, I'd need to set up the new sd2. After replacing and > > > zeroing the drive, I replaced the MBR with fdisk -yi /dev/sd2, which > > worked > > > fine. Next, I copied the disklabel from sd0 to sd2, but disklabel > > refused > > > to write the new label, saying: > > > > > > disklabel: ioctl DIOCWDINFO: Open partition would move or shrink > > > disklabel: unable to write label > > > > How exactly are you copying the disklabel? Is sd2 the same size as sd0? > > > > disklabel sd0 > disklabel.sd2; disklabel -R sd2 disklabel.sd0 > > The "new" sd2 is identical to the old, which is identical to the other > disks. Further information should be elicited by running a kernel with the diff below. Which should at least tell us the (first) partition being rejected, and whether it is the size or location that is problematic. Coincidentally I'm working in this exact code, so there are some bonus fixes in there. Ken Index: subr_disk.c === RCS file: /cvs/src/sys/kern/subr_disk.c,v retrieving revision 1.151 diff -u -p -r1.151 subr_disk.c --- subr_disk.c 8 Aug 2013 23:25:06 - 1.151 +++ subr_disk.c 2 Sep 2013 13:40:03 - @@ -645,22 +645,30 @@ setdisklabel(struct disklabel *olp, stru /* XXX missing check if other dos partitions will be overwritten */ - while (openmask != 0) { - i = ffs(openmask) - 1; - openmask &= ~(1 << i); - if (nlp->d_npartitions <= i) - return (EBUSY); + for (i = 0; i < MAXPARTITIONS; i++) { opp = &olp->d_partitions[i]; npp = &nlp->d_partitions[i]; - if (DL_GETPOFFSET(npp) != DL_GETPOFFSET(opp) || - DL_GETPSIZE(npp) < DL_GETPSIZE(opp)) - return (EBUSY); + if (openmask & (1 << i)) { + if (DL_GETPOFFSET(npp) != DL_GETPOFFSET(opp)) { + printf("Can't move open partition '%c'" + " from offset %lld to offset %lld\n", + 'a' + i, DL_GETPOFFSET(opp), + DL_GETPOFFSET(npp)); + return (EBUSY); + } + if (DL_GETPSIZE(npp) < DL_GETPSIZE(opp)) { + printf("Can't shrink open partition '%c'" + "from %lld sectors to %lld sectors\n", + 'a' + i, DL_GETPSIZE(opp), + DL_GETPSIZE(npp)); + return (EBUSY); + } + } /* * Copy internally-set partition information * if new label doesn't include it. XXX */ if (npp->p_fstype == FS_UNUSED && opp->p_fstype != FS_UNUSED) { - npp->p_fstype = opp->p_fstype; npp->p_fragblock = opp->p_fragblock; npp->p_cpg = opp->p_cpg; }
Re: bioctl & replacing a failed mirror
On Mon, Sep 2, 2013 at 8:51 AM, Bret Lambert wrote: > On Mon, Sep 02, 2013 at 02:30:23PM +0200, Stefan Sperling wrote: > > On Mon, Sep 02, 2013 at 08:17:27AM -0400, John Hynes wrote: > > > On Mon, Sep 2, 2013 at 8:10 AM, Stefan Sperling > wrote: > > > > What commands did you run to "copy" the disklabel? > > > Oh - I did a "disklabel sd0 > disklabel.sd2; disklabel -R sd2 > disklabel.sd2" > > > > Did that change the duid of sd2? > > > > If it didn't, it's a bug; from revision 1.163 of disklabel.c: > > When restoring a disklabel do not restore the uid. Let the kernel > allocate > a new uid instead. > I just confirmed on the box in question as well - DUIDs are all different, as expected. -John On Mon, Sep 2, 2013 at 8:51 AM, Bret Lambert wrote: > On Mon, Sep 02, 2013 at 02:30:23PM +0200, Stefan Sperling wrote: > > On Mon, Sep 02, 2013 at 08:17:27AM -0400, John Hynes wrote: > > > On Mon, Sep 2, 2013 at 8:10 AM, Stefan Sperling > wrote: > > > > What commands did you run to "copy" the disklabel? > > > Oh - I did a "disklabel sd0 > disklabel.sd2; disklabel -R sd2 > disklabel.sd2" > > > > Did that change the duid of sd2? > > > > If it didn't, it's a bug; from revision 1.163 of disklabel.c: > > When restoring a disklabel do not restore the uid. Let the kernel > allocate > a new uid instead.
Re: bioctl & replacing a failed mirror
On Mon, Sep 02, 2013 at 07:50:41AM -0400, John Hynes wrote: > Greetings All, > > I have a softraid device, sd3, which was created as follows: > > bioctl -c 1 -l /dev/sd0a,/dev/sd1a,/dev/sd2a softraid0 > > The chunk sd2a failed. bioctl shows the RAID1 as degraded, and chunk sd2a > as OFFLINE. > > In order to rebuild, I'd need to set up the new sd2. After replacing and > zeroing the drive, I replaced the MBR with fdisk -yi /dev/sd2, which worked > fine. Next, I copied the disklabel from sd0 to sd2, but disklabel refused > to write the new label, saying: > > disklabel: ioctl DIOCWDINFO: Open partition would move or shrink > disklabel: unable to write label How exactly are you copying the disklabel? Is sd2 the same size as sd0? As always a dmesg would help. In this case by answering the latter. :-) Ken > > I could use another slot I suppose, but is there a way to label the chunk > in the same slot and rebuild onto it that I'm missing? > > Thanks, > > -John
Re: bioctl & replacing a failed mirror
On Mon, Sep 02, 2013 at 02:30:23PM +0200, Stefan Sperling wrote: > On Mon, Sep 02, 2013 at 08:17:27AM -0400, John Hynes wrote: > > On Mon, Sep 2, 2013 at 8:10 AM, Stefan Sperling wrote: > > > What commands did you run to "copy" the disklabel? > > Oh - I did a "disklabel sd0 > disklabel.sd2; disklabel -R sd2 disklabel.sd2" > > Did that change the duid of sd2? > If it didn't, it's a bug; from revision 1.163 of disklabel.c: When restoring a disklabel do not restore the uid. Let the kernel allocate a new uid instead.
Re: bioctl & replacing a failed mirror
On Mon, Sep 2, 2013 at 8:30 AM, Stefan Sperling wrote: > On Mon, Sep 02, 2013 at 08:17:27AM -0400, John Hynes wrote: > > On Mon, Sep 2, 2013 at 8:10 AM, Stefan Sperling > wrote: > > > What commands did you run to "copy" the disklabel? > > Oh - I did a "disklabel sd0 > disklabel.sd2; disklabel -R sd2 > disklabel.sd2" > > Did that change the duid of sd2? > I'll go check - but on the box I'm logged into right now, which is identically set up, yes the DUIDs are all different on sd0 sd1 and sd2, even though I created the disklabels for sd1 and sd2 in the same way as above. -John On Mon, Sep 2, 2013 at 8:30 AM, Stefan Sperling wrote: > On Mon, Sep 02, 2013 at 08:17:27AM -0400, John Hynes wrote: > > On Mon, Sep 2, 2013 at 8:10 AM, Stefan Sperling > wrote: > > > What commands did you run to "copy" the disklabel? > > Oh - I did a "disklabel sd0 > disklabel.sd2; disklabel -R sd2 > disklabel.sd2" > > Did that change the duid of sd2?
Re: bioctl & replacing a failed mirror
On Mon, Sep 02, 2013 at 08:17:27AM -0400, John Hynes wrote: > On Mon, Sep 2, 2013 at 8:10 AM, Stefan Sperling wrote: > > What commands did you run to "copy" the disklabel? > Oh - I did a "disklabel sd0 > disklabel.sd2; disklabel -R sd2 disklabel.sd2" Did that change the duid of sd2?
Re: bioctl & replacing a failed mirror
On Mon, Sep 2, 2013 at 8:07 AM, Kenneth R Westerback wrote: > On Mon, Sep 02, 2013 at 07:50:41AM -0400, John Hynes wrote: > > Greetings All, > > > > I have a softraid device, sd3, which was created as follows: > > > > bioctl -c 1 -l /dev/sd0a,/dev/sd1a,/dev/sd2a softraid0 > > > > The chunk sd2a failed. bioctl shows the RAID1 as degraded, and chunk > sd2a > > as OFFLINE. > > > > In order to rebuild, I'd need to set up the new sd2. After replacing and > > zeroing the drive, I replaced the MBR with fdisk -yi /dev/sd2, which > worked > > fine. Next, I copied the disklabel from sd0 to sd2, but disklabel > refused > > to write the new label, saying: > > > > disklabel: ioctl DIOCWDINFO: Open partition would move or shrink > > disklabel: unable to write label > > How exactly are you copying the disklabel? Is sd2 the same size as sd0? > disklabel sd0 > disklabel.sd2; disklabel -R sd2 disklabel.sd0 The "new" sd2 is identical to the old, which is identical to the other disks. > > As always a dmesg would help. In this case by answering the latter. :-) > Here's the dmesg from earlier, before the drive croaked: OpenBSD 5.3 (GENERIC.MP) #0: Thu Aug 15 09:24:05 EDT 2013 r...@flotsam.primebuchholz.com:/usr/src/sys/arch/amd64/compile/ GENERIC.MP real mem = 17160536064 (16365MB) avail mem = 16681234432 (15908MB) mainbus0 at root bios0 at mainbus0: SMBIOS rev. 2.6 @ 0x9f000 (40 entries) bios0: vendor American Megatrends Inc. version "3.0a" date 05/07/2013 bios0: Supermicro H8SGL acpi0 at bios0: rev 2 acpi0: sleep states S0 S1 S4 S5 acpi0: tables DSDT FACP APIC MCFG OEMB HPET SRAT SSDT EINJ BERT ERST HEST acpi0: wakeup devices PC02(S4) PC03(S4) PC04(S4) PC05(S4) PC06(S4) PC07(S4) PC09(S4) PC0A(S4) PC0B(S4) PC0C(S4) SBAZ(S4) PSKE(S4) PSMS(S4) ECIR(S4) P0PC(S4) UHC1(S4) UHC2(S4) UHC3(S4) USB4(S4) UHC5(S4) UHC6(S4) UHC7(S4) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 32 (boot processor) cpu0: AMD Opteron(tm) Processor 6344 , 2600.38 MHz cpu0: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS H,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCN T,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SS E4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,NODEID,TBM,TOPEXT,ITSC,BMI1 cpu0: 64KB 64b/line 2-way I-cache, 16KB 64b/line 4-way D-cache, 2MB 64b/line 16-way L2 cache, 12MB 64b/line 128-way L3 cache cpu0: ITLB 48 4KB entries fully associative, 24 4MB entries fully associative cpu0: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu0: apic clock running at 199MHz cpu1 at mainbus0: apid 33 (application processor) cpu1: AMD Opteron(tm) Processor 6344 , 249.48 MHz cpu1: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS H,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCN T,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SS E4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,NODEID,TBM,TOPEXT,ITSC,BMI1 cpu1: 64KB 64b/line 2-way I-cache, 16KB 64b/line 4-way D-cache, 2MB 64b/line 16-way L2 cache, 12MB 64b/line 128-way L3 cache cpu1: ITLB 48 4KB entries fully associative, 24 4MB entries fully associative cpu1: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu2 at mainbus0: apid 34 (application processor) cpu2: AMD Opteron(tm) Processor 6344 , 249.45 MHz cpu2: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS H,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCN T,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SS E4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,NODEID,TBM,TOPEXT,ITSC,BMI1 cpu2: 64KB 64b/line 2-way I-cache, 16KB 64b/line 4-way D-cache, 2MB 64b/line 16-way L2 cache, 12MB 64b/line 128-way L3 cache cpu2: ITLB 48 4KB entries fully associative, 24 4MB entries fully associative cpu2: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu3 at mainbus0: apid 35 (application processor) cpu3: AMD Opteron(tm) Processor 6344 , 249.47 MHz cpu3: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS H,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4.2,POPCN T,AES,XSAVE,AVX,F16C,NXE,MMXX,FFXSR,LONG,LAHF,CMPLEG,SVM,EAPICSP,AMCR8,ABM,SS E4A,MASSE,3DNOWP,OSVW,IBS,XOP,SKINIT,WDT,FMA4,NODEID,TBM,TOPEXT,ITSC,BMI1 cpu3: 64KB 64b/line 2-way I-cache, 16KB 64b/line 4-way D-cache, 2MB 64b/line 16-way L2 cache, 12MB 64b/line 128-way L3 cache cpu3: ITLB 48 4KB entries fully associative, 24 4MB entries fully associative cpu3: DTLB 64 4KB entries fully associative, 64 4MB entries fully associative cpu4 at mainbus0: apid 36 (application processor) cpu4: AMD Opteron(tm) Processor 6344 , 249.45 MHz cpu4: FPU,VME,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,PSE36,CFLUS H,MMX,FXSR,SSE,SSE2,HTT,SSE3,PCLMUL,MWAIT,SSSE3,FMA3,CX16,SSE4.1,SSE4
Re: bioctl & replacing a failed mirror
On Mon, Sep 2, 2013 at 8:10 AM, Stefan Sperling wrote: > On Mon, Sep 02, 2013 at 07:50:41AM -0400, John Hynes wrote: > > Greetings All, > > > > I have a softraid device, sd3, which was created as follows: > > > > bioctl -c 1 -l /dev/sd0a,/dev/sd1a,/dev/sd2a softraid0 > > > > The chunk sd2a failed. bioctl shows the RAID1 as degraded, and chunk > sd2a > > as OFFLINE. > > > > In order to rebuild, I'd need to set up the new sd2. After replacing and > > zeroing the drive, I replaced the MBR with fdisk -yi /dev/sd2, which > worked > > fine. Next, I copied the disklabel from sd0 to sd2, but disklabel > refused > > to write the new label, saying: > > > > I'm not sure what you were doing here. > What commands did you run to "copy" the disklabel? > Oh - I did a "disklabel sd0 > disklabel.sd2; disklabel -R sd2 disklabel.sd2" > > > disklabel: ioctl DIOCWDINFO: Open partition would move or shrink > > disklabel: unable to write label > > > > I could use another slot I suppose, but is there a way to label the chunk > > in the same slot and rebuild onto it that I'm missing? > > > > Thanks, > > > > -John > > I would create a fresh disklabel on sd2, using disklable -E sd2, > with a partition of type RAID that matches the size of the existing > chunks in the volume. It can be any partition on sd2. You seem to > be using 'a' which should be fine (though usually 'a' is used for > root partitions of type 4.2BSD). > > Then start the rebuild (assuming /dev/sd2a is the new partition > and sd3 is the softraid disk): > > # bioctl -R /dev/sd2a sd3 > I tried just running disklabel -E sd2. I gives the same error as above when attempting to write the label. Thanks, -John On Mon, Sep 2, 2013 at 8:10 AM, Stefan Sperling wrote: > On Mon, Sep 02, 2013 at 07:50:41AM -0400, John Hynes wrote: > > Greetings All, > > > > I have a softraid device, sd3, which was created as follows: > > > > bioctl -c 1 -l /dev/sd0a,/dev/sd1a,/dev/sd2a softraid0 > > > > The chunk sd2a failed. bioctl shows the RAID1 as degraded, and chunk > sd2a > > as OFFLINE. > > > > In order to rebuild, I'd need to set up the new sd2. After replacing and > > zeroing the drive, I replaced the MBR with fdisk -yi /dev/sd2, which > worked > > fine. Next, I copied the disklabel from sd0 to sd2, but disklabel > refused > > to write the new label, saying: > > > > I'm not sure what you were doing here. > What commands did you run to "copy" the disklabel? > > > disklabel: ioctl DIOCWDINFO: Open partition would move or shrink > > disklabel: unable to write label > > > > I could use another slot I suppose, but is there a way to label the chunk > > in the same slot and rebuild onto it that I'm missing? > > > > Thanks, > > > > -John > > I would create a fresh disklabel on sd2, using disklable -E sd2, > with a partition of type RAID that matches the size of the existing > chunks in the volume. It can be any partition on sd2. You seem to > be using 'a' which should be fine (though usually 'a' is used for > root partitions of type 4.2BSD). > > Then start the rebuild (assuming /dev/sd2a is the new partition > and sd3 is the softraid disk): > > # bioctl -R /dev/sd2a sd3
Re: bioctl & replacing a failed mirror
On Mon, Sep 02, 2013 at 07:50:41AM -0400, John Hynes wrote: > In order to rebuild, I'd need to set up the new sd2. After replacing > and zeroing the drive, I replaced the MBR with fdisk -yi /dev/sd2, > which worked fine. Next, I copied the disklabel from sd0 to sd2, but > disklabel refused to write the new label, saying: You mean you tried to restore the label by running something like: disklabel -R sd2 /protofile_from_sd0? In that case, what happens if you try to build the new label manually with: disklabel -E sd2? Cheers, Erling
Re: bioctl & replacing a failed mirror
On Mon, Sep 02, 2013 at 07:50:41AM -0400, John Hynes wrote: > Greetings All, > > I have a softraid device, sd3, which was created as follows: > > bioctl -c 1 -l /dev/sd0a,/dev/sd1a,/dev/sd2a softraid0 > > The chunk sd2a failed. bioctl shows the RAID1 as degraded, and chunk sd2a > as OFFLINE. > > In order to rebuild, I'd need to set up the new sd2. After replacing and > zeroing the drive, I replaced the MBR with fdisk -yi /dev/sd2, which worked > fine. Next, I copied the disklabel from sd0 to sd2, but disklabel refused > to write the new label, saying: > I'm not sure what you were doing here. What commands did you run to "copy" the disklabel? > disklabel: ioctl DIOCWDINFO: Open partition would move or shrink > disklabel: unable to write label > > I could use another slot I suppose, but is there a way to label the chunk > in the same slot and rebuild onto it that I'm missing? > > Thanks, > > -John I would create a fresh disklabel on sd2, using disklable -E sd2, with a partition of type RAID that matches the size of the existing chunks in the volume. It can be any partition on sd2. You seem to be using 'a' which should be fine (though usually 'a' is used for root partitions of type 4.2BSD). Then start the rebuild (assuming /dev/sd2a is the new partition and sd3 is the softraid disk): # bioctl -R /dev/sd2a sd3
bioctl & replacing a failed mirror
Greetings All, I have a softraid device, sd3, which was created as follows: bioctl -c 1 -l /dev/sd0a,/dev/sd1a,/dev/sd2a softraid0 The chunk sd2a failed. bioctl shows the RAID1 as degraded, and chunk sd2a as OFFLINE. In order to rebuild, I'd need to set up the new sd2. After replacing and zeroing the drive, I replaced the MBR with fdisk -yi /dev/sd2, which worked fine. Next, I copied the disklabel from sd0 to sd2, but disklabel refused to write the new label, saying: disklabel: ioctl DIOCWDINFO: Open partition would move or shrink disklabel: unable to write label I could use another slot I suppose, but is there a way to label the chunk in the same slot and rebuild onto it that I'm missing? Thanks, -John