I have laptop which should have (according to seller) 1000 GB. That is 1000 000 000 000 bytes. It has even slightly bigger capacity according to fdisk - exactly 1000204886016 bytes.
That is aproximately 0.2 GB more than it should have!?
That’s normal. Numbers like 1,000 or even 1,024 are only “nice, round” in specific scenarios like to us and computer software. When you manufacture a drive, it is extremely difficult to create it to be an exact number like that, especially for any sort of round media like hard-drives or DVDs because you are dealing with circles and of course when you are dealing with circles, thanks to π, you will almost never have integers, let alone “round numbers”.
As such, when you create a storage device, it will be rounded up to the nearest “block”. Whatever a block is depends on numerous factors and can cause it to have a little or even a lot of extra space (though always insignificant enough to not bother printing the excess all over the box in big, star-shaped stickers like “20% more space for FREE!!!”.
Even with non-circular media like flash-drives and memory-cards (as well as hard-drives of course), they still make sure to include a bunch of extra sectors for use as backups so that when a sector dies, the drive’s firmware can remap it to one of the “spares”. Whether these spares are visible to the user as “extra” space or not depends on the manufacturer (as cpast said, it can vary even from lot to lot of the same model). Some choose to let you see and use them, assuming that when a sector goes bad, it gets marked and the customer is not unhappy since they are still getting the full (and slightly more) capacity they paid for. Others hide the spare sectors and have the drive transparently remap on the fly so that the user never even knows there’s anything wrong. This is preferable (and most common these days) because it puts the onus of wear-leveling on the drive instead of on the OS or file-system. Even in this scenario, since there will usually be more spare sectors than needed (by their failure-calculation algorithms), they usually make the excess visible as well.
Will it have the same size? If so why does the 1000GB disks have exactly this capacity. In oposite [sic] case is there a way to find out if disk is big enough before buying?
There’s no way to know what the exact (down-to-the-byte/sector) capacity will be because it varies and is not part of the drive’s properties; it is a sort of “bonus”, so some will have more, others will have less.
Now I want to buy a harddisk. I don't want to spend more money by buying bigger disk than I need.
Of course, especially since getting a drive that’s bigger than 1TB would mean getting one that’s at least 1.5TB (there aren’t many, if any fine-grained divisions in between).
So it is enough to buy another 1000GB HDD?
It depends on how full the source drive is and the method of backing up. If you use normal backup programs (either file-level copying or drive-imaging), you can copy the source without issue if it contains no more than the capacity of the destination drive. If you clone it like you intend to do, then things could get tricky.
Some cloning tools are designed to account for variations in source and destination drives and have ways of dealing with it (e.g., offering a few choices and letting you decide which you want).
If you want to use something simple like
dd, then it will be a little more trouble, but still fairly easy to handle:
- Get a (good) 1000GB drive, and find out the exact capacity to find the limit/line.
- Make sure that the amount of used space on the old drive is no more than the total size of the new drive.
- Do a defrag to move all the data the low-numbered sectors.
- Of course this won’t guarantee that there’s no data over the line point because of gaps due to fragmentation. Therefore, you’ll want to use a disk-map-viewer to see if you have any files that are “out of bounds” and shuffle things around (e.g., delete or move to a spare drive) until you have nothing over the line.
- Use the
count parameter of
dd to limit the number of sectors to be copied to avoid going over.
- If necessary, copy back or re-download or whatever, any files that you removed from the old drive in step 3b.