0

I am using a ubuntu vm on microsoft azure. I am facing a problem with creating new files and data being stored in database. It is throwing an error which says vm out of space. When i run df -h --total output in vm is

enter image description here

/dev/sdd1 is where all my data is and I am on working on. /dev/sdc1 has a lot of space. How can I make use of that space?

Thanks

3
  • Isn't a problem with /dev/sda1 instead of /dev/sdd1? If you can change mounting points, then mount /dev/sdc1 to a folder where you need to store your files or database Commented Jan 22, 2020 at 7:35
  • can you help me with how to change the mounting points of a folder? Commented Jan 22, 2020 at 7:38
  • I guess that it's mounted during boot then it could be done by editing /etc/fstab, but the folder which will be new mounting point must be empty. Commented Jan 22, 2020 at 7:50

1 Answer 1

0

/dev/sda1 is very important for your OS, so first you have to move some of those files occupying space to /mnt/datadrive or /home/amitbhanja/BertLabs1. You need to figure out what those files are using du.

# du -a / | sort -n 

The last lines has the largest files and directories. Or better to use ncdu and check this post for more detailed information.

If it turned out to be the database e.g which is on /var/lib/mysql, you can configure mysql data directory datadir or symlink it to the new location. You need to be careful and always take backups. Moving your own files are preferred to move system files, especially for unexperienced users. Issues could arise if your vm is using AppArmor e.g.

2
  • I am trying to figure out the files in /dev/sda1 using du The output of du is printing several 1000s of lines in the console. Commented Jan 22, 2020 at 7:59
  • @cvg: I added an example in the answer to make it easier for you Commented Jan 22, 2020 at 8:21

You must log in to answer this question.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.