I have a home samba file "server" (a raspberry pi) with two hard drives in a software raid 1, which have proven less reliable than any of my non-raid disks. I know there is a chance for data corruption when power is lost, but I have now lost two entire directories and a file I was working on due to power being lost (all separate occasions). The power was cut and when I rebooted, the file was empty. The other two times, the folders were just gone. Why might this be happening? Also, shouldn't a journaling file system prevent this? Might there be a way to recover the data?
RAID is not magic. It's a technique for increasing uptime in the face of a hard-drive failure, and nothing more. If you want to keep from losing data in the event of a power failure, get a UPS.
Journaling is not magic. It's a technique for ensuring filesystem consistency in the face of an unexpected shutdown, and nothing more. It does this by making certain actions "all or nothing": either an action (such as creating a file) will have taken place, or it won't have -- you'll never find your disk with an action halfway done (eg. a file with space allocated for it, but no directory entry). It speeds up recovery in the event of a power failure, because the OS knows it doesn't need to go looking for the results of partly-completed actions. If you want to keep from losing data in the event of a power failure, get a UPS.
In short, the problem you're running into is that you're using the wrong tools for the job. If you want to keep from losing data in the event of a power failure, you need to keep power running to your computer until it can cleanly shut down. This means you need a UPS.