My plan has 10GB of storage. How can I see precisely how much I am using?
Platform.sh DevRel
I know that some is used by my services, and some is used by the disk directive in .platform.app.yaml. Is there a way to see how much is being used from the 10GB total that my project has?
0
Comments
SSH into a project environment
If you are not in the project directory where Platform.sh is set as remote (
platform project:set-remote) follow the CLI instructions to access the project you want.Check the disk storage of the project
Calculate
This is a small project on a “Medium” Platform.sh plan, which comes with 5 GB of storage per environment. Not including the last line of output, the two
/dev/mapper/*are the parts of the environment that are counted against this cap. The first line is dictated by the amount of disk allocated to mounts in
.platform.app.yaml. In this case0.059GB of the available storage is currently being used.Your plan has a maximum amount of storage you can get with
platform project:info subscription.storagethe answer is in MB.You distribute that total storage between your apps and your services by specifying the
diskkey of your.yamlfiles.If like me you like bash one liners, here you go :
find . -type f -name '.platform.app.yaml' -o -name 'services.yaml' |xargs grep disk:Executed at the root of your project will give how you distributed your storage.
.
You can redistribute storage between your different apps and services, and you can upsize the size of the global storage.
Now, if you want to know for a specific app how much of the allocated is still free… you can use the CLI to get the “real usage” of each app. Short and sweet:
platform mount:sizeWhich directly gives you :
Lastly, you really want to also to add yourself a notification if ever you are running low on space:
platform integration:add --type="health.email" --recipients="myemail@example.com"will do the trick.Similar to what @oripekelman said
platform db:sizecan give you your database storage, with the caveat it may not be 100% accuratePlease sign in to leave a comment.