Once I was advised not to drink too much, but rather just sips, to get rid of the thirst: a camelback + a drinking tube in your backpack should be handy in this case. Of course, apply with reason: do not get yourself dehydrated! drink a lot before the trek (as advised in other answers), and not only: being well-hydrated in general is good for your health (not just drinking 2 liters of water before a hike). Also, experiment with this in advance on smaller few-hour-long hikes, to see how does it work for you.
I noticed after several hikes that I tend to take back home 1/3-1/2 of my water. After trying this method I found it useful, but only for one-day trips, and also if the weather is suitable for it - if I hike in 30+ degrees (Celsius) for a whole day then yes, I definitely need more water than that. And again, it is a great exercise of self-discipline: how to drink just a sip once you started drinking :)