Data stored on the disk do not change it's mass.
Bit's are stored by changing magnetisation of small grains in the
This is the same process (on microscopic scale) as magnetising a needle by
rubbing it with a permanent magnet. The process does not adds or removes mass
to or from the object.
Since you asked to include even the smallest changes in mass, we
need to consider the energy content of empty vs full disk. Increase
in energy by amount E will increase it's mass by amount E/ (c * c) - a
very small amount.
The writing of the disk requires energy, but that energy is not stored.
Magnetisation of the grain is a bistable system
Writing a bit is similar to rolling a stone up the hill, across the top,
from one valley to another. So, energy delivered on the way up is
returned on the way down. So far answer is still: Enefgy content is
However, some of that energy will be dissipated as heat. Immediately
after recording, disk will be warmer and therefore heavier (not in a
measurable way). But that temperature rise will equilibrate to
enviroment - so that change is not permanent.
Finally, there is an interaction of magnetic moments with each other
and with external magnetic field ( e.g. Earth magnetism).
Each magnetic dipole (a grain seen as small permanent magnet) has energy
which depends on orientation of the dipole relative to external field.
By writing on the disk, the total number if dipoles on one direction,
(let's say) pointing North, changes. However, number depends on the pattern
written, and empty disk has a pattern written on it when disk is formated.
So, this very small change depends on the data, and also on the orientation of
the whole disk as a unit. Becouse of this last fact (dependence on the
orientation of the object) I would summarise answer as follow:
Writing the data on the hard disk may change (increase or decrease)
total magnetic moment of the unit. That does not changes the mass of
However, orientation of the unit in external magnetic field will effect total
energy of the unit. If we include mass equivalent of that energy in the term
'mass of the unit', that quantity may go up or down as a result of recording or
erasing (reformating the disk) of the data.