On Tue, May 01, 2018 at 02:36:49PM +0200, Håkon Robbestad Gylterud wrote: > Hi, > > I have two 5TB disks, which I want to set up as mirrored using RAID 1 > through softraid(4). But after attaching the disk using bioctl(8), the > disk appears with 2TB, not 5TB.
I can imagine you have some old softraid metadata lying around. Did you try to wipe any existing metadata from the RAID partitions before attaching it? # dd if=/dev/zero of=/dev/rwd0A bs=1m count=10 # dd if=/dev/zero of=/dev/rwd0B bs=1m count=10 should be more than enough. Spelling mistakes are intentional. I DO NOT RECOMMEND THIS if you already have some stuff on there which you care about. # bioctl -C force ... could also help. /Alexander > > How can I get the correct size for the softraid device? > > The disks are wd0 and wd2, and disklabel shows: > > # /dev/rwd0c: > type: ESDI > disk: ESDI/IDE disk > label: TOSHIBA HDWE150 > duid: f76030f4c8b1cf43 > flags: > bytes/sector: 512 > sectors/track: 63 > tracks/cylinder: 255 > sectors/cylinder: 16065 > cylinders: 608001 > total sectors: 9767541168 > boundstart: 64 > boundend: 9767541168 > drivedata: 0 > > 16 partitions: > # size offset fstype [fsize bsize cpg] > a: 9767541104 64 RAID > c: 9767541168 0 unused > > # /dev/rwd2c: > type: ESDI > disk: ESDI/IDE disk > label: TOSHIBA HDWE150 > duid: 635ad6956b23ea1d > flags: > bytes/sector: 512 > sectors/track: 63 > tracks/cylinder: 255 > sectors/cylinder: 16065 > cylinders: 608001 > total sectors: 9767541168 > boundstart: 64 > boundend: 9767541168 > drivedata: 0 > > 16 partitions: > # size offset fstype [fsize bsize cpg] > a: 9767541104 64 RAID > c: 9767541168 0 unused > > > But when I attach using: > > # bioctl -c 1 -l /dev/wd0a,/dev/wd2a softraid0 > softraid0: RAID 1 volume attached as sd0 > > dmesg shows: > > sd0 at scsibus3 targ 1 lun 0: <OPENBSD, SR RAID 1, 006> SCSI2 0/direct fixed > sd0: 2097148MB, 512 bytes/sector, 4294961093 sectors > > Thanks in advance to any pointers in the right direction. > > Best regards, > —Håkon > > >