[OpenAFS] Re: Major synchronization error

Jack Hill jackhill@jackhill.us
Wed, 14 Nov 2012 09:01:49 -0500 (EST)


On Tue, 13 Nov 2012, Todd Lewis wrote:

> Back before Linux could handle uids > 64k, we recycled pts ids. We had a
> simple Perl daemon that would look at the allocated pts ids on startup,
> then in response to requests would hand back numbers in order
> corresponding to the holes between some arbitrary low (I think 1000) and
> 64k-2. This allowed us to keep our uids below 64k until Linux grew up.
> You're welcome to that code if you want it.
>
> Second point: I'm pretty sure that the pts maxid is just a number that
> would be better called "nextid". It isn't necessarily the highest id
> number in your pt db. I think we ran into this at one point, though you
> are in a better position to try it than I am as your maxid is basically
> useless at this point.
>
> Anyway, I believe you can set your maxid (pts setmax ###) to some lower
> number, and createuser will attempt to use unused numbers starting at that
> point going upward. Try setting it to, say, your pts id, then attempt to
> create a dummy pts entry. You may be pleasantly surprised. Or you may find
> I'm wrong. Either way, let us know what you find!
>
> Good luck,

Thanks for your response. Normally, when creating entries we assign ids to 
match UNIX uids. We set the maxid such that trying to create an entry 
without explicitly setting the id would fail (to prevent mistakes). I 
forgot about this when I was tried to create a throwaway pt entry (I was 
trying to check if the "major synchronization error" I received when 
creating a user was transient or not). The error I got, "database is 
inconsistent ; unable to create user foo" didn't point me in the right 
direction. Now that I understand what was going on, everything is in good 
shape.

Jack