The response of cells in sensing a difference in osmotic pressure between the inside and outside of the cell. This response includes signaling from osmotic sensors to activate transcription factors, which in turn regulate the expression of osmocompensatory genes, all functioning to maintain CELL VOLUME and the water concentration inside the cells.