Date: 201807
Local time of day: 0601-1200
Location: ZZZ.Airport, US
Light: Daylight
Aircraft: A321
Operator: Air Carrier
Operating under: Part 121
Flight plan: IFR
Mission: Passenger
Flight phase: Climb
Airspace: Class A ZZZ
ATC / advisory: Center ZZZ
Aircraft component: Air Conditioning and Pressurization Pack
Component problem: Malfunctioning
Reporter organization: Air Carrier
Reporter function: Captain; Pilot Flying
Reporter qualification: Flight Crew Instrument; Flight Crew Multiengine; Flight Crew Air Transport Pilot (ATP)
Human factors: Time Pressure
Second reporter function: Pilot Not Flying; First Officer
Anomaly: Aircraft Equipment Problem Less Severe; Flight Deck / Cabin / Aircraft Event Illness / Injury; Flight Deck / Cabin / Aircraft Event Smoke / Fire / Fumes / Odor
Detector: Person Flight Attendant
When detected: In-flight
Result: Air Traffic Control Issued New Clearance; Air Traffic Control Provided Assistance; Flight Crew Diverted; Flight Crew Landed As Precaution; Flight Crew Landed in Emergency Condition; Flight Crew Requested ATC Assistance / Clarification; General Evacuated
Contributing factors: Aircraft
Primary problem: Aircraft

Narrative: Climbing through 18;000 ft.; the C Flight Attendant notified us of a dirty sock smell coming from the aft galley. We immediately followed the QRH procedure for Cabin/Cockpit fumes which resulted in us using oxygen and shutting off PACK 2. After PACK 2 was shutdown; fumes were reported to have dissipated. We consulted with Dispatch and made the joint determination it was safe to continue and we would advise of any changes.Near ZZZ; the flight attendants informed us of a musty; strong odor coming from the mid-cabin area. We again referenced the QRH checklist and consulted with Dispatch. The odors did not dissipate this time so we [advised ATC]; began an emergency descent; informed the flight attendants and passengers of the new flight plan; and prepared for landing into ZZZ. We used maximum forward speed under PIC (Pilot in Command) emergency authority towards ZZZ to minimize passenger and crew exposure to the fumes. We prepared the aircraft for an overweight landing by following the overweight landing QRH procedure and determined we had adequate performance for landing and go-around at our estimated landing weight of around 172700 lbs. We landed uneventfully and taxied to the gate. I made a PA to all passengers to expeditiously deplane the aircraft and to leave bags so they could get off as quickly as possible. For everyone's safety; it was paramount to get everyone off as quickly as possible. We contacted Dispatch about customs concerns but given the nature of the emergency it was not safe to leave anyone on the aircraft for any duration of time. After taking off my mask to exit the aircraft; I noticed the smell was noticeably strong in the cockpit and exited the aircraft expeditiously. The flight attendants were all suffering headaches and were checked out by EMS who met the aircraft.


Second narrative: Uneventful flight until passing FL180 climbing out on the departure with ARTCC; cockpit was notified by cabin of a strong 'dirty socks odor' emanating from the rear of the aircraft. We followed QRH procedure for this while continuing our climb out. Odor seemed to dissipate when we turned off Pack2 in the procedure. We continued for approximately another hour; cabin called again; stating odor had returned but was now mid-cabin. Cockpit resumed QRH and turned on Pack2/off Pack1; [advised ATC]; and diverted to ZZZ with [deviation] issued for same by Dispatch. Performed overweight landing checklist; normal checklists; run all landing data; landed uneventfully. Proceeded to gate. Deplaned passengers; Inflight all checked by EMTs; maintenance had extended delay getting call back from maintenance control; entire crew sent to hotel by crew scheduling.


Synopsis: A321 flight crew reported being advised of a dirty sock smell coming from the aft galley and then the mid cabin; resulting in a diversion.