I am running ubuntu 14.04 LTS and sometimes I have to rescue data from failing storage. So my computer has a LSI sas- and a intel sata-controller - both are able to hotplug diskdrives.
When I plug in a storage for rescueing data from it, I don't want ubuntu to mount anything from this storage nor even to try it or access it in any way.
What I do, if i.e. a hdd spins up, the hardware recognize it and the kernel creates a dev-node for it, is to recover as much data as possible using
ddrescue. Sometimes I have to unplug the hdd if is getting to hot / fails to much, freezing it down in the freezer, plug it in again, get some more sectors and so on. It may be destructive and a bad impact if ubuntu tries to access the hdd and waste time reading bad sectors.
And what never (!) may happens is, that ubuntu mount an partition and writes anything (i.e. mount meta data) to it. The drive must be unchanged in any way.
So, how may I prevent ubuntu from automatically mounting / accessing plugged in storage?