On Sun, 3 Mar 2013, Brandon Tanner wrote:
> Anyone else having trouble getting bioctl to see more than 2TB when
> creating softraid0?
>
> I've got 2 x 3TB drives, BIOS sees them fine.
>
> dmesg on bootup:
>
> sd1 at scsibus0 targ 3 lun 0: <ATA, ST3000DM001-1CH1, CC24> SCSI3 0/direct
> fixed naa.5000c5005e0bcda5
> sd1: 2861588MB, 512 bytes/sector, 5860533168 sectors
> sd2 at scsibus0 targ 4 lun 0: <ATA, ST3000DM001-1CH1, CC24> SCSI3 0/direct
> fixed naa.5000c5005e15ec80
> sd2: 2861588MB, 512 bytes/sector, 5860533168 sectors
>
> notice the correct # of sectors above.
>
> disklabel -E sd1
>
> > p T
>
> OpenBSD area: 64-5860533168; size: 2.7T; free: 0.0T
> #                size           offset  fstype [fsize bsize  cpg]
>   a:             2.7T               64    RAID
>   c:             2.7T                0  unused
>
> disklabel -E sd2
>
> > p T
>
> OpenBSD area: 64-5860533168; size: 2.7T; free: 0.0T
> #                size           offset  fstype [fsize bsize  cpg]
>   a:             2.7T               64    RAID
>   c:             2.7T                0  unused
>
> # bioctl -c 1 -l /dev/sd1a,/dev/sd2a softraid0
> softraid0: SR RAID 1 volume attached as sd3

This will assemble the volume from existing metadata if it exists. Any chance 
you created a 2TB 'a' partition to start with and created a softraid volume 
with it, then resized/recreated the disklabels? I'd certainly suggest zeroing 
the drives (via dd or similar), or using -C force (dd is more certain).

The size is read directly from the disklabel, but only when the metadata is 
first created (after the metadata exists, we read the size from the 
metadata). All of the variables involved appear to be 64-bit types so I do 
not think that 32-bit truncation is occurring, although there are some 
signed/unsigned issues that should be addressed at some point.

If zeroing and recreating the metadata fails to solve the issue, I can provide 
a diff that adds some debug info.

> sd3 at scsibus2 targ 1 lun 0: <OPENBSD, SR RAID 1, 005> SCSI2 0/direct
> fixed sd3: 2097148MB, 512 bytes/sector, 4294961093 sectors
>
> Yet, bioctl only sees it for 4294961093 sectors :(
>
> # bioctl -h sd3
> Volume      Status               Size Device
> softraid0 0 Online               2.0T sd3     RAID1
>           0 Online               2.0T 0:0.0   noencl <sd1a>
>           1 Online               2.0T 0:1.0   noencl <sd2a>
>
> I have been troubleshooting this issue with the help of Scott McEachern
> extensively, and we are both stumped. He suggested I put this on misc to
> see if jsing might know anything. I have an Intel Desktop Motherboard model
> DP43TF. I can newfs the drives individually and mount them as 2.7TB, it's
> only when trying to make a softraid volume that it doesn't see more than
> 2TB.
>
> I am using the Feb 21, 2013 snapshot of 5.3, and my dmesg is at:
> http://pastebin.com/jqnpSsnC
>
> Anyone else experiencing this?
> <http://search.gmane.org/?author=Scott+McEachern&sort=date>


-- 

    "Reason is not automatic. Those who deny it cannot be conquered by it.
     Do not count on them. Leave them alone." -- Ayn Rand

Reply via email to