The 32-year-old Gearrin was 2-1 with one save and a 3.77 ERA last year in 62 games for San Francisco, Texas and Oakland. He struck out 53 and walked 21 in 57 1/3 innings, holding batters to a .255 average.
Gearrin also has pitched for Atlanta in a seven-year big league career. He is 12-9 with a 3.54 ERA in 270 relief appearances.
"Cory Gearrin brings much needed veteran experience and stability to the back of our bullpen," Mariners general manager Jerry Dipoto said. "He has been a solid under-the-radar performer, particularly over the past two seasons."
Gearrin can earn an additional $450,000 for games pitched: $75,000 for 30, $100,000 for 40, $125,000 for 50 and $150,000 for 60. He also can make $775,000 for games finished: $50,000 for 20, $175,000 for 30, $250,000 for 40 and $400,000 for 50.
Beckham, who turns 29 this month, hit .230 with 17 doubles, 12 homers and 35 RBI in 96 games for Baltimore last year. He was sidelined from April 23 to June 25 because of a strained left groin.
Selected first overall by Tampa Bay in the 2008 amateur draft, Beckham has a .252 average with 48 homers and 151 RBI in five major league seasons for the Rays and Orioles, who acquired him in July 2017. He batted .278 with 18 doubles, 22 homers and 62 RBI in 2017.
"Tim Beckham is a very talented player who is one year removed from being one of the more productive shortstops in the American League," Dipoto said. "He is a real offensive threat with multi-position defensive versatility that fits our team very well."
Beckham can earn $250,000 for games started: $50,000 for 80 and each additional 10 through 120.
Seattle designated outfielder John Andreoli for assignment to open a roster spot.
OF Domingo Santana agreed to a $1.95 million, one-year contract, getting a raise from $572,400 in his first year of arbitration eligibility. Acquired in an offseason trade, he hit .265 with five home runs and 20 RBI in a down season in which he lost his regular spot in Milwaukee's outfield after the Brewers acquired Christian Yelich. In 2017, Santana hit .278 with career-high 30 home runs and 85 RBI. Seattle is banking on Santana being the right-handed power in its lineup to try and replace loss of Nelson Cruz. Left-hander Roenis Elias is Seattle's only remaining arbitration-eligible player.