My pve-root directory is out of space. I am using Proxmox Virtual Environment 6.4-13 (no license/subscription).
I have tried to show my system settings and situation to save posts. Also, I realize this is one thread and I am asking multiple questions in one thread. My reasoning is these questions are all related to one another. If a Moderator or Admin would prefer I break this up, please let me know and I can do so.
I would prefer to use the GUI as much as possible for the solutions, as I tend to believe these types of edits last longer through upgrades and the likes. If there is a CLI only type of solution, I am game, just hesistant to make future problems and additional maintenance.
I read, "pve-root directory runs out of space: Why and What should I do?" and this is along the same lines as one of the questions I have, however, I seem to be using LVM-Thin, which negates part of the provided solution (unless I am mistaken).
Using the 'du' command I can track down where heavy files are located.
I cd into /var and repeat the du command, until I end up at /var/lib/vz .
Inside of the ./dump directory are a bunch of .zst and .log files. The .zst files are each a couple gigabytes (2.5GB average). Reading this forum, I can see these .zst files are backup files, and the associated logs are ... logs related to each backup. Great! Now for Question 1...
QUESTION 1
How do I set Proxmox VE to automatically purge older backups? I would like to keep 1 backup per day for the past 3 days, 1 backup per week for the past 4 weeks, then 1 backup per month for the past 2 months, and everything else can be removed. This would be a total of 9 backups per vm.
QUESTION 2
I can see, with both the GUI (Node :: Disks :: LVM-Thin) and command line (lsblk) that there is a pve-data location, and from that same GUI location I can see that it has 73+GB of data in it, but I cannot see what actually is in there. I go through various GUI menus trying to find references to this, and I have so far been unable to find any references. How can I access and use the pve-data LVM?
Question 2 may be a little moot with Question 3. If Q3 makes Q2 moot, it would spawn another thread where I will ask how to expand the pve-root size and shrink the pve-data size.
QUESTION 3
How can I move the backup location from pve-root to a separate mount point, for instance /mnt/archive ? This is related to the automatic purging and backup configurations from Question 1.
BONUS QUESTION
Can I live without the /var/lib/vz/template directory? It seems to be taking up a lot of space.
Thank you in advance!
I have tried to show my system settings and situation to save posts. Also, I realize this is one thread and I am asking multiple questions in one thread. My reasoning is these questions are all related to one another. If a Moderator or Admin would prefer I break this up, please let me know and I can do so.
I would prefer to use the GUI as much as possible for the solutions, as I tend to believe these types of edits last longer through upgrades and the likes. If there is a CLI only type of solution, I am game, just hesistant to make future problems and additional maintenance.
Code:
abc@xyz:/var/lib/vz# df -h
Filesystem Size Used Avail Use% Mounted on
udev 189G 0 189G 0% /dev
tmpfs 38G 434M 38G 2% /run
/dev/mapper/pve-root 94G 94G 0 100% /
tmpfs 189G 37M 189G 1% /dev/shm
tmpfs 5.0M 0 5.0M 0% /run/lock
tmpfs 189G 0 189G 0% /sys/fs/cgroup
/dev/fuse 30M 20K 30M 1% /etc/pve
tmpfs 38G 0 38G 0% /run/user/0
I read, "pve-root directory runs out of space: Why and What should I do?" and this is along the same lines as one of the questions I have, however, I seem to be using LVM-Thin, which negates part of the provided solution (unless I am mistaken).
Using the 'du' command I can track down where heavy files are located.
Code:
abc@xyz:/# du -h --max-depth=1
[...edited...]
92G ./var
[...edited...]
I cd into /var and repeat the du command, until I end up at /var/lib/vz .
Code:
abc@xyz:/var/lib/vz# du -h --max-depth=1
4.0K ./images
80G ./dump
12G ./template
91G .
Inside of the ./dump directory are a bunch of .zst and .log files. The .zst files are each a couple gigabytes (2.5GB average). Reading this forum, I can see these .zst files are backup files, and the associated logs are ... logs related to each backup. Great! Now for Question 1...
QUESTION 1
How do I set Proxmox VE to automatically purge older backups? I would like to keep 1 backup per day for the past 3 days, 1 backup per week for the past 4 weeks, then 1 backup per month for the past 2 months, and everything else can be removed. This would be a total of 9 backups per vm.
QUESTION 2
I can see, with both the GUI (Node :: Disks :: LVM-Thin) and command line (lsblk) that there is a pve-data location, and from that same GUI location I can see that it has 73+GB of data in it, but I cannot see what actually is in there. I go through various GUI menus trying to find references to this, and I have so far been unable to find any references. How can I access and use the pve-data LVM?
Code:
abc@xyz:/etc# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 3.3T 0 disk
├─sda1 8:1 0 1007K 0 part
├─sda2 8:2 0 512M 0 part
└─sda3 8:3 0 3.3T 0 part
├─pve-swap 253:0 0 8G 0 lvm [SWAP]
├─pve-root 253:1 0 96G 0 lvm /
├─pve-data_tmeta 253:2 0 15.8G 0 lvm
│ └─pve-data-tpool 253:4 0 3.1T 0 lvm
│ ├─pve-data 253:5 0 3.1T 0 lvm
│ ├─pve-vm--107--disk--0 253:6 0 20G 0 lvm
│ ├─pve-vm--102--disk--0 253:7 0 20G 0 lvm
│ ├─pve-vm--103--disk--0 253:8 0 16G 0 lvm
│ ├─pve-vm--100--disk--0 253:9 0 32G 0 lvm
│ ├─pve-vm--104--disk--0 253:10 0 32G 0 lvm
│ ├─pve-vm--105--disk--0 253:11 0 64G 0 lvm
│ └─pve-vm--106--disk--0 253:12 0 32G 0 lvm
└─pve-data_tdata 253:3 0 3.1T 0 lvm
└─pve-data-tpool 253:4 0 3.1T 0 lvm
├─pve-data 253:5 0 3.1T 0 lvm
├─pve-vm--107--disk--0 253:6 0 20G 0 lvm
├─pve-vm--102--disk--0 253:7 0 20G 0 lvm
├─pve-vm--103--disk--0 253:8 0 16G 0 lvm
├─pve-vm--100--disk--0 253:9 0 32G 0 lvm
├─pve-vm--104--disk--0 253:10 0 32G 0 lvm
├─pve-vm--105--disk--0 253:11 0 64G 0 lvm
└─pve-vm--106--disk--0 253:12 0 32G 0 lvm
sdb 8:16 0 3.3T 0 disk
└─sdb1 8:17 0 3.3T 0 part /mnt/archive
Question 2 may be a little moot with Question 3. If Q3 makes Q2 moot, it would spawn another thread where I will ask how to expand the pve-root size and shrink the pve-data size.
QUESTION 3
How can I move the backup location from pve-root to a separate mount point, for instance /mnt/archive ? This is related to the automatic purging and backup configurations from Question 1.
BONUS QUESTION
Can I live without the /var/lib/vz/template directory? It seems to be taking up a lot of space.
Thank you in advance!