+1 for the canister. Ditto the Bearikade canister – especially the large Expedition model. JUst get one and stop worrying. They also make great tables, stove bases, and camp seats…….multi-functional, and therefore kosher for through-hikers and the UL crowd.
That said, you should know that:
1) Yosemite NP will be the most anal about canisters. They station rangers on the trail in Lyell Canyon specifically to check for proper permits and canisters. Once you see the collection of clueless, uncaring tourists they have to deal with all summer, you can understand why. The only bear boxes along the PCT and JMT within the park boundaries are located at each campsite in the campgrounds at Tuolumne Meadows, Little Yosemite Valley, and Yosemite Valley. There are none along the PCT from Tuolumne Mdws CG to the northern border of the park, and that's too far to hike in a day anyway.
2) Ursacks are not approved for Sequoia/Kings Canyon or Yosemite NPs. The SIBBG that used to test and approve canisters is no more. Each NP now decides what's acceptable. Check the web site for each NP through which you will pass for the latest requirements.
3) There are outdated maps on the internet showing canister-required zones as well as locations of individual bear boxes. Many of those back-country boxes have been removed. It used to be possible to hike box to box and legally avoid the canister, but there were a couple of sections north of the Rae Lakes where that distance exceeded what most hikers could cover in a day.
4) As of 2009, there were bear boxes at Charlotte Lake, at most of the Kearsarge Lakes, and in each campsite in the campgrounds at Horseshoe Meadows and Onion Valley. OV also had a series of bear boxes for anyone to use along the north side of their main parking lot. Store resupply boxes here at your own risk; the bear boxes aren't locked and anyone can access them. Boxes in the CGs are only for those using the CG sites.
5) You are not very likely to run into a ranger along the JMT during the time through-hikers are there. It's too early in the season, the bears are still hibernating, and the trail habits of through-hikers are not usually a source of concern to the rangers. It is unlikely that the seasonal backcountry ranger stations are manned yet.
6) Anything you plan to eat today does not have to be stored in the bear can, as long as you don't get separated from said food (don't drop your pack and walk off somewhere without taking the unsecured food with you). This readuces by one the number of days' food you have to cram into the canister each day.
7) Odor-proof sacks make great food and trash bags and go a long way towards keeping your food safe. Like Ursacks, they are NOT legal replacements for a bear canister. I've had Lyell Canyon black bears in Yosemite NP walk through my camp at night, right past 2 OP sacks lying on the ground, without knowing they were there. Obviously, being night, they couldn't see the sacks, but neither did they detect them by smell. I wouldn't trust that during daylight hours.