The only type of anchor that will work in all bottom types is a deadweight anchor, HOWEVER, they need to be massive. When hooked on rock or coral, an anchor can have tremendous holding power but this is not something that can really be counted on except in very special bottoms. In all other situations, a decent approximation of the holding power of a deadweight anchor is its water weight. Using the ABYC recommendation for a storm anchor for a 30'er, you need a holding power of 1400lbs. This equates to something just shy of 3000 lbs of concrete. A 5 gallon bucket of concrete is around 90 lbs. If it gets lodged really well, it is likely to hold you through quite a blow but if it doesn't, it won't do anything and you will be dragging in any decent conditions.
Two techniques to help with this situation are a trip line and a spare anchor. Using a trip line hooked to the other end of the anchor greatly increases your chances of being able to retrieve the anchor when it is fouled. Some people rig one to a buoy but I would strongly urge you not to follow this practice. The buoy creates a hazard for everyone else and you run the risk of wrapping it up with your primary rode and pulling your anchor free at a bad time. A way to do it that doesn't have these problems is to run the line up your anchor rode with very weak pieces of twine attaching the two occasionally. This way if your anchor is fouled, you just pull on the other line. The reason for the second anchor is if you loose the first.