I went down the same road - using mdadm and a UPS instead of a HW RAID controller with battery backup unit. LSI MegaRAID SAS 9261-8i SGL with a battery backup costs roughly 650 EUR; Eaton 9130i 1500VA Rack 2U UPS costs 850 EUR. So it's a bit more expensive, but you would be buying that UPS anyway.