Most large ships have large water storage vessels as well as make fresh water using pumps (while operating). They also usually have separate pumps to pump salt water for firefighting. But in the event the pumps are not running that's a problem such as what happened with https://en.wikipedia.org/wiki/USS_Bonhomme_Richard_(LHD-6)