In an early fortress, many moons (and revisions!) ago, I inadvertently settled in a Cold biome. So cold, in fact, that the river only thawed for about 3 days at the height of 'summer.' "No worries!" says me, "There's an underground river just north of my fortress! I shall make a glorious aqueduct!" Thanks to plentiful bushes, I was able to slow the inevitable doom-by-dehydration, but thanks to a bug in the barrel/drink mechanics (barrels wouldn't completely 'empty' and thus couldn't be reused) I had to deforest half the continent to do it.
I dug a SIZEABLE cistern, I constructed a hanging aqueduct tunnel from the mountain face to the detached spire I was using as my fortress, and dug right up to the damp stone. "WAIT!" says me, "I should build a failsafe to shut off the water!" and so I carved a 2x2 room right next to the 'maintenance entrance' to my aqueduct, and linked the lever therein to a floodgate deep in the aqueduct.
I pierced the river, losing a miner to the fast-flowing water.. and then noticed that the maintenance hatch was hanging open. As was the hatch above my cistern... which led into my fortress. A goblin had picked both doors (jamming them open) and was in the process of snatching a lovely gemstone from my stockpiles. Panicked, I sent a dwarf to pull the failsafe switch and stop the water -- just in time for the water to gush out the open emergency hatch, lethally encasing said dwarf in ice, and covering the failsafe room's entrance in a glacier. The water then proceeded to fill my entire fortress from the cistern up, and flashfreezing a couple of dwarfs who'd been flushed out of the fortress into the overworld. Only my woodcutter survived, but he went mad from grief and eventually succumbed to hunger, thirst and/or hypothermia. And that's how I learned to set levers on external doors which aren't meant for frequent use.
The only bright spot is, the goblin tried to run out the way he came, and took his ill-gotten gem to a watery grave.