Sunday, May 19, 2024
 Popular · Latest · Hot · Upcoming
3
rated 0 times [  3] [ 0]  / answers: 1 / hits: 4013  / 3 Years ago, wed, november 3, 2021, 9:06:45

I will be using a Ubuntu server install as a server for a MySQL database. Is there any benefit to having /var in a separate partition from the root file system?


More From » server

 Answers
1

I always have /var on a separate partition and never had problems with it. Doing it this way prevents a misbehaving application (like your database server, but also log files in /var/log) from eating up all the space on the disk. Of course it also works the other way around. If someone (or some program) decides to write enormous files in /tmp this would affect your database as well if /tmp and /var reside on the same partition.



If you plan on putting parts of your directory hierarchy on different partitions I would suggest to take a look at LVM (the Logical Volume Manager). LVM allows you to dynamically extend your 'partitions' (called Logical Volumes or LVs in LVM parlance). This means that if your LV containing /var/ is almost full you can extend it, grow the file system on the fly and continue without any interruption to your database.


[#43891] Thursday, November 4, 2021, 3 Years  [reply] [flag answer]
Only authorized users can answer the question. Please sign in first, or register a free account.
ettorina

Total Points: 439
Total Questions: 99
Total Answers: 131

Location: Vanuatu
Member since Wed, Oct 14, 2020
4 Years ago
;