There's a novel trilogy called
Memory, Sorrow and Thorn (that's the name of the trilogy, not the books). There's a fortress in it which has walls lined with great iron nails. Reason being: it was once used to defend against an attack by the book's equivalent of Elves, for whom iron is a poison and an abhorrent substance.