[clouds driven before the wind], c. 1300, rak, "movement, rapid movement," also "rush of wind, collision, crash," originally a northern word, possibly from Old English racu "cloud, storm" (or an unrecorded Scandinavian cognate of it), reinforced by Old Norse rek, *rak "wreckage, jetsam," or Old English wræc "something driven," both of which would be from Proto-Germanic *wrakaz, from PIE root *wreg- "to push, shove, drive" (see urge (v.)).
From late 14c. as "rain cloud." Often confused with wrack (n.) "destruction," especially in the phrase rack and ruin (1590s), which perhaps is encouraged in that case by the visual alliteration. Rack is "fragments of raggy clouds;" wrack is, in its secondary sense, "seaweed cast up on shore." Both probably come, ultimately, from the same PIE root, as does wreak.
Old English wrecan "avenge," originally "to drive, drive out, punish" (class V strong verb; past tense wræc, past participle wrecen), from Proto-Germanic *wrekanan (source also of Old Saxon wrekan, Old Norse reka, Old Frisian wreka, Middle Dutch wreken "to drive, push, compel, pursue, throw," Old High German rehhan, German rächen "to avenge," Gothic wrikan "to persecute"), from PIE root *wreg- "to push, shove, drive, track down" (see urge (v.)). Meaning "inflict or take vengeance," with on, is recorded from late 15c.; that of "inflict or cause (damage or destruction)" is attested from 1817. Compare wrack (v.). Related: Wreaked; wreaking.
also nerveracking, "causing anxiety or mental stress," 1812, from nerve (n.) + present participle of rack (v.1). Between nerve-racking and nerve-wracking (1867) this is probably the better choice as a figure of speech, but the sense of wrack (v.), though less suitable in the image, is not obviously wrong.
word-forming element in modern science meaning "seaweed, algae," from Latinized form of Greek phykos "seaweed, sea wrack," also "rouge, red make-up made from seaweed;" Beekes writes that it is a loan-word from Semitic and compares Hebrew pūk "eye-rouge." "The meaning 'make-up' is therefore primary for [phykos], too; hence 'seaweed'." Compare fucus, which is probably a Latin borrowing of the Greek word.