Links between writing and erasing (or stability) of Bragg gratings in disordered media.