I love Edward Ellsberg's 1929 book "On The Bottom: The Raising of the Submarine S-51" about the 1925/6 salvage operations that eventually raised the sunken US submarine.
During the salvage effort, the blacksmith(s) on board the repair ship USS Vestal, along with other machinists and smiths, was instrumental in creating tools on demand to fit the often odd needs of the salvage team.
By the 1920s, were blacksmiths only found on specialized ships like the Vestal, or would a cruiser or battleship also have counted a blacksmith among their on-board fabrication and repair team? And did the US Navy train sailors to be blacksmiths, or did blacksmiths join the Navy, and find themselves placed where their skills were most useful?
I would be interested in hearing likewise about other "smiths" such as the copper and tin smiths, who I know were used in the construction and maintenance of hardhat diving gear among other tasks. When do these specialties get phased out or swallowed up by "machinist?"
Oh boy here we go talking about Rates again!
Lets start with the history of the Rate, which in Naval Service is basically your job title, that then mixes with your rank. So a man who was a Petty Officer 1st Class as his rank and was Rated as a Blacksmith would be a Blacksmith First class. Earning or Striking a Rate traditionally was the result of experience and essentially studying when you could through observation and apprenticeship. However with the coming of more technology to the Fleet many Navy's began to see the value in establishing shore based schools for certain Rates to train qualified sailors which has evolved in part to the modern A,, and C School system used by the US Navy. That said the retention and development of talent when other opportunities existed in the early 1900's was very much on the Navy's mind. Offering men with some basic skills the chance to enhance them through practice and classes, and earn better pay was a selling point.
Now the history of the Blacksmith Rating and where it ended up today is a bit convoluted but we can start with the easy part. As a distinct Rate it was first established in 1879, with 1st and 2nd Class distinctions added in 1917. Coppersmith had existed on and off at the same time but was also reestablished in 1893. While in 1927 they were combined into Metalsmith. In the post WW2 drawdown the Ratings were modified again with the previously established Rating of Shipfitter and combined them in 1948. However 10 years later Shipfitter was brought back as the name for the combined Rate, while some duties like working the shop tools had been spun off to other Rates, and some duties had also worked with the new specific Damage Controlman Rate that stood up on 1948.
This holds until from 58-72 when the Navy decides it needs a new name to encompass the whole duties of the job of keeping the structure of the ship, and all its fittings sound and solid. Thus is born the Hull Maintenance Technician, or HT which is still the group doing most metal work, pipefitting, welding, etc. aboard. In fact it was such a catch all that from 1972-1988 Damage Controlman was folded into the HT rate too!
From the Rate's current official job description for reference:
HTs do the metal work necessary to keep all types of shipboard structures and surfaces in good condition. They also maintain shipboard plumbing and marine sanitation systems, repair small boats, operate and maintain ballast control systems, and manage the Quality Assurance Program.
The duties performed by HTs include: installing, maintaining and repairing valves, piping, plumbing system fittings and fixtures, and marine sanitation systems. Repairing decks, structures and hulls by welding, brazing, riveting and caulking; examining, testing welds and various shipboard structures; using radiological, ultrasonic and magnetic particle testing equipment. Fabricating with light and heavy gauge metal such as aluminum, stainless steel, sheet copper and brass, steel, sheet and corrugated iron; heat treating, hot and cold forming of metals; pipe cutting, threading and assembly; repairing installed ventilation ducting; repairing metal, wood and fiberglass boats; installing and repairing insulation and lagging; operating marine sanitation systems http://www.public.navy.mil/bupers-npc/enlisted/community/surface_engineering/pages/ht.aspx
So it isnt actually the modern Machinist Mate Rating that absorbed the Blacksmith's role, though obviously they are complimentary communities, but the MM's history is much more tied to the increase in the complexity and pervasiveness of technology in the Engineering Department and elsewhere. Not a general need for basic metal working.
As for where they might have been found before WW2, the answer greatly depends on the type of ship. Only ships large enough to have to have a suitable machine-shop would really need a Smith. Those too small like early subs and torpedo boats and destroyers could get by with shore facilities, some Fitters, Carpenters Mates, and the Rates already present in their Engineering Departments.
For reference though we can look at at least one vessel's crew list, that of the USS MAINE when she was sunk in 1893. Of her 375 man compliment she had 2 Blacksmiths and 1 Coppersmith aboard. http://www.spanamwar.com/mainecrw.htm
For some additional reading you might be interested in the below:
On the history of consolidation and spinning off of the modern HT and DC Rates: http://www.dcfpnavymil.org/DCCMs%20Corner/dcrate/dcrate.html
On the dates and lineages of all the Navy's old pre 1960 Rates: https://www.history.navy.mil/research/library/online-reading-room/title-list-alphabetically/c/enlisted-ratings-in-u-s-navy-1775-1969.html
The rates as they existed in the middle of WW2 and their basic duties: https://www.ibiblio.org/hyperwar/USN/ref/Ranks&Rates/index.html
And a post war 1946 edition of the basic instructional course book for Metalsmith: https://archive.org/details/Metalsmith3cAnd2c