Welcome to our site! Electro Tech is an online community (with over 170,000 members) who enjoy talking about and building electronic circuits, projects and gadgets. To participate you need to register. Registration is free. Click here to register now.
Give us a clue ... what voltage is required ?
If I guess at 12v then 40W is about 3.5 Amps (P = V*I)
If I guess at 18v this comes down to 2.25 Amps.
This will only be required when the HDD is running so a battery pack could cope but its life will be short unless you have power-saving options on your computer to stop the HDD when not required.
Maybe a sealed rechargeable, Yuasa make a 2.8Ah 12v battery, #if the voltage is correct# it would give just under an hour of operation per charge. A 7Ah one would give 2 hours.
Disposables such as a pair of PP9's in series would give 18v and last for a couple of hours (at a cost of 6 pounds (UK) a time - that's £3 per hour !)
Does the size and weight matter?
A 30Ah car battery would last for 10 hours?