After taking apart all the old HDD's i ended up with a small piece that took me a little to figure out.
I stuck 5 volts on the wire and nothing happend. Well that's what seemed. Inside the copper sleeve is a small magnet. Tiny but it holds few grams. So I tried again, this time with the magnet holding a metal o-ring. And yes, with 5 volts it looses its magnetic capabilities. Amazing.
What a boring piece of kit.
Maybe suitable for a little spring operated hatch or a magnetic switch.