Since I work with computers a lot, I know that there are plenty more things you could reasonably ask about a hard drive - and that counting gigabytes is a trifle unambitious in these times of multi-terabyte drives.
As other answers have noted, you should ask "how big" rather than "how many GB" or "what GB", though of those two, "how many gigabytes" is more correct. But what I would do instead is to produce a list (or display) of relevant products in stock, and invite the customer to choose between the possibilities.
Such a list is likely to contain external drives for the desktop or for portable use, internal mechanical drives in 3.5" size for desktop computers or 2.5" for laptops, and several ranges of SSDs (solid-state drives) in 2.5" and M.2 formats. Each will be in a range of capacities - some of the smaller SSDs might be 120GB, while 3.5" HDDs go up to 8TB now (that's 8000GB).
At this point, a tech-savvy customer will know what he wants and will immediately choose something, or ask pertinent questions of his own. He'll appreciate your efficiency.
But a less assured customer might need help choosing, and that's when you start asking about their budget and intended usage. They probably won't have a specific capacity in mind!
For basic uses like "homework" or "email", you would select a product near the bottom of the price range that fits their computer. For "video editing" you should go straight for the 8TB monsters. For "gaming" you could recommend a combination of an SSD (for performance) and HDD (for large games), using their budget as a guide.
Example conversation:
Cust: I need a hard drive.
Shop: We've got lots of hard drives. What kind do you need?
Cust: What's the biggest one you've got?
Shop: We have an eight-terabyte model. Here it is.
Cust: Perfect! I'll take three.
@MaulikV I personally would say "five gigabyte", not "five gee bee". Also, 5GB is very small for a hard drive these days - five terabytes would be more like it. – Chromatix – 2018-04-08T18:45:20.117
@Chromatix while asking for a USB or harddrive, I've never heard anyone pronouncing it 'gigabyte!' It's always 'jee bee.' – Maulik V – 2018-04-09T04:43:45.573
That must be from people who don't actually know what GB stands for, only that bigger numbers are better. Also, pet peeve, you probably mean a "USB flash drive" rather than just "USB" - the latter refers to the connection technology, not the storage device. – Chromatix – 2018-04-09T16:55:46.740
3Your question should not include the abbreviation "GB", but rather write it out as you would say it. Singular or plural makes a difference in the interpretation. – user3169 – 2014-11-29T06:00:36.030
@user3169 not exactly. I want a 5 GB hard disk! :) No plural The GB there serves as an adjective. – Maulik V – 2014-11-29T11:53:13.877
1GB is never an adjective. – snailplane – 2014-11-29T15:16:53.187
1@MaulikV True, but since this is spoken you would not say "gee-bee". So it should be written out. – user3169 – 2014-11-29T20:08:49.253
@user3169 come on. IT IS spoken gee bee. And pronounced or spoken it's gb – Maulik V – 2014-11-30T07:11:18.923
@snailboat sorry, I disagree. In 'a 5-gb hard drive' it is. – Maulik V – 2014-11-30T07:15:39.763
No, it's the head of an attributive nominal modifier. Calling it an adjective is incoherent. – snailplane – 2014-11-30T07:23:04.957