all lists on lists.proxmox.com
 help / color / mirror / Atom feed
* [pbs-devel] [PATCH proxmox-backup v2] etc: provide and enable mount unit for /run/proxmox-backup
@ 2025-11-19 14:31 Christian Ebner
  2025-11-20  8:05 ` Fabian Grünbichler
  2025-11-20 10:06 ` [pbs-devel] superseded: " Christian Ebner
  0 siblings, 2 replies; 4+ messages in thread
From: Christian Ebner @ 2025-11-19 14:31 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.

The mount unit is only enabled but not started by dh_installsystemd,
so this has only effect after a reboot.

[0] https://docs.kernel.org/filesystems/tmpfs.html

Fixes: https://forum.proxmox.com/threads/176228/
Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
---
Changes since version 1 (thanks @Fabian):
- Drop unneeded systemctl enable ...
- Add comment for why the inodes are unlimited
- Correctly set mountpoint uid:gid

 debian/proxmox-backup-server.install |  1 +
 "etc/run-proxmox\\x2dbackup.mount"   | 14 ++++++++++++++
 2 files changed, 15 insertions(+)
 create mode 100644 "etc/run-proxmox\\x2dbackup.mount"

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..cad35594d
--- /dev/null
+++ "b/etc/run-proxmox\\x2dbackup.mount"
@@ -0,0 +1,14 @@
+[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
+# Unlimited inodes as this stores per-chunk file locks
+Options=rw,nosuid,nodev,noexec,relatime,uid=34,gid=34,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 v2] etc: provide and enable mount unit for /run/proxmox-backup
  2025-11-19 14:31 [pbs-devel] [PATCH proxmox-backup v2] etc: provide and enable mount unit for /run/proxmox-backup Christian Ebner
@ 2025-11-20  8:05 ` Fabian Grünbichler
  2025-11-20  9:45   ` Christian Ebner
  2025-11-20 10:06 ` [pbs-devel] superseded: " Christian Ebner
  1 sibling, 1 reply; 4+ messages in thread
From: Fabian Grünbichler @ 2025-11-20  8:05 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion

On November 19, 2025 3:31 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.
> 
> The mount unit is only enabled but not started by dh_installsystemd,
> so this has only effect after a reboot.
> 
> [0] https://docs.kernel.org/filesystems/tmpfs.html
> 
> Fixes: https://forum.proxmox.com/threads/176228/
> Signed-off-by: Christian Ebner <c.ebner@proxmox.com>

Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>

> ---
> Changes since version 1 (thanks @Fabian):
> - Drop unneeded systemctl enable ...
> - Add comment for why the inodes are unlimited
> - Correctly set mountpoint uid:gid
> 
>  debian/proxmox-backup-server.install |  1 +
>  "etc/run-proxmox\\x2dbackup.mount"   | 14 ++++++++++++++
>  2 files changed, 15 insertions(+)
>  create mode 100644 "etc/run-proxmox\\x2dbackup.mount"
> 
> 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..cad35594d
> --- /dev/null
> +++ "b/etc/run-proxmox\\x2dbackup.mount"
> @@ -0,0 +1,14 @@
> +[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
> +# Unlimited inodes as this stores per-chunk file locks
> +Options=rw,nosuid,nodev,noexec,relatime,uid=34,gid=34,nr_inodes=0,mode=755,inode64

one small nit: this could use `backup` instead of `34` (although it's
pretty much guaranteed to not matter, we do so in other parts of the
code base as well..)

> +
> +[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 v2] etc: provide and enable mount unit for /run/proxmox-backup
  2025-11-20  8:05 ` Fabian Grünbichler
@ 2025-11-20  9:45   ` Christian Ebner
  0 siblings, 0 replies; 4+ messages in thread
From: Christian Ebner @ 2025-11-20  9:45 UTC (permalink / raw)
  To: Proxmox Backup Server development discussion, Fabian Grünbichler

On 11/20/25 9:05 AM, Fabian Grünbichler wrote:
> On November 19, 2025 3:31 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.
>>
>> The mount unit is only enabled but not started by dh_installsystemd,
>> so this has only effect after a reboot.
>>
>> [0] https://docs.kernel.org/filesystems/tmpfs.html
>>
>> Fixes: https://forum.proxmox.com/threads/176228/
>> Signed-off-by: Christian Ebner <c.ebner@proxmox.com>
> 
> Reviewed-by: Fabian Grünbichler <f.gruenbichler@proxmox.com>
> 
>> ---
>> Changes since version 1 (thanks @Fabian):
>> - Drop unneeded systemctl enable ...
>> - Add comment for why the inodes are unlimited
>> - Correctly set mountpoint uid:gid
>>
>>   debian/proxmox-backup-server.install |  1 +
>>   "etc/run-proxmox\\x2dbackup.mount"   | 14 ++++++++++++++
>>   2 files changed, 15 insertions(+)
>>   create mode 100644 "etc/run-proxmox\\x2dbackup.mount"
>>
>> 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..cad35594d
>> --- /dev/null
>> +++ "b/etc/run-proxmox\\x2dbackup.mount"
>> @@ -0,0 +1,14 @@
>> +[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
>> +# Unlimited inodes as this stores per-chunk file locks
>> +Options=rw,nosuid,nodev,noexec,relatime,uid=34,gid=34,nr_inodes=0,mode=755,inode64
> 
> one small nit: this could use `backup` instead of `34` (although it's
> pretty much guaranteed to not matter, we do so in other parts of the
> code base as well..)

Okay, will resend with that adapted, thanks!


_______________________________________________
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 v2] etc: provide and enable mount unit for /run/proxmox-backup
  2025-11-19 14:31 [pbs-devel] [PATCH proxmox-backup v2] etc: provide and enable mount unit for /run/proxmox-backup Christian Ebner
  2025-11-20  8:05 ` Fabian Grünbichler
@ 2025-11-20 10:06 ` Christian Ebner
  1 sibling, 0 replies; 4+ messages in thread
From: Christian Ebner @ 2025-11-20 10:06 UTC (permalink / raw)
  To: pbs-devel

superseded-by version 3:
https://lore.proxmox.com/pbs-devel/20251120100523.12147-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-20 10:06 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2025-11-19 14:31 [pbs-devel] [PATCH proxmox-backup v2] etc: provide and enable mount unit for /run/proxmox-backup Christian Ebner
2025-11-20  8:05 ` Fabian Grünbichler
2025-11-20  9:45   ` Christian Ebner
2025-11-20 10:06 ` [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.
Service provided by Proxmox Server Solutions GmbH | Privacy | Legal