When working with cloud infrastructure, it's not uncommon to encounter storage limitations. In Civo, the maximum attachable volume size is 1TB. However, there are scenarios where you might need more storage space. For example:
- Big data analytics: You're working with large datasets and need a centralized storage solution to process and analyze the data.
- Media storage: You're storing large media files, such as videos or high-resolution images, and need a robust storage system to manage them.
- Database storage: Your database is growing rapidly, and you need to expand your storage capacity to accommodate the increasing amount of data.
- Virtual machine storage: You're running multiple virtual machines and need a large storage volume to share files and data between them.
In such cases, creating a larger volume by combining multiple smaller volumes can be a cost-effective and efficient solution. This process is known as "volume aggregation" or "logical volume management." By combining four 1TB volumes, you can create a single 4TB volume that meets your storage needs.
Step 1: Verify your quota
To start, log in to your Civo Dashboard and:
- Navigate to the Civo Quotas page
- Check the available quota for "Disk" and "Volumes"
- Make sure you have enough quota to cover the 4TB volume you want to create
If not, you can request a quota increase.
Step 2: Create an instance
From the Civo Dashboard:
- Click on "Create Instance" and follow the wizard to create a new instance
- Choose the desired instance type, size, and configuration
- Wait for the instance to be created and started
Step 3: Create volumes
Continue and navigate to the Volumes page:
- Click on "Create Volume" and follow the wizard to create a new volume
- Choose the desired volume size (1TB) and type
- Repeat this process to create three more volumes.
Step 4: Attach volumes to instance
Navigate to the Instances page:
- Find the instance you created earlier and click on it
- Click on "Attach Volume" and select one of the volumes you created
- Repeat this process to attach the remaining three volumes
- Once all volumes are attached, click on "Reboot" to restart the instance.
Step 5: Configure logical volume manager (LVM)
Log in to your instance using SSH or a remote desktop connection and:
- Open a terminal and run the following command to add the physical volumes to LVM:
sudo pvcreate /dev/sda
- Repeat this command for each of the remaining volumes (
/dev/sdb
,/dev/sdc
,/dev/sdd
) - Run the following command to create a volume group:
sudo vgcreate my_vg /dev/sda /dev/sdb /dev/sdc /dev/sdd
- Run the following command to create a logical volume:
sudo lvcreate -l 100%VG -n my_lv my_vg
Step 6: Create file system and mount point
Run the following commands:
sudo mkfs.ext4 /dev/my_vg/my_lv
to create a file system on the logical volumesudo mkdir /mnt/my_mount
to create a mount pointUUID=$(sudo blkid -o value -s UUID /dev/mapper/my_vg-my_lv); echo "UUID=$UUID /mnt/my_mount ext4 defaults 0 2" | sudo tee -a /etc/fstab
to add the mount point to/etc/fstab
sudo mount -a
to mount the volume- Note that you may be asked to perform a
sudo systemctl daemon-reload
to enable systemd to recognise the changes to the file system table.
Step 7: Verify and use your new volume
That's it! You should now have a 4TB volume mounted to /mnt/my_mount
. You can verify this by running the following command: df -h
You can now use this volume to store your data. Remember to always back up your data and to follow best practices for managing your disk space.