Understanding Linux Partitions with Amazon EC2

I am relatively new to Linux. In one of our projects, we use an instance of Amazon EC2 to process some files. We upload files to the S3 server after processing. EC2 instance loaded using existing AMI

Recently, I got an error and there was no space left on the disk, so the file processing was stopped. I cleaned up some old files and processing continued.

Now when I browse the available space using df -h

Filesystem Size Used Avail Use% Mounted on /dev/xvda1 9.9G 5.7G 3.7G 61% / none 3.7G 0 3.7G 0% /dev/shm /dev/xvdb 414G 199M 393G 1% /mnt /dev/xvdc 414G 199M 393G 1% /data 

I see that my files only work / dev / xvda 1.

I have the following queries

  • What is the use of other partitions when I see that my files only work with / dev / xvda 1
  • It looks like we are only using 10 GB of space, while others are lost. How can I use another space? Can I move some disk space to / dev / xvda 1 or directly store files in other areas?
+6
source share
1 answer

As you can see from the output of df -h , there are two large sections on /mnt and /data , respectively. I suggest you use these sections while processing files in one of these directories. If for some reason you cannot move where processing occurs, you can remount the partitions in the appropriate place.

If, for example, your files are processed in the /var/mydir and you cannot change it, follow these steps (with root privileges):

 umount /mnt mount /dev/xvdb /var/mydir 

You can also use another section if you want.

+5
source

Source: https://habr.com/ru/post/922211/


All Articles