Yes. And Odin also knows he will die in his battle with Fenrir. As do all the humans, because it was fated to happen from the day the world was created. The golden age preceding all the mythic stories was only made possible by the slaying of Ymer, and the vengeance of the jætter of their ancestor was unavoidable.
All the tricks played by Odin and the other gods, the wall built around Valhalla and the collection of the einharjer were all attempts to delay the inevitable and maintain the fragile balance of power that would eventually collapse.
In fact, Odin, in possession of incomparable wisdom, had the most insight into the fate of the Gods. It was also his role, as their king, to prepare them for their future and the final battle, which is why he is simultaneously a god of war and the dead, preparing fallen warriors to defend Valhalla. His all-perceiving ravens and the eye he sacrificed are both symbols of this complete knowledge.