VPS with a 1 TB disk: what to check so that the terabyte is real and useful
A terabyte on a virtual server is needed when there is already more data than fits into an ordinary plan: a team file store, a project archive, backups of several servers, a large database with history, a media library for a website. This selection gathers plans with a disk of 1 TB or more of any type, and the type is the main question here. A terabyte on HDD and a terabyte on NVMe are different products for different tasks, even though they look similar in the table.
A terabyte on HDD, SSD or NVMe
- HDD is the cheapest terabyte. It suits data that is written and read as large files: backups, archives, video. Too slow for a database or a website. More in the Storage VPS selection.
- SATA SSD is a compromise: random operations are tens of times faster than on HDD, and the price per gigabyte is higher. Good for a file cloud with active sync and medium-sized databases.
- NVMe is for large databases, search indexes and analytics, where volume goes together with intensive work. Why such speed is needed is explained on the VPS on NVMe page.
A common mistake is to take a terabyte of NVMe for an archive that is opened once a month, or a terabyte of HDD for a database that grows with the project. First decide what share of the data is hot. Often a combination is more cost-effective: a fast disk for the system and working data plus a large slow one for everything else.
One disk or several, and how much space will be left
The terabyte in a plan is not always a single partition. Some setups put the system on a small SSD and attach the large volume as a second disk that you have to partition and mount yourself. This is convenient: data is separated from the system, and reinstalling the OS won't affect it. Clarify the setup before buying so that an empty /dev/vdb doesn't come as a surprise.
The visible capacity will be smaller than the figure in the plan. The host counts in decimal terabytes, while Linux shows binary units: 1 TB turns into roughly 931 GiB. The ext4 file system reserves another 5% for root by default, which on a terabyte disk is about 46 GB. For a data disk the reserve can be reduced with tune2fs -m 1. If you plan to store millions of small files, check the inode headroom in advance with df -i or choose XFS.
How to check that the space is really allocated
Virtual disks are usually created "thin": space on the array is taken up as data is written. This is normal, but on an overloaded node the shared storage may run out before your disk does. Checks for the first days of the rental:
lsblkanddf -h: the size of disks and partitions matches the plan.- Writing a large volume:
fio --name=fill --rw=write --bs=1M --size=200G --direct=1. Speed should stay steady across the whole volume rather than drop after the first gigabytes. - Repeat a short test in the evening, when neighbours on the node are more active.
A 200 GB write test takes time and loads the shared array, so run it once and delete the file after the check. For regular monitoring, iostat -x 1 during normal operation is enough: a high await and disk utilisation near 100% with a modest number of operations mean the array is overloaded.
File system and data layout
On a terabyte disk the choice of file system and partitioning affects convenience more than on a small one. LVM lets you later add a second disk to the same volume or take a local snapshot before an upgrade. XFS copes well with large files and large numbers of directories; ext4 is more familiar and easier to recover. If the disk will hold both a database and an archive, put them on separate partitions: a filling archive should not stop the database for lack of space. Set up an alert when the disk is 80–85% full so that you don't learn about the problem from a crashed service.
How long moving a terabyte takes
Capacity matters not only for storage but also for migration. A terabyte over a 100 Mbit/s link copies in about a day under ideal conditions, over 1 Gbit/s in a little over two hours, and in practice longer because of the disks and many small files. If data will often come and go, look at plans with a 1 Gbit/s port and check the traffic allowance: the first full upload of a terabyte can exhaust the monthly limit.
And don't forget a copy of the terabyte itself. The more data on one server, the more painful its loss, and the host's RAID protects only against the failure of a single disk. For a full recovery you need a second copy elsewhere, and it will need at least as much space.