I don't buy much in bulk. I buy beans by the pound and often have at least 2-3 pounds of 3-4 different varieties of bean (not counting lentils) on hand. Lentils are bought by 2 pounds, with at least one in back up. So I have around 10-20 pounds of beans on hand at any given time. They are stored in a box in my pantry. I but Basmati rice in 10 pound bags, stored in a tub in my pantry with a variety of nuts (bought in 5 pound bags), sugar (bought in 25 pound bags), flour (again 25 pound bags), raisins, I think these are 5 pounds too, and oats (in 3 pound bags). I also buy honey by the gallon and store what's not being used in the bucket.
My stock is completely rotated out within about 8 months for the most part. I repackage the larger quantities into smaller bags b/c I have my "working stash" in easy to use containers on the shelf. Each bag is enough to fill one of my containers. The rice stays in the original bag and I just get out what I need. All my bulk goods are stored in 2 plastic tubs stacked in my pantry and the beans are stored in a box in the pantry. I also have powdered milk on hand, it comes from a commodity program and we were getting ~3 pounds/month.
I have not had anything go bad on me yet, but it will depend on your local weather conditions and the item. Things like nuts don't last more than a month or so in my house so there is less a chance of them turning rancid. All in all a very tiny part of my tiny pantry is dedicated to bulk purchases. Now there are other things we do buy in quantity when they are on sale like pasta sauces, cake mixes, canned fruit, cereal, etc. Those take up most of the rest of the pantry. I don't stock anything we don't use. That helps cut the waste. I'm looking for our next personal lean time, not hedging against a future emergency. (Though I do usually have several days worth of water on hand too, we don't drink the tap water here our well tastes funny)