how to increase / directory size using block volume storage

Posted August 15, 2020 736 views
Linux BasicsLinux Commands

basically my VPS has 25GB storage under root / and 100GB storage mounted under /mnt/volumenyc301

What I want is, total 125GB storage accessible under root / how can I do that?

These answers are provided by our Community. If you find them useful, show some love by clicking the heart. If you run into issues leave a comment, or add your own answer to help others.

Submit an Answer
1 answer

Hi there @AnoopKakkur,

I wouldn’t recommend mounting your root partition on the block storage.

Instead, I would suggest mounting your working directory to the block storage, for example, if you are storing your project at /var/www/html mount that specific folder. You can follow the steps on how to do that here:


  • @bobbyiliev Thankyou… I have one more doubt, about my DB size. my DB is in the same droplet and that DB too need more space. In such case how can i manage. That’s why i think about assigning the volume storage spacr to the Root Directory . Presently i dont have a budget to procure a managed Database. Can u help me on this.

    Am using Mysql.

    • Hello, you can even resize your Droplet to next possible size, if it is under your budget.

      Please see our tutorial on how to resize Droplets:

      Please note that once you resize to a larger disk, you will no longer be able to resize to a smaller plan. This is because there will be a disk mismatch and we do not currently support shrinking a virtual server’s disk.

      If you think, the MySQL is consuming more memory or CPU, you can follow the below steps:

      It does look beneficial to optimize your MySQL instance. MySQL configuration is a good place to start. This can be complicated, but, there are some easier methods that can be taken to get pretty good results. There is a binary available in the package manager called mysqltuner.

      You can install it using a command such as: For Ubuntu/Debian:sudo apt-get install mysqltunerFor CentOS/Fedora:sudo yum install mysqltuner

      For more information concerning using mysqltuner, you will want to read into:

      This can be a bit involved, and not everything may be suited for your end-goals, so you might want to speak with a MySQL developer or admin regarding changes.

      Another area to look into would be any slow queries running via MySQL. To find these, you would want to enable the MySQL slow query log.

      You can do this by adding the following line(s) to your /etc/my.cnf file:

      [mysqld]slow-query-log = 1slow-query-log-file = /var/log/mysql-slow.loglongquerytime = 2log-queries-not-using-indexes

      After doing that, restart you will need to restart your MySQL service. By doing that, it tells MySQL to log all queries taking longer than 2 seconds to /var/log/mysql-slow.log.

      It also tells it to log all queries running without indexes. This way, you can find the problematic queries, and work towards improving those. A good resourceon optimizingqueriesis:

      Usually, by going through those two areas you can make MySQL run more efficiently. It is also generally recommended you review your tables and queries to optimize them as much as is possible.

      Some links to assist with that can be found at:

      Sri Charan