Mounting /var/log to a different drive breaks GUI for that server

atjb

New Member
Dec 21, 2022
5
1
3
Hi Team,

I'm a low-intermediate Linux/Proxmox user, so please don't bite, and please feel free to send me scurrying off to read more - I'm here to learn.

I'm running on very budget hardware, so would like to log to a different drive to avoid SD card burnout. I am aware that Proxmox is not recommended to be run off USB/SD cards, but would like to do so anyway in my non-critical environment, as this allows me to experiment and learn with the limited hardware I have available.

I believe that Proxmox logs to /var/logs and /etc/pve/.clusterlog

I have created an ext4 partition at /dev/sdd1. Running 'blkid /dev/sdd1 gives:

UUID="ea7873b6-82e7-4245-b7cc-10bc120cdd0f" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="f3ae4ca1-c581-1f4c-a900-e872f5fb1f69"

I believe that I should be able to simply configure Proxmox to write the /var/log directory to my /dev/sdd1 drive by adding a line to /etc/fstab as follows:

UUID="ea7873b6-82e7-4245-b7cc-10bc120cdd0f" /var/log/ ext4 defaults 0 0

followed by a reboot.

If I do so, I can still access the server via SSH, and it appears in the GUI, but no data is displayed and no options are available in the GUI.

Commenting out the line in my fstab fixed things instantly upon reboot.

I would greatly appreciate somebody explaining what I've done wrong, and what I should have done instead. Thanks!
 
Hi Team,

I'm a low-intermediate Linux/Proxmox user, so please don't bite, and please feel free to send me scurrying off to read more - I'm here to learn.

I'm running on very budget hardware, so would like to log to a different drive to avoid SD card burnout. I am aware that Proxmox is not recommended to be run off USB/SD cards, but would like to do so anyway in my non-critical environment, as this allows me to experiment and learn with the limited hardware I have available.

I believe that Proxmox logs to /var/logs and /etc/pve/.clusterlog

I have created an ext4 partition at /dev/sdd1. Running 'blkid /dev/sdd1 gives:

UUID="ea7873b6-82e7-4245-b7cc-10bc120cdd0f" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="f3ae4ca1-c581-1f4c-a900-e872f5fb1f69"

I believe that I should be able to simply configure Proxmox to write the /var/log directory to my /dev/sdd1 drive by adding a line to /etc/fstab as follows:

UUID="ea7873b6-82e7-4245-b7cc-10bc120cdd0f" /var/log/ ext4 defaults 0 0

followed by a reboot.

If I do so, I can still access the server via SSH, and it appears in the GUI, but no data is displayed and no options are available in the GUI.

Commenting out the line in my fstab fixed things instantly upon reboot.

I would greatly appreciate somebody explaining what I've done wrong, and what I should have done instead. Thanks!

It's caused by missing access rights in the mounted filesystem, the following resolves the problem (at your own risk, running from an SD and/or changing /var/log is not recommended indeed):
Code:
chmod 777 /var/log/pveproxy
chmod 777 /var/log/pveproxy/*
 
Thanks for your response. I tried your steps, but unfortunately I ran into the same symptoms.

I ended up googling further, and editing /etc/rsyslog.conf and pointing anything that said /var/log to my second disk. I've done this on 1/3 nodes, and it seems fine so far. I intend to test with this one node (mostly to save myself the inconvenience of having to rebuild 3 nodes if I've done something terrible - this is 100% me learning) and go for these changes across all nodes if nothing explodes.

I'd love any experienced opinions as to whether or not this is a valid approach however!
 
HI @atjb any news on how is going? Could you better elaborate steps to achieve this? You mention a second disk, Does it mean you pointed to a specific partition (ie /dev/sdb1).
 
Hey - I'm afraid that I abandoned this, and simply used a proper disk for the OS + logging. I did get the setup running for a while, but a few rebuilds later I'm no longer taking this approach.

It would be great to look into this more, as this would allow for more experimentation with SFF PCs - freeing up disk slots to be used with CEPH etc.

Please do write up anything that you do find out!
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!