Re: more about softraid
On Fri, Oct 29, 2010 at 09:18:19AM -0700, Chris Cappuccio wrote: Niels Poppe [ni...@netbox.org] wrote: # bioctl -R sd0a sd2 bioctl: Target sd0a: target not specified I ran into this just the other day, bioctl -R sd0a sd2 didn't work, bioctl -R /dev/sd0a sd2 did Wow. However, still won't do for me. With a different error, and a dmesg response: # bioctl -R /dev/sd0a sd2 bioctl: BIOCSETSTATE: Invalid argument softraid0: partition too small, at least 3997412864 B required Funny, as i haven't changed anything. Same device. But again, it isn't a clean snapshot. I'll upgrade when i get near the machine, which isn't going to happen soon. --
Re: more about softraid
On Fri, Oct 29, 2010 at 05:39:27PM -0700, Chris Cappuccio wrote: Are the partition sizes on sd0a/sd1a (I assume the are mirrored) the same? What does disklabel show for the RAIDed disks? sd0 and sd2 are exactly identical # disklabel sd0 # /dev/rsd0c: type: SCSI disk: SCSI disk label: USB DISK 2.0 uid: flags: bytes/sector: 512 sectors/track: 63 tracks/cylinder: 255 sectors/cylinder: 16065 cylinders: 486 total sectors: 7811072 boundstart: 63 boundend: 7807590 drivedata: 0 16 partitions: #size offset fstype [fsize bsize cpg] a: 7807527 63RAID c: 78110720 unused # disklabel sd1 # /dev/rsd1c: type: SCSI disk: SCSI disk label: USB DISK 2.0 uid: flags: bytes/sector: 512 sectors/track: 63 tracks/cylinder: 255 sectors/cylinder: 16065 cylinders: 486 total sectors: 7811072 boundstart: 63 boundend: 7807590 drivedata: 0 16 partitions: #size offset fstype [fsize bsize cpg] a: 7807527 63RAID c: 78110720 unused # disklabel sd2 # /dev/rsd2c: type: SCSI disk: SCSI disk label: SR RAID 1 uid: flags: bytes/sector: 512 sectors/track: 63 tracks/cylinder: 255 sectors/cylinder: 16065 cylinders: 485 total sectors: 7807448 boundstart: 0 boundend: 7807448 drivedata: 0 16 partitions: #size offset fstype [fsize bsize cpg] c: 78074480 unused f: 78074480 4.2BSD 2048 163841 # /volumes/backup
Re: more about softraid
On Sat, Oct 30, 2010 at 03:02:43AM +0200, Niels Poppe wrote: sd0 and sd2 are exactly identical correction: sd0 and sd1
Re: more about softraid
On Sat, Oct 23, 2010 at 11:31:01PM -0500, Marco Peereboom wrote: How would softraid know which sd to rebuild if 3 are degraded? That's why 2 arguments are needed, but i would have expected bioctl -R sd1 softraid0 for the case below. Not debating the language couldn't be improved but that bit is IMO pretty obvious. Obvious it probably is, yet adding the word 'final' for the device argument in the manpage description would perhaps make it even more obvious. :-) On Oct 23, 2010, at 23:07, Niels Poppe ni...@netbox.org wrote: On Sat, Oct 23, 2010 at 07:20:10PM -0500, Marco Peereboom wrote: Softraid is not a volume manager. We don't support adding, removing chunks after creation time. I'll take diffs for this however this is pretty far from trivial. The one piece of information I found a bit unclear in the manual is how to rebuild a degraded mirror: bioctl -R newchunk raid where *both* the newchunk and the raid argument are real disknames, as in bioctl -R sd1 sd2 for a case were physical devices sd0 and sd1 formed a mirror creating the softraid device sd2, and sd1 fell offline. I would indeed have expected the second argument to be softraidx The manual states: -R device | channel:target[.lun] Manually kick off a rebuild using device or channel:target[.lun] on the provided drive name. This command requires a drive by name (e.g. sd1) instead of a controller by name (e.g. softraid0). Perhaps that last sentence could be This command requires the final device argument to be the drive name (e.g. sd2) instead of the controller name (e.g. softraid0). Regards, Niels
Re: more about softraid
On Sun, Oct 24, 2010 at 10:09:55AM -0500, Marco Peereboom wrote: On Sun, Oct 24, 2010 at 03:00:23PM +0200, Niels Poppe wrote: .. would have expected bioctl -R sd1 softraid0 for the case below. What slice is being rebuilt onto? Well... i guess i was thinking that from the unit identifier in softraidn the actual raid volume would be known. Can different volumes share a single softraid device? The manual states: -R device | channel:target[.lun] Manually kick off a rebuild using device or channel:target[.lun] on the provided drive name. This command requires a drive by name (e.g. sd1) instead of a controller by name (e.g. softraid0). Perhaps that last sentence could be This command requires the final device argument to be the drive name (e.g. sd2) instead of the controller name (e.g. softraid0). Regards, Niels
Re: more about softraid
On Sun, Oct 24, 2010 at 03:00:23PM +0200, Niels Poppe wrote: .. would have expected bioctl -R sd1 softraid0 for the case below. What slice is being rebuilt onto? Well... i guess i was thinking that from the unit identifier in softraidn the actual raid volume would be known. Can different volumes share a single softraid device? I don't understand the question. It turns out that I don't understand how this is supposed to work. I have (err, had) this working array: # bioctl softraid0 Volume Status Size Device softraid0 0 Online 3997412864 sd2 RAID1 0 Online 3997412864 0:0.0 noencl sd1a 1 Online 3997412864 0:1.0 noencl sd0a Now, with one drive unplugged, i get: # bioctl softraid0 Volume Status Size Device softraid0 0 Degraded 3997412864 sd2 RAID1 0 Online 3997412864 0:0.0 noencl sd1a 1 Offline3997412864 0:1.0 noencl sd0a With sd0 replaced again, i expected bioctl -R sd0 softraid0 to give an error bioctl -R sd0 sd2 to start a rebuild. But neither form works. Both report: bioctl: Target sd0: target not specified Which command is supposed to correctly rebuild the array? Regards, and thanks anyway Niels
Re: more about softraid
On Sun, Oct 24, 2010 at 06:05:35PM -0500, Marco Peereboom wrote: On Oct 24, 2010, at 17:54, Niels Poppe ni...@netbox.org wrote: I have (err, had) this working array: # bioctl softraid0 Volume Status Size Device softraid0 0 Online 3997412864 sd2 RAID1 0 Online 3997412864 0:0.0 noencl sd1a 1 Online 3997412864 0:1.0 noencl sd0a Now, with one drive unplugged, i get: # bioctl softraid0 Volume Status Size Device softraid0 0 Degraded 3997412864 sd2 RAID1 0 Online 3997412864 0:0.0 noencl sd1a 1 Offline3997412864 0:1.0 noencl sd0a With sd0 replaced again, i expected bioctl -R sd0 softraid0 to give an error bioctl -R sd0 sd2 to start a rebuild. bioctl -R sd0a sd2 That is good to know, meaning, something else is broken: # bioctl -R sd0a sd2 bioctl: Target sd0a: target not specified Would it be interesting to investigate what's on the devices or should I just re-create the whole thing from scratch?
Re: more about softraid
On Sun, Oct 24, 2010 at 09:09:52PM -0500, Marco Peereboom wrote: odd. does dmesg spit anything useful out? actually, no. for the usb stick pulling out the machine: sd0 detached scsibus0 detached umass0 detached after that, because i accessed the softraid filesystem: softraid0: retrying read on block 6704 then, putting it back: umass0 at uhub0 port 1 configuration 1 interface 0 USB DISK 2.0 rev 2.00/1.00 addr 2 umass0: using SCSI over Bulk-Only scsibus0 at umass0: 2 targets, initiator 0 sd0 at scsibus0 targ 1 lun 0: , USB DISK 2.0, PMAP SCSI0 0/direct removable sd0: 3814MB, 512 bytes/sec, 7811072 sec total and nothing further. the bioctl command errs out without any logging. i'll attach /var/run/dmesg.boot OpenBSD 4.8-current (GENERIC.MP) #0: Tue Oct 12 20:18:07 MDT 2010 r...@router.lan:/usr/src/sys/arch/i386/compile/GENERIC.MP cpu0: Genuine Intel(R) CPU N270 @ 1.60GHz (GenuineIntel 686-class) 1.60 GHz cpu0: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,EST,TM2,SSSE3,xTPR,PDCM,MOVBE real mem = 1064660992 (1015MB) avail mem = 1037225984 (989MB) mainbus0 at root bios0 at mainbus0: AT/286+ BIOS, date 05/24/10, BIOS32 rev. 0 @ 0xf0010, SMBIOS rev. 2.4 @ 0xfd120 (19 entries) bios0: vendor American Megatrends Inc. version 080015 date 05/24/2010 bios0: AOpen i945GSEx-QS R2.00 May.24.2010 acpi0 at bios0: rev 2 acpi0: sleep states S0 S3 S4 S5 acpi0: tables DSDT FACP APIC MCFG SLIC OEMB SSDT acpi0: wakeup devices P0P2(S4) LAN_(S4) P0P1(S4) USB0(S4) USB1(S4) USB2(S4) USB3(S4) EUSB(S4) MC97(S4) P0P4(S4) P0P5(S4) P0P6(S4) P0P7(S4) P0P8(S4) P0P9(S4) acpitimer0 at acpi0: 3579545 Hz, 24 bits acpimadt0 at acpi0 addr 0xfee0: PC-AT compat cpu0 at mainbus0: apid 0 (boot processor) cpu0: apic clock running at 133MHz cpu1 at mainbus0: apid 1 (application processor) cpu1: Genuine Intel(R) CPU N270 @ 1.60GHz (GenuineIntel 686-class) 1.60 GHz cpu1: FPU,V86,DE,PSE,TSC,MSR,PAE,MCE,CX8,APIC,SEP,MTRR,PGE,MCA,CMOV,PAT,CFLUSH,DS,ACPI,MMX,FXSR,SSE,SSE2,SS,HTT,TM,SBF,SSE3,MWAIT,DS-CPL,EST,TM2,SSSE3,xTPR,PDCM,MOVBE ioapic0 at mainbus0: apid 2 pa 0xfec0, version 20, 24 pins ioapic0: misconfigured as apic 1, remapped to apid 2 acpiprt0 at acpi0: bus 0 (PCI0) acpiprt1 at acpi0: bus -1 (P0P2) acpiprt2 at acpi0: bus 4 (P0P1) acpiprt3 at acpi0: bus 2 (P0P5) acpiprt4 at acpi0: bus 3 (P0P6) acpiprt5 at acpi0: bus -1 (P0P7) acpiprt6 at acpi0: bus -1 (P0P8) acpiprt7 at acpi0: bus -1 (P0P9) acpicpu0 at acpi0: C3, C2, C1, PSS acpicpu1 at acpi0: C3, C2, C1, PSS acpibtn0 at acpi0: SLPB acpibtn1 at acpi0: PWRB acpivideo0 at acpi0: IGD_ acpivout0 at acpivideo0: DD01 acpivout1 at acpivideo0: DD02 acpivout2 at acpivideo0: DD03 acpivout3 at acpivideo0: DD04 bios0: ROM list: 0xc/0xec00! cpu0: Enhanced SpeedStep 1597 MHz: speeds: 1600, 1333, 1067, 800 MHz pci0 at mainbus0 bus 0: configuration mode 1 (bios) pchb0 at pci0 dev 0 function 0 Intel 82945GME Host rev 0x03 vga1 at pci0 dev 2 function 0 Intel 82945GME Video rev 0x03 wsdisplay0 at vga1 mux 1: console (80x25, vt100 emulation) wsdisplay0: screen 1-5 added (80x25, vt100 emulation) intagp0 at vga1 agp0 at intagp0: aperture at 0xd000, size 0x1000 inteldrm0 at vga1: apic 2 int 16 (irq 10) drm0 at inteldrm0 Intel 82945GM Video rev 0x03 at pci0 dev 2 function 1 not configured azalia0 at pci0 dev 27 function 0 Intel 82801GB HD Audio rev 0x02: apic 2 int 16 (irq 10) azalia0: codecs: Realtek ALC662 audio0 at azalia0 ppb0 at pci0 dev 28 function 0 Intel 82801GB PCIE rev 0x02: apic 2 int 16 (irq 10) pci1 at ppb0 bus 1 ppb1 at pci0 dev 28 function 1 Intel 82801GB PCIE rev 0x02: apic 2 int 17 (irq 11) pci2 at ppb1 bus 2 re0 at pci2 dev 0 function 0 Realtek 8168 rev 0x03: RTL8168D/8111D (0x2800), apic 2 int 17 (irq 11), address 00:01:80:7a:b8:71 rgephy0 at re0 phy 7: RTL8169S/8110S PHY, rev. 2 ppb2 at pci0 dev 28 function 2 Intel 82801GB PCIE rev 0x02: apic 2 int 18 (irq 5) pci3 at ppb2 bus 3 re1 at pci3 dev 0 function 0 Realtek 8168 rev 0x03: RTL8168D/8111D (0x2800), apic 2 int 18 (irq 5), address 00:01:80:7a:b8:70 rgephy1 at re1 phy 7: RTL8169S/8110S PHY, rev. 2 uhci0 at pci0 dev 29 function 0 Intel 82801GB USB rev 0x02: apic 2 int 23 (irq 7) uhci1 at pci0 dev 29 function 1 Intel 82801GB USB rev 0x02: apic 2 int 19 (irq 10) uhci2 at pci0 dev 29 function 2 Intel 82801GB USB rev 0x02: apic 2 int 18 (irq 5) uhci3 at pci0 dev 29 function 3 Intel 82801GB USB rev 0x02: apic 2 int 16 (irq 10) ehci0 at pci0 dev 29 function 7 Intel 82801GB USB rev 0x02: apic 2 int 23 (irq 7) usb0 at ehci0: USB revision 2.0 uhub0 at usb0 Intel EHCI root hub rev 2.00/1.00 addr 1 ppb3 at pci0 dev 30 function 0 Intel 82801BAM Hub-to-PCI rev 0xe2 pci4 at ppb3 bus 4 ichpcib0 at pci0 dev 31 function 0 Intel 82801GBM LPC rev 0x02: PM disabled pciide0 at pci0 dev 31 function 2 Intel 82801GBM SATA rev 0x02: DMA, channel 0 wired to compatibility, channel 1 wired to compatibility wd0 at pciide0 channel 0 drive 0:
Re: more about softraid
Just to be complete and honest, i think i should reveil as well that it is all built and installed from source, and kernel and userland have slightly different build dates: # ls -ld /bsd -rwxr-xr-x 1 root wheel 8916825 Oct 13 04:18 /bsd and userland is built just a bit later: # ls -ld /sbin/bioctl -r-xr-xr-x 1 root bin 114260 Oct 16 20:30 /sbin/bioctl So this may well be an 'unsupported' configuration :() Perhaps i should cvsup once more and reinstall kernel and userland.
Re: more about softraid
On Sat, Oct 23, 2010 at 07:20:10PM -0500, Marco Peereboom wrote: Softraid is not a volume manager. We don't support adding, removing chunks after creation time. I'll take diffs for this however this is pretty far from trivial. The one piece of information I found a bit unclear in the manual is how to rebuild a degraded mirror: bioctl -R newchunk raid where *both* the newchunk and the raid argument are real disknames, as in bioctl -R sd1 sd2 for a case were physical devices sd0 and sd1 formed a mirror creating the softraid device sd2, and sd1 fell offline. I would indeed have expected the second argument to be softraidx The manual states: -R device | channel:target[.lun] Manually kick off a rebuild using device or channel:target[.lun] on the provided drive name. This command requires a drive by name (e.g. sd1) instead of a controller by name (e.g. softraid0). Perhaps that last sentence could be This command requires the final device argument to be the drive name (e.g. sd2) instead of the controller name (e.g. softraid0). Regards, Niels On Oct 23, 2010, at 17:51, Jean-Francois jfsimon1...@gmail.com wrote: Le Sunday 24 October 2010 00:34:53, Tomas Bodzar a C)crit : I think that this will solve your hunt for informations ;-) http://www.openbsd.org/papers/asiabsdcon2010_softraid/softraid.pdf On Sun, Oct 24, 2010 at 1:21 AM, Jean-Francois jfsimon1...@gmail.com wrote: Hi, I'm having difficulty to understand how softraid works ie. how to add chunks, remove chunks, change and rebuild, add/remove hotspares. The manpages bioctl softraid only mention basic configuration, but once the raid is working ... any other related docs or man ? Thanks, J-F Thanks, it effectively helps to understand how it works, but not yet the command lines used to add-change-remove-rename chuncks or hotspares.