2

I am searching for a best practice for my use case. I have setup a vServer with following partitions:

/dev/vda1            2048     1953791      975872   82  Linux Swap / Solaris
/dev/vda2   *     1953792    16775167     7410688   83  Linux
/dev/vda3        16775168   245366719   114295776   83  Linux

/dev/vda2 and /dev/vda3 are partitioned with ext4. On /dev/vda2 is the root partition. The vServer will be used mainly for Websites (nginx, mysql, php, ...).

My question is how to use the /dev/vda3partition?

One idea I have, is to mount it to e.g. /mnt/vda3, create different folders (home, var, opt, srv, ...) and symlink them to the according places in the root filesystem?

Or should I better create different partitions for the mentioned folders and mount it to the root partition? What are good values for the partition sizes then?

Or is there a best practice for this use case?

1 Answers1

2

The best practice is related to needs.

for example If I want to keep my user data and i consider those data are much valuable then i'll make my home on different partition.

here in your case, since you have only one empty partition to be assigned so you have to make a choose.

What's most important for you, the users data or the services data (mysql-nginx-...) , so either make your home on the third partition or assign it for /var according to your definition of how much this data is valuable.

For me, I prefer to assign /var.

So in simple words nobody can answers you what is the best in general, you have to choose what is most valuable for you to keep it save..

Maythux
  • 87,123