Submitted by allitsk on Sat, 10/11/2014 - 05:15
According to this forum thread (https://www.virtualmin.com/node/18623) and my research in config files is no way to setup specific folder to saving history files. Actually Cloudmin is saving these files in /etc/webmin/server-manager/history, but these files is logs files of virtual machines. It's really necessary to change default history folder to /var (as many other software), for example to /var/webmin/server-manager/history.
I installed whole root filesystem to flash drive (except /var, /tmp...) and this permanent writing to /etc is destroying my drive.
Status:
Active
Comments
Submitted by allitsk on Sat, 10/11/2014 - 05:17 Comment #1
My suggestion: in /usr/share/webmin/server-manager/server-manager-lib.pl change: $historic_info_dir = "$module_config_directory/history"; to: $historic_info_dir = "$ENV{'WEBMIN_VAR'}/$module_name/history";
Submitted by allitsk on Sat, 10/11/2014 - 05:20 Comment #2
And it would be very useful to check all cloudmin/webmin destinations (probably stored in server-manager-lib.pl) and move some files and folders to /tmp or /var/webmin.
Submitted by JamieCameron on Sat, 10/11/2014 - 12:21 Comment #3
The best way of making this move would be to just move
/etc/webmin/server-manager/history
to/var/webmin/history
, and then create a symbolic link from the old to the new location. This will work better than your code change, as it won't be over-ridden if Cloudmin is upgraded.Submitted by allitsk on Sat, 10/11/2014 - 12:35 Comment #4
You're right, I did it before I wrote about this bug. But I would like to see this change ib official Cloudmin releases. Can You commit this?
Submitted by JamieCameron on Sat, 10/11/2014 - 12:44 Comment #5
I'd rather not change this - historically Webmin has used /var/ for logs and temp files that can be deleted, and /etc for permanent records. But you can change it on your system as suggested above if necessary.
Submitted by allitsk on Sat, 10/11/2014 - 16:53 Comment #6
I think that historical data are like logs and can be deleted without any damage. I'd recommend to think about it.
Thank You.
Submitted by JamieCameron on Sat, 10/11/2014 - 19:43 Comment #7
They are more than logs though - they are used to render the graphs of CPU/RAM/disk usage over time in Cloudmin.
Can you tell me more about how this is harming the SSD in your system?
Submitted by allitsk on Sun, 10/12/2014 - 03:58 Comment #8
According to my knowledge all used services use /var to save any variable data and /etc to store configuration only (can be modified by users only). /var is used by mysql to save all databases, bind to save all DNS records, ZABBIX monitoring system to gather all data from servers and etc. So Cloudmin history/graphs data should be stored in /var.
I don't use SSD, but simple USB flash drive to create something like cheap read-only hypervisor. So frequent writing to root is harming flash drive and destroy it in a few months.