"gpart show" stuck in loop

Kevin Day toasty at dragondata.com
Fri May 6 06:30:04 UTC 2011


On May 5, 2011, at 10:11 PM, Marcel Moolenaar wrote:
> Hi Kevin,
> 
> I reproduced the problem:
> 

Yay!

> The first problem you have is that the MBR has overflows.
> As you can see from my initial MBR, only 2.0TB out of the
> 2.7T can be addressed, whereas yours addresses the whole
> 2.7T. There must be an overflow condition.
> 
> The second problem is that more than 1 slice is marked
> active.

Yeah, I'm not exactly sure how the previous user of this storage array ended up with this MBR. I believe he was using it in FreeBSD, but probably something much older (6.x?). I don't know if it was actually working or not with all the partitions, but I honestly can't see how.

> I think we should do things:
> 1.  Protect the gpart tool against this,
> 2.  Fix the kernel to simply reject partitions that
>    fall outside of the addressable space (as determined
>    by the limitations of the scheme).
> 
> In your case it would mean that slice 3 would result
> in slice 3 being inaccessable.
> 
> Given that you've been hit by this: do you feel that such
> a change would be a better failure mode?

Definitely. As it stands now, slice 3 isn't accessible anyway:

# dd if=/dev/da0s3 of=/dev/null 
dd: /dev/da0s3: Input/output error
0+0 records in
0+0 records out
0 bytes transferred in 0.000233 secs (0 bytes/sec)

So allowing the rc startup to finish without hanging would be much improved.

Thanks for the speedy answer. :)

-- Kevin



More information about the freebsd-fs mailing list