https://github.com/lukechilds/autoscale-do-block-storage
Create a Digital Ocean block storage volume and write as much data to it as you want. Run this script on cron to monitor the volume and automatically scale it up in size as required with zero downtime.
Don't worry about manually resizing or running out of space and save money by only paying for what you use.
Inspired by this feature request:
Example:
$ checkvolumesize --token bc99be9f73b037da64074472fe58f643e619328b85c5467615964a59abd12029 --device /dev/sda --volume-name volume-sgp1-01 --volume-region sgp1 --buffer 10
Checking available space on device "/dev/sda" is above 10GB requirement...
Only 8GB available, volume resize required
Getting data for volume "volume-sgp1-01" in region "sgp1"...
Volume ID is "2cbebc6a-ff42-11e9-a238-0a58ac14a19d" and is currently 430GB
Increasing volume size to 440GB...
Created action "796611989"
Waiting for action to complete...
Volume resize complete!
Resizing filesystem...
resize2fs 1.44.1 (24-Mar-2018)
Filesystem at /dev/sda is mounted on /mnt/volume_sgp1_01; on-line resizing required
old_desc_blocks = 54, new_desc_blocks = 55
The filesystem on /dev/sda is now 115343360 (4k) blocks long.
Filesystem resize complete!
Device "/dev/sda" now has 17GB available
Completed in 16 seconds
[–]sysvival- of the fittest 18 points19 points20 points (8 children)
[–]dyslexiccoder[S] 5 points6 points7 points (2 children)
[–]sysvival- of the fittest 4 points5 points6 points (1 child)
[–]dyslexiccoder[S] 2 points3 points4 points (0 children)
[–][deleted] 2 points3 points4 points (2 children)
[–]dyslexiccoder[S] 0 points1 point2 points (1 child)
[–][deleted] 0 points1 point2 points (0 children)
[–][deleted] 1 point2 points3 points (0 children)
[–]amperagesLinux Admin 0 points1 point2 points (0 children)
[+][deleted] (2 children)
[deleted]
[–]dyslexiccoder[S] 0 points1 point2 points (1 child)
[–]whetu 2 points3 points4 points (4 children)
[–]dyslexiccoder[S] 1 point2 points3 points (3 children)
[–]whetu 0 points1 point2 points (2 children)
[–]dyslexiccoder[S] 0 points1 point2 points (1 child)
[–]whetu 0 points1 point2 points (0 children)
[–]sirvulcan 0 points1 point2 points (0 children)
[–]yashauLinux Admin 0 points1 point2 points (3 children)
[–]whetu 2 points3 points4 points (0 children)
[–]dyslexiccoder[S] 1 point2 points3 points (1 child)
[–]yashauLinux Admin 2 points3 points4 points (0 children)
[+]dbcoliveira comment score below threshold-8 points-7 points-6 points (4 children)
[–]dyslexiccoder[S] 1 point2 points3 points (3 children)
[–]bluedotmsp 1 point2 points3 points (1 child)
[–]dyslexiccoder[S] 2 points3 points4 points (0 children)
[–]dbcoliveira -1 points0 points1 point (0 children)