Powering a Fan with Raspberry Pi
There are circuits where switching the high side of the load is necessary (for instance, when your load has a communication interface, or when you are reading back something from the load like the current).

In this case, however, you don't need any of these features. So I recommend a single transistor solution (cheaper):







simulate this circuit &ndash; Schematic created using CircuitLab

This circuit is fine if the current in the fan is up to let's say 50mA.

If the current is higher, you'll need to either use a "two stages transistor" (aka darlington) or use a power transistor which can handle more current (and in order to provide it the required base current you'll need a smaller transistor):







simulate this circuit

In the first case you can choose any darlington (I found the 2N6426); in the second the PNP should be one which can handle the required current.

You can also use a single nMOS:







simulate this circuit

In this case, you will have to choose a MOS transistor with a low Vgs-th; for instance the VN2222 or the 2N7000 can handle some hundreds of mA.

Final note: since the load can have inductive behaviors, please remember to add a freewheeling diode