The bard's Inspire Greatness ability adds 2d10 hit dice to a character for a short period of time.
The trait Magical Knack gives you bonus caster levels that cannot exceed your current hit dice.
Combining the two you effectively receive +2 caster levels.
Other than Bardic inspiration, are there any other spells or abilities (even ability drain) that grant you explicit bonus hit dice?
I have not been able to find any in my Google searches or database searches (but then again, I'm not a coder able to script such things).