[OpenIndiana-discuss] 3 TB 4k USB disk woes (bug!)

Reginald Beardsley pulaskite at yahoo.com
Wed Feb 13 00:28:25 UTC 2013


I have just verified by experiment that the reason OI 151a7 cannot read s0 as outlined below is because dd is looking for the EFI label based on 512 byte sectors.  So format(1m) is labeling the disk based on 4k sectors whereas some part of the OS is treating it as 512 bytes. I'd expect both accesses to go through the sd driver, so I'm quite perplexed how this can happen.

What I did was copy the EFI label information from absolute disk offset 0x1000 to 0x200 and from 0x2000 to 0x400. (I *think*  I got the explanation right).

Obviously this is a bug, but where is a bit more challenging. Does anyone have any suggestions about how to document this properly?

The best I can think of right now is to blank the first part of the disk, label it w/ format(1m), show dd(1) of s0 fails, create a bogus EFI label in LBA 1 & 2 using 512 byte sectors and show dd(1) of s0 now works and also where it writes to.

Suggestions welcome. I'd like to make this as easy to fix as possible.

Have Fun!
Reg

--- On Mon, 2/11/13, Reginald Beardsley <pulaskite at yahoo.com> wrote:

> From: Reginald Beardsley <pulaskite at yahoo.com>
> Subject: [OpenIndiana-discuss] 3 TB 4k USB disk woes
> To: openindiana-discuss at openindiana.org
> Date: Monday, February 11, 2013, 10:57 AM
> 
> I'm still trying to get a 3 TB Toshiba USB disk to play nice
> attached to an N40L running oi_151a7.
> 
> I've successfully set un_phy_blocksize = 0x1000 &&
> un_tgt_blocksize = 0x1000 using sd-config-list. 
> Forcing the driver to reattach by unplugging the drive was
> the key to that.
> 
> I've run "devfsadm -C -c disk".
> 
> I can write an EFI label using format.
> 
> I can read the label using prtvtoc.
> 
> It has entries for s0 & s8.
> 
> ls -FRC /dev/*dsk shows me the s0 entries.
> 
> I can rewrite the label using prtvtoc | fmthard.
> 
> I can read /dev/rdsk/c5t0d0p0 w/ dd, but I cannot read
> /dev/rdsk/c5t0d0s0.
> 
> I get an "open: no such device or address"  message for
> s0.
> 
> Truss tells me open64() fails w/ Errno #6 ENXIO.
> 
> Does anyone have any suggestions as to what is wrong? 
> I'm quite baffled.
> 
> Have Fun!
> Reg
> 
> 
> 
> _______________________________________________
> OpenIndiana-discuss mailing list
> OpenIndiana-discuss at openindiana.org
> http://openindiana.org/mailman/listinfo/openindiana-discuss
>




More information about the OpenIndiana-discuss mailing list