This topic is always good for lots of controversy - especially amongst PCT thru hikers.
There are several options for canisters. The most commonly used are made by Garcia. These weigh (ugh!) almost three pounds and hold about 6 days worth of food. They are a pain to put in your pack, but will fit in most packs. They cost about $80, or can be rented directly in Yosemite when you get your permit. I think they cost $3 per day, plus you will have to mail it back when you complete your hike. So, if you are out for 3 weeks, you are almost just as well off to buy one.
Another company is Bearikade. They make lighter, but much more expensive canisters.
There is a new company that has canisters that are made from lexan, same as nalgene bottles. I don’t recall their name. They are a bit lighter than the Garcias, and cost about the same.
The lightest option is to use an ursack, which is a really strong bag that bears can not chew thru. You tie the ursack to a tree at night. This is much lighter (5 ounces) and is of course collapsible, so much more convenient to pack. Lots of thru hikers use these - but they go thru the Sierras early. And of course if you “stealth” camp, away from commonly used camps, and don’t cook at your camp, you can reduce your chances of a bear encounter.
You can get info on all of these at the respective company web sites (google for them). You can also get info from others at the PCT-L mailing list.
Bear caninsters are “required” in some areas along the JMT, like above 9600’ in Yosemite.
Also, be aware that there are some camps that have bear boxes. These are large metal boxes (like the size of a small refridgerator laid on its side) hauled into the backcoutry that can be closed up at night. If you stay at one of those places you can put you food and pack inside, and rest easy. These are most common in the southern part of the trail, near Glen and Forrester Passes. Importantly, there are also bear boxes at Sunrise Camp and Little Yosemite Valley in Yosemite, which is where many people will spend their first or second nights.
The majority of JMT hikers use the Garcia cans, and spend a few minutes every day cursing and moaning about the annoyance of carrying a canister. But, they work and you can use them for a camp chair! I once had a bear play hockey with my canister for hours. Although my canister was all muddy in the morning, and rolled 75 feet or so from where I placed it, the bear got nary a morsel.
Don Wilson