The turning off of the pi could be the result of the current rushing to the HDD and therefore a fast drop in voltage that occurs faster as controllable by your power supply.
To get an idea if the power supply is scaled for an 24/7 operation we have to accumulate the single power consumptions.
Of course you can only get an reliable answer if you inform us about your detailed specs, but let's try to estimate your power consumption at 5 V:
Those values are from my experience - still your encouraged to consider other sources.
RPI: about 500 mA with Peaks to 700 mA
USB external HDD: In conformance with the USB 2.0 specification each port may deliver up to 500 mA. De facto not every external HDD complies therewith. The 2.5" HDDs of the recent years rate about 2.5 A, but still you can take a look at your external drive's spec.
Theoretically you could use a 3A @5V supply. But practically I experienced that you should have about 30 % headroom at least. (please also think of other stuff you may hook up!)
- so any supply with 20 W, so 4 A @5V should be fine -