  We discuss free Dirac fermions rotating uniformly inside a cylindrical cavity
in the presence of background magnetic field parallel to the cylinder axis. We
show that in addition to the known bulk states the system contains massive edge
states with the masses inversely proportional to the radius of the cylinder.
The edge states appear at quantized threshold values of the fermion mass. In
the limit of infinite fermion mass the masses of the edge states remain finite
but, generally, nonzero as contrasted to the bulk states whose masses become
infinite. The presence of magnetic field affects the spectrum of both bulk and
edge modes, and the masses of the edge states may vanish at certain values of
magnetic field. The moment of inertia of Dirac fermions is non-monotonically
increasing, oscillating function of magnetic field. The oscillations are well
pronounced in a low-temperature domain and they disappear at high temperatures.
