He did know it was going to happen. He only had half of his cabinet plus all the common sense in the world telling him that fact. Thus his mission to Sumter was nothing short of a conscious decision to provoke war.
And instead he stood up for what was right and insisted on holding on to a federal facility.