At the front, Orica-Scott drove the pace before Lotto-Soudal hit the front, and Ewan latched onto Greipel’s wheel.
Postlberger did not give up the maglia rosa without a fight – putting in another late attack – but this time the sprinters would not be denied.
Gaviria kicked first, but Ewan’s response was muted after he suffered a dropped chain, before Greipel hit the front to take the stage win.
Thomas proved his attentiveness by finishing in the top ten, while all the other GC riders finished safely in the bunch – Zakarin the only exception.
Greipel will now wear the maglia rosa on the third of three Sardinian stages on Sunday.
Giro d’Italia 2017: stage two – result
1) Andre Greipel (GER) – Lotto-Soudal – 6.05.18hrs
2) Roberto Ferrari (ITA) – UAE Team Emirates – ST
3) Jasper Stuyven (BEL) – Trek-Sgeafredo
4) Fernando Gaviria (COL) – QuickStep Floors
5) Kristian Sbaragli (ITA) – Dimension Data
6) Enrico Battaglin (ITA) – LottoNL-Jumbo
7) Ryan Gibbons (RSA) – Dimension Data
8) Geraint Thomas (GBR) – Team Sky
9) Caleb Ewan (AUS) – Orica-Scott
10) Rui Costa (POR) – UAE Team Emirates
General classification
1) Andre Greipel (GER) – Lotto-Soudal – 11.18.39hrs
2) Lukas Postlberger (AUT) – Bora-hansgrohe +4”
3) Caleb Ewan (AUS) – Orica-Scott +8”
4) Roberto Ferrari (ITA) – UAE Team Emirates – ST
5) Jasper Stuyven (BEL) – Trek-Segafredo +10”
6) Pavel Brutt (RUS) – Gazprom-RusVelo +12”
7) Kristian Sbaragli (ITA) – Dimension Data +14”
8) Ryan Gibbons (RSA) – Dimension Data – ST
9) Fernando Gaviria (COL) – QuickStep Floors
10) Enrico Battaglin (ITA) – LottoNL-Jumbo