Mounting problems on Serverboot

Stumpy

Member
Jan 2, 2020
12
2
23
36
hi

i am new to proxmox and got 2 problems.

i made a backup dataset on my zfs tank, where i wanted to store my lxc/vm backups.
created the dataset "backup" in my tank.
added it in datacenter -> storage -> add -> directory ->ID: Backup ; directory: /tank/backup ; contains : VZDump backup file
this works fine until i reboot the server. the server writes in the directory /tank/backup before the zfs is even mounted, which causes the mountprocess to crash (directory /tank not empty).
how can i fix this so i can still make my backups on /tank/backups, but dont have to activate/deactivate the directory on reboot?



another problem with my zfs is that it mounts to slow for my lxc container to start properly.
most of my lxc use my /tank as a mp. when i start the server, the zfs is not yet mounted, when the lxc try to start, causing in an error and stopping the container boot.
right now i "fixed" it by starting another unneeded lxc and activated a bootdelay of 30 secs.
is there a way to tell my lxc/vm to wait till the "tank" is mounted and start to boot then?
can i tell my windows vm only to boot, if another lxc is properly booted?

i am using Proxmox 6.1-5

greetings
stumpy
 
here is the cfg

Code:
dir: local
        path /var/lib/vz
        content iso,vztmpl,backup

lvmthin: local-lvm
        thinpool data
        vgname pve
        content rootdir,images

zfspool: tank
        pool tank
        content images,rootdir
        mountpoint /tank
        nodes StumpysProxi

zfspool: scratch
        pool scratch
        content images,rootdir
        mountpoint /scratch
        nodes StumpysProxi

lvmthin: data2
        thinpool data2
        vgname data2
        content rootdir,images
        nodes StumpysProxi

lvmthin: data1
        thinpool data1
        vgname data1
        content rootdir,images
        nodes StumpysProxi

dir: backup
        disable
        path /tank/backup
        content backup
        maxfiles 8
        shared 0
 
hi

ty for your links, i was able to get my backups working.

i changed my storage.conf to the following and the backup works now.
Code:
dir: backup
        path /tank/backup
        content backup
        is_mountpoint yes
        mkdir 0
        maxfiles 8
        shared 0

sadly the problem with the to early starting vm/lxc is still there

i tried both variants.
for the grub i tried rootdelay=10;20;30 and 120, none of these worked.
then i changed it back to "quiet" and tried the ZFS_initrd... with "4" and "60".
both variants didnt work.
thats why i am still using an lxc as an "timer" to delay the other lxc and vm until the drives are online.

Code:
a) edit /etc/default/grub and add "rootdelay=10" at GRUB_CMDLINE_LINUX_DEFAULT (i.e. GRUB_CMDLINE_LINUX_DEFAULT="rootdelay=10 quiet") and then issue a # update-grub

b) edit /etc/default/zfs, set ZFS_INITRD_PRE_MOUNTROOT_SLEEP='4', and then issue a "update-initramfs -k 4.2.6-1-pve -u"
 

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!