A lot is expected of your rear derailleur. You want it to be a precise, instantshifting piece of kit even under pressure in a dirty environment. You need to be able to rely on it in all conditions and that’s why it pays to nurture your poor toiling derailleur.
One of the most common problems to be routinely ignored is the alignment of the rear derailleur hanger (the part on the frame that the derailleur bolts onto). The gears are designed to work when the two jockey wheels hang vertically underneath the sprockets. This vertical alignment is the first casualty of a crash, but it’s often overlooked – you get up and brush yourself off, look at your bike and, if everything looks okay, you ride away. Bad things can happen next. If you’ve crashed and bent your derailleur inwards, the gears may still work, but everything has shipped inboard a little.
Next time you stamp uphill in a low gear, you click the lever to find a bigger sprocket, but instead you dump the chain off the inside of the rear cassette, stuffing it into the back wheel just as you haul on the pedals. Likely results include falling off and hurting yourself – and expensive damage to your back wheel.
On a less drastic level, the shifting works best when the sprockets are aligned with the jockey wheels. The chain isn’t being twisted as it runs off the sprocket; and the jockey wheels move in the direction they were designed to, rather than being forced up into the sprockets as they move across the cassette, which is what happens if the hanger is bent.
Hangers need to be flat and vertical to sprockets
Look at the derailleur from behind. This way, you get the clearest view of whether or not the chain is running in one of the middle gears. The sprocket, chain and jockey wheel should make a vertical line. One of the most common problems is when the hanger is bent so that the bottom jockey wheel hangs nearer the wheel, as in the picture below.
It’s not unusual for the hanger or the derailleur to be twisted rather than (or as well as!) bent, so that as you look straight at the sprocket, you can see the surface of the jockey wheels instead of just the edge. For precise shifting, the jockeys need to be flat and vertical to the sprockets. Because this is a common problem, all decent aluminium frames feature a replaceable hanger.
There are as many different types of hanger as there are makes of bike, and, even within a make and model, the hanger you need might depend on the year the bike was made. To make sure you get the right one, take the old one to your local bike shop for comparison. They are almost never interchangeable.
If you don’t have a replaceable hanger, the frame will have to be bent back. You can do it yourself if you are careful, but if you are unsure, this is a job I recommend you take to your bike shop. You usually need to have snapped off a couple of hangers before you know how far you can go – an expensive experiment. If the bend is bad, it will be weaker after you have straightened it.
Leave the wheel in the dropout to support the frame. You have two options for bending back the hanger. The first is to clamp a large adjustable spanner onto the hanger – you need about 30cm (12 inches) of leverage to do the job – and to ease the hanger back into place. It is very important to bend in one movement – the last thing you want to do is work the hanger backward and forward to find the perfect place. It will snap off.
The other option, which is trickier but safer, is to screw a rear wheel axle into the thread on the hanger. They are the same size, an M10 thread. We’ve had plenty of success bolting a whole wheel onto the thread, and using it for leverage. It’s easy to see when you’ve got the angle right because the two wheels – your own, and the one bolted into the derailleur hanger – are parallel.
Some rear derailleurs come with a breakaway bolt. This means that the bolt that fixes the derailleur to the frame is designed to be slightly weaker than the hanger and the derailleur. In the event of a crash, instead of your hanger breaking or bending, your derailleur breaks off. Replacement bolts are still available, and are either push-fit or circlipped in, depending on the model.
Source : BIKE MAINTENANCE TIPS, TRICKS & TECHNIQUES
See also bike maintenance tips, tricks and techniques “Servicing the rear derailleur”