How could an underground civilization (think prototypical fantasy dwarves) deal with the situation of inadvertently mining into an oil-and-gas bearing, pressurized stratum (i.e. creating themselves a blowout)? How much would that oil igniting change their response? (Assume that they have to get close to it to do anything to it -- they can't just magic it away from afar.)
Tolkien Dwarves had the ability to sing to earth and the vibration that came back allowed them to see what and where things were in the earth giving them the ability to tunnel with out worry about tunneling directly into the oil reservoir. That’s what allowed to make new area where they haven’t been able to design a network that allowed proper lighting and they could could to continue on in deem to no light environments
First and foremost, they should have shafts going all the way to the surface. This not only provides them with fresh air, it also allows them to redirect part of that blowout pressure should it happen.
Second, they don't dig much around already stablished settlements. And for those digs far away from home, they don't do it themselves. They employ cheap goblin labour instead. The goblins appreciate the gold, and the crazy high amount of deaths every year due to blowouts actually helps keep their population stable.
Same approach as they take everywhere else when sudden intrusions loom? Add floodgates and bulkheads. Then try to make the most of it, whatever it is.
Also underground fora and fauna might have developed detection skills, similar to donkeys who refuse to move when the ground is unsave.
The dwarven miners of the Iron Spine Mountains were known for their unflappability and stoicism, but the sudden eruption of flaming black liquid from the rock face gave even the most seasoned diggers pause.
"Blast it all, we've hit a gasser!" cried Foreman Feldspar. "Must've tapped into one of them pressured oil strata the geologists are always going on about."
The towering column of burning oil lit up the tunnels and caused quite a commotion. But dwarves weren't easily scared off. They got to work attempting to contain the blowout, taking shifts to avoid getting singed by the growing inferno. All manner of contraptions were rigged up - earthworks, stone walls, metal plates, anything to restrict the spread of the volatile flames.
"This here blowout's not getting the better of us," Feldspar declared between soot-blackened coughs. "We'll give it a taste of dwarven persistence. Keep at it lads!"
But the oil just kept a-coming, faster than they could curb it. The smoke was getting oppressive even in the vast underground networks. Finally, the dwarf king himself, Magnus Ironpick, arrived to assess the situation.
"This won't do at all," Magnus grumbled, flames dancing in his impressive beard. "Time we take drastic measures."
He called on the magic users to enact an emergency containment spell. With tremendous effort, the wizards managed to seal the gushing vent with a shimmering rune barrier. The barrier held, though flames still raged behind it.
"There, that'll keep us safe, by my iron hammer," Magnus said. "We'll have to abandon this section of mines. But we dwarves endure, and we'll be back mining once it's safe again!"
The dwarves weren't about to let one little oil inferno interrupt their endless delving through the mountain's riches. If anything, it added a new challenge to conquer. They'd be back!