tech-userlevel archive

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

Re: disklabel problems on 3TB disc

>> Back some years ago, I had occasion to (for work) set up a RAID of
>> something like six or seven TB.  The individual drives were well
>> under the 2T limit, but even so I had some 32-bit bugs to fix.

> support for >2TB raidframe was not implemented until this comment:

> date: 2010/11/01 02:35:25;  author: mrg;  state: Exp;  lines: +19 -21
> add support for >2TB raid devices.

> which was later pulled upto netbsd-5.  before this, you could not
> create or use rf devices larger than 2TB, regardless of the size of
> the individual components.

Perhaps not, but it was pretty close.  It took only a few fixes.

I did the first version of this under 2.x, but I no longer have that
tree (or, if I do, I don't know where).  Looking at my 4.0.1 tree, I
see only these changesets touching sys/dev/raidframe:

* aec5aaa Bugfix: when clearing diskwatch on a raid `disk', use the correct 
value for `none set'.
* 096b537 Add diskwatch support to raidframe pseudo-disks.
* 5ba6878 Autoconfiguration rework in raidframe.
* 4d7b7d3 A few >32-bit fixes in raidframe.
* 6174918 Handle shutdown during reconstruction/rebuild better.
* 20a3038 Import newer raidframe code.

The first two are not relevant to this discussion; they're entirely
diskwatch-related.  Taking the other four in chronological order,

* 20a3038 Import newer raidframe code.

This moved five files (rf_reconmap.c, rf_reconmap.h, rf_reconstruct.c,
rf_reconstruct.h, and rf_revent.c) to 2008-05-25 versions (I can give
CVS version numbers, but don't see much point).  Looking at the diffs,
none of them look directly related to 32-bit issues.

* 6174918 Handle shutdown during reconstruction/rebuild better.

This is not 32-bit related.

* 4d7b7d3 A few >32-bit fixes in raidframe.

This is most of the 32-bit stuff.  There are only four hunks in the
diff, all applying to rf_netbsdkintf.c.  Three of them are writing
100ULL instead of 100 when computing percentages; the fourth is

-               if (lp->d_secperunit != rs->sc_size)
+               if ((long)lp->d_secperunit != (long)rs->sc_size)

* 5ba6878 Autoconfiguration rework in raidframe.

A quick skim here makes me think none of these are related to 32-bit
issues either.

The resulting 4.0.1 tree does indeed work for a RAID 5 that's about 7T
or so.  Of course, the filesystem is on the d partition of the
resulting RAID, since I didn't do anything to deal with the "disklabel
on >2T disk" issue.  (Actually, it's a RAID 15 - a RAID 5 whose members
are RAID 1s.)  I can supply full diffs if desired, or anyone with git
installed is welcome to clone the repo and look at the aforementioned
changesets. (For those interested, it's at

It's possible there were other fixes required elsewhere in the tree,
but I don't think so.

/~\ The ASCII                             Mouse
\ / Ribbon Campaign
 X  Against HTML      
/ \ Email!           7D C8 61 52 5D E7 2D 39  4E F1 31 3E E8 B3 27 4B

Home | Main Index | Thread Index | Old Index