* [pbs-devel] [PATCH proxmox-backup] etc: provide and enable mount unit for /run/proxmox-backup @ 2025-11-19 13:15 Christian Ebner 2025-11-19 13:55 ` Fabian Grünbichler 2025-11-19 14:33 ` [pbs-devel] superseded: " Christian Ebner 0 siblings, 2 replies; 4+ messages in thread From: Christian Ebner @ 2025-11-19 13:15 UTC (permalink / raw) To: pbs-devel Since the introduction of per-chunk file locks for datastores with s3 backend, the inodes on the tmpfs backing /run/proxmox-backup might be to limited, the kernel dynamically calculating the limit based on available system memory [0]. To not limit the number of inodes, provide a systemd mount unit to create a dedicated tmpfs for /run/proxmox-backup and only enable this for now so it becomes effective on reboot, since this cannot be safely started now. [0] https://docs.kernel.org/filesystems/tmpfs.html Fixes: https://forum.proxmox.com/threads/176228/ Signed-off-by: Christian Ebner <c.ebner@proxmox.com> --- debian/postinst | 2 ++ debian/proxmox-backup-server.install | 1 + "etc/run-proxmox\\x2dbackup.mount" | 13 +++++++++++++ 3 files changed, 16 insertions(+) create mode 100644 "etc/run-proxmox\\x2dbackup.mount" diff --git a/debian/postinst b/debian/postinst index 8b5e9bbed..0fddfbd99 100644 --- a/debian/postinst +++ b/debian/postinst @@ -25,6 +25,8 @@ case "$1" in fi deb-systemd-invoke $_dh_action proxmox-backup.service proxmox-backup-proxy.service >/dev/null || true + systemctl enable run-proxmox\\x2dbackup.mount >/dev/null || true + if test -n "$2"; then # FIXME: Remove in future version once we're sure no broken entries remain in anyone's files if grep -q -e ':termproxy::[^@]\+: ' /var/log/proxmox-backup/tasks/active; then diff --git a/debian/proxmox-backup-server.install b/debian/proxmox-backup-server.install index d06f026cf..11dd037e8 100644 --- a/debian/proxmox-backup-server.install +++ b/debian/proxmox-backup-server.install @@ -6,6 +6,7 @@ etc/proxmox-backup-daily-update.timer /usr/lib/systemd/system/ etc/proxmox-backup-proxy.service /usr/lib/systemd/system/ etc/proxmox-backup.service /usr/lib/systemd/system/ etc/removable-device-attach@.service /usr/lib/systemd/system/ +etc/run-proxmox\x2dbackup.mount /usr/lib/systemd/system/ usr/bin/pmt usr/bin/pmtx usr/bin/proxmox-tape diff --git "a/etc/run-proxmox\\x2dbackup.mount" "b/etc/run-proxmox\\x2dbackup.mount" new file mode 100644 index 000000000..f5fbe2eb4 --- /dev/null +++ "b/etc/run-proxmox\\x2dbackup.mount" @@ -0,0 +1,13 @@ +[Unit] +Description=Mount tmpfs at /run/proxmox-backup +Conflicts=umount.target +Before=local-fs.target umount.target + +[Mount] +Type=tmpfs +What=tmpfs +Where=/run/proxmox-backup +Options=rw,nosuid,nodev,noexec,relatime,nr_inodes=0,mode=755,inode64 + +[Install] +WantedBy=local-fs.target -- 2.47.3 _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [pbs-devel] [PATCH proxmox-backup] etc: provide and enable mount unit for /run/proxmox-backup 2025-11-19 13:15 [pbs-devel] [PATCH proxmox-backup] etc: provide and enable mount unit for /run/proxmox-backup Christian Ebner @ 2025-11-19 13:55 ` Fabian Grünbichler 2025-11-19 14:28 ` Christian Ebner 2025-11-19 14:33 ` [pbs-devel] superseded: " Christian Ebner 1 sibling, 1 reply; 4+ messages in thread From: Fabian Grünbichler @ 2025-11-19 13:55 UTC (permalink / raw) To: Proxmox Backup Server development discussion On November 19, 2025 2:15 pm, Christian Ebner wrote: > Since the introduction of per-chunk file locks for datastores with s3 > backend, the inodes on the tmpfs backing /run/proxmox-backup might be > to limited, the kernel dynamically calculating the limit based on > available system memory [0]. To not limit the number of inodes, > provide a systemd mount unit to create a dedicated tmpfs for > /run/proxmox-backup and only enable this for now so it becomes > effective on reboot, since this cannot be safely started now. > > [0] https://docs.kernel.org/filesystems/tmpfs.html > > Fixes: https://forum.proxmox.com/threads/176228/ > Signed-off-by: Christian Ebner <c.ebner@proxmox.com> > --- > debian/postinst | 2 ++ > debian/proxmox-backup-server.install | 1 + > "etc/run-proxmox\\x2dbackup.mount" | 13 +++++++++++++ > 3 files changed, 16 insertions(+) > create mode 100644 "etc/run-proxmox\\x2dbackup.mount" > > diff --git a/debian/postinst b/debian/postinst > index 8b5e9bbed..0fddfbd99 100644 > --- a/debian/postinst > +++ b/debian/postinst > @@ -25,6 +25,8 @@ case "$1" in > fi > deb-systemd-invoke $_dh_action proxmox-backup.service proxmox-backup-proxy.service >/dev/null || true > > + systemctl enable run-proxmox\\x2dbackup.mount >/dev/null || true this is not needed, by virtue of installing the unit this is already handled by dh_installsystemd (which we override to only enable, but not start/restart units), which inserts the following into the postinst (and a corresponding snippet for puring the package into postrm): # Automatically added by dh_installsystemd/13.24.2 if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then # The following line should be removed in trixie or trixie+1 deb-systemd-helper unmask 'run-proxmox\x2dbackup.mount' >/dev/null || true # was-enabled defaults to true, so new installations run enable. if deb-systemd-helper --quiet was-enabled 'run-proxmox\x2dbackup.mount'; then # Enables the unit on first installation, creates new # symlinks on upgrades if the unit file has changed. deb-systemd-helper enable 'run-proxmox\x2dbackup.mount' >/dev/null || true else # Update the statefile to add new symlinks (if any), which need to be # cleaned up on purge. Also remove old symlinks. deb-systemd-helper update-state 'run-proxmox\x2dbackup.mount' >/dev/null || true fi fi # End automatically added section > + > if test -n "$2"; then > # FIXME: Remove in future version once we're sure no broken entries remain in anyone's files > if grep -q -e ':termproxy::[^@]\+: ' /var/log/proxmox-backup/tasks/active; then > diff --git a/debian/proxmox-backup-server.install b/debian/proxmox-backup-server.install > index d06f026cf..11dd037e8 100644 > --- a/debian/proxmox-backup-server.install > +++ b/debian/proxmox-backup-server.install > @@ -6,6 +6,7 @@ etc/proxmox-backup-daily-update.timer /usr/lib/systemd/system/ > etc/proxmox-backup-proxy.service /usr/lib/systemd/system/ > etc/proxmox-backup.service /usr/lib/systemd/system/ > etc/removable-device-attach@.service /usr/lib/systemd/system/ > +etc/run-proxmox\x2dbackup.mount /usr/lib/systemd/system/ > usr/bin/pmt > usr/bin/pmtx > usr/bin/proxmox-tape > diff --git "a/etc/run-proxmox\\x2dbackup.mount" "b/etc/run-proxmox\\x2dbackup.mount" > new file mode 100644 > index 000000000..f5fbe2eb4 > --- /dev/null > +++ "b/etc/run-proxmox\\x2dbackup.mount" > @@ -0,0 +1,13 @@ > +[Unit] > +Description=Mount tmpfs at /run/proxmox-backup > +Conflicts=umount.target > +Before=local-fs.target umount.target > + > +[Mount] > +Type=tmpfs > +What=tmpfs > +Where=/run/proxmox-backup might be good to have a comment here *why* we do nr_inodes=0 ;) > +Options=rw,nosuid,nodev,noexec,relatime,nr_inodes=0,mode=755,inode64 and the options here mean that /run/proxmox-backup is Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) instead of the previous 755 but owned by backup:backup, so we need to also include uid and gid backup in the mountoptions here, else the proxy will fail to start after a reboot.. > + > +[Install] > +WantedBy=local-fs.target > -- > 2.47.3 > > > > _______________________________________________ > pbs-devel mailing list > pbs-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel > > > _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
* Re: [pbs-devel] [PATCH proxmox-backup] etc: provide and enable mount unit for /run/proxmox-backup 2025-11-19 13:55 ` Fabian Grünbichler @ 2025-11-19 14:28 ` Christian Ebner 0 siblings, 0 replies; 4+ messages in thread From: Christian Ebner @ 2025-11-19 14:28 UTC (permalink / raw) To: Proxmox Backup Server development discussion, Fabian Grünbichler On 11/19/25 2:55 PM, Fabian Grünbichler wrote: > On November 19, 2025 2:15 pm, Christian Ebner wrote: >> Since the introduction of per-chunk file locks for datastores with s3 >> backend, the inodes on the tmpfs backing /run/proxmox-backup might be >> to limited, the kernel dynamically calculating the limit based on >> available system memory [0]. To not limit the number of inodes, >> provide a systemd mount unit to create a dedicated tmpfs for >> /run/proxmox-backup and only enable this for now so it becomes >> effective on reboot, since this cannot be safely started now. >> >> [0] https://docs.kernel.org/filesystems/tmpfs.html >> >> Fixes: https://forum.proxmox.com/threads/176228/ >> Signed-off-by: Christian Ebner <c.ebner@proxmox.com> >> --- >> debian/postinst | 2 ++ >> debian/proxmox-backup-server.install | 1 + >> "etc/run-proxmox\\x2dbackup.mount" | 13 +++++++++++++ >> 3 files changed, 16 insertions(+) >> create mode 100644 "etc/run-proxmox\\x2dbackup.mount" >> >> diff --git a/debian/postinst b/debian/postinst >> index 8b5e9bbed..0fddfbd99 100644 >> --- a/debian/postinst >> +++ b/debian/postinst >> @@ -25,6 +25,8 @@ case "$1" in >> fi >> deb-systemd-invoke $_dh_action proxmox-backup.service proxmox-backup-proxy.service >/dev/null || true >> >> + systemctl enable run-proxmox\\x2dbackup.mount >/dev/null || true > > this is not needed, by virtue of installing the unit this is already > handled by dh_installsystemd (which we override to only enable, but not > start/restart units), which inserts the following into the postinst (and > a corresponding snippet for puring the package into postrm): > > # Automatically added by dh_installsystemd/13.24.2 > if [ "$1" = "configure" ] || [ "$1" = "abort-upgrade" ] || [ "$1" = "abort-deconfigure" ] || [ "$1" = "abort-remove" ] ; then > # The following line should be removed in trixie or trixie+1 > deb-systemd-helper unmask 'run-proxmox\x2dbackup.mount' >/dev/null || true > > # was-enabled defaults to true, so new installations run enable. > if deb-systemd-helper --quiet was-enabled 'run-proxmox\x2dbackup.mount'; then > # Enables the unit on first installation, creates new > # symlinks on upgrades if the unit file has changed. > deb-systemd-helper enable 'run-proxmox\x2dbackup.mount' >/dev/null || true > else > # Update the statefile to add new symlinks (if any), which need to be > # cleaned up on purge. Also remove old symlinks. > deb-systemd-helper update-state 'run-proxmox\x2dbackup.mount' >/dev/null || true > fi > fi > # End automatically added section Ah, neat: today I learned.. Thanks! > >> + >> if test -n "$2"; then >> # FIXME: Remove in future version once we're sure no broken entries remain in anyone's files >> if grep -q -e ':termproxy::[^@]\+: ' /var/log/proxmox-backup/tasks/active; then >> diff --git a/debian/proxmox-backup-server.install b/debian/proxmox-backup-server.install >> index d06f026cf..11dd037e8 100644 >> --- a/debian/proxmox-backup-server.install >> +++ b/debian/proxmox-backup-server.install >> @@ -6,6 +6,7 @@ etc/proxmox-backup-daily-update.timer /usr/lib/systemd/system/ >> etc/proxmox-backup-proxy.service /usr/lib/systemd/system/ >> etc/proxmox-backup.service /usr/lib/systemd/system/ >> etc/removable-device-attach@.service /usr/lib/systemd/system/ >> +etc/run-proxmox\x2dbackup.mount /usr/lib/systemd/system/ >> usr/bin/pmt >> usr/bin/pmtx >> usr/bin/proxmox-tape >> diff --git "a/etc/run-proxmox\\x2dbackup.mount" "b/etc/run-proxmox\\x2dbackup.mount" >> new file mode 100644 >> index 000000000..f5fbe2eb4 >> --- /dev/null >> +++ "b/etc/run-proxmox\\x2dbackup.mount" >> @@ -0,0 +1,13 @@ >> +[Unit] >> +Description=Mount tmpfs at /run/proxmox-backup >> +Conflicts=umount.target >> +Before=local-fs.target umount.target >> + >> +[Mount] >> +Type=tmpfs >> +What=tmpfs >> +Where=/run/proxmox-backup > > might be good to have a comment here *why* we do nr_inodes=0 ;) Ack, will add that for v2 > >> +Options=rw,nosuid,nodev,noexec,relatime,nr_inodes=0,mode=755,inode64 > > and the options here mean that /run/proxmox-backup is > > Access: (0755/drwxr-xr-x) Uid: ( 0/ root) Gid: ( 0/ root) > > instead of the previous 755 but owned by backup:backup, so we need to > also include uid and gid backup in the mountoptions here, else the proxy > will fail to start after a reboot.. Right, forgot to actually check the service is running after the reboot, only checked the output of mount for it to be mounted. Will add the uid=34,gid=34 >> + >> +[Install] >> +WantedBy=local-fs.target >> -- >> 2.47.3 >> >> >> >> _______________________________________________ >> pbs-devel mailing list >> pbs-devel@lists.proxmox.com >> https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel >> >> >> > > > _______________________________________________ > pbs-devel mailing list > pbs-devel@lists.proxmox.com > https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel > > _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
* [pbs-devel] superseded: [PATCH proxmox-backup] etc: provide and enable mount unit for /run/proxmox-backup 2025-11-19 13:15 [pbs-devel] [PATCH proxmox-backup] etc: provide and enable mount unit for /run/proxmox-backup Christian Ebner 2025-11-19 13:55 ` Fabian Grünbichler @ 2025-11-19 14:33 ` Christian Ebner 1 sibling, 0 replies; 4+ messages in thread From: Christian Ebner @ 2025-11-19 14:33 UTC (permalink / raw) To: pbs-devel superseded-by version 2: https://lore.proxmox.com/pbs-devel/20251119143148.9383-1-c.ebner@proxmox.com/T/ _______________________________________________ pbs-devel mailing list pbs-devel@lists.proxmox.com https://lists.proxmox.com/cgi-bin/mailman/listinfo/pbs-devel ^ permalink raw reply [flat|nested] 4+ messages in thread
end of thread, other threads:[~2025-11-19 14:33 UTC | newest] Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed) -- links below jump to the message on this page -- 2025-11-19 13:15 [pbs-devel] [PATCH proxmox-backup] etc: provide and enable mount unit for /run/proxmox-backup Christian Ebner 2025-11-19 13:55 ` Fabian Grünbichler 2025-11-19 14:28 ` Christian Ebner 2025-11-19 14:33 ` [pbs-devel] superseded: " Christian Ebner
This is an external index of several public inboxes, see mirroring instructions on how to clone and mirror all data and code used by this external index.