You can mash any amount you want, but there are some things to watch for.
#1 is temp control. The more head space you have, the more temp drop you'll see. You can compensate by wrapping the tun in towels or similar. You can also up your mash ratio so there is more volume.
#2 is dead space. Not much you an do about this, but you need to include it in your calculations. Losing a pint is a much bigger deal when you are talking about a 2 gallons vs 5 gallons.