Buy seeds or transplants from a reliable seed company or garden center after reading the descriptions to see which are good storage types. You can also grow onions (Allium) from sets, but the onions that develop from sets will develop seed heads and will not store as well as those grown from seeds or transplants. Plant the onions where they'll get full sun and grow in well-drained soil. Heavy soils or poorly drained soils could cause the onions to rot. 'Southport Red Globe' is an old standby red type that stores well. 'Stuttgarter' is a yellow type for storage. But be sure you have the right variety for your climate. Onions are day-length dependent for bulb formation. Types for southern climates may not bulb up in the North, just as northern types won't grow very large in southern areas. By late summer, when the onion bulbs have developed to full size, stop watering the plants. Doing this lets the green tops dry and encourages the bulbs to go dormant. Then you can successfully store them for long periods. When the onions are dry, store them in mesh bags and hang them in a cool, dry, dark place. They'll store longest at temperatures just above freezing. Prevent them from freezing, however, because frozen onions will turn to mush. Inspect them regularly for signs of sprouts. Use sprouting bulbs as soon as possible.