NetBSD-Users archive

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index][Old Index]

Re: cgd > 2T



On Sat, Jun 28, 2014 at 10:16:11PM +1200, Chris Bannister wrote:
> On Fri, Jun 27, 2014 at 11:28:07PM +0100, Patrick Welche wrote:
> > I set up a cgd with:
> > 
> > # gpt show cgd1
> >        start        size  index  contents
> >            0           1         PMBR
> >            1           1         Pri GPT header
> >            2          32         Pri GPT table
> >           34          30         
> >           64  5860553790      1  GPT part - NetBSD FFSv1/FFSv2
> >   5860553854          32         Sec GPT table
> >   5860553886           1         Sec GPT header
> > 
> > so, obviously it can't have a disklabel.
> 
> Excuse me for interrupting ... but why "obviously"?

The number of blocks is 5860553790 which is bigger than what can be
stored in the disklabel's

struct disklabel {
...
        struct  partition {             /* the partition table */
                uint32_t p_size;        /* number of sectors in partition */
...

unsigned 32 bit int (4294967295) for size in blocks => need to use gpt(8)
(or from Greg's hint - just use the raw cgd)

Cheers,

Patrick


Home | Main Index | Thread Index | Old Index