Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Feature: Reduce Mounting time of large PVs #659

Open
pfaelzerchen opened this issue Nov 27, 2024 · 0 comments
Open

Feature: Reduce Mounting time of large PVs #659

pfaelzerchen opened this issue Nov 27, 2024 · 0 comments
Labels
enhancement New feature or request

Comments

@pfaelzerchen
Copy link

Description of the change

Add the following by default to the nextcloud.podSecurityContext: fsGroupChangePolicy: "OnRootMismatch"

Benefits

I am mounting several large PVs with media archives. https://kubernetes.io/docs/tasks/configure-pod-container/security-context/ states that setting fsGroup will make Kubernetes recursively change ownership and permissions for the contents of each volume. This takes about 30 minutes in my case.

Setting fsGroupChangePolicy: "OnRootMismatch" reduces this to just several seconds.

Possible drawbacks

It is probably not guaranteed that every file has the proper group permissions. However, I did not recognize any problems when syncing and opening files and folders (and cards and calenders) in nextcloud.

Also, the log of the nextcloud container gives some warnings:

Warning: /var/www/html/config/apache-pretty-urls.config.php differs from the latest version of this image at /usr/src/nextcloud/config/apache-pretty-urls.config.php
Warning: /var/www/html/config/apcu.config.php differs from the latest version of this image at /usr/src/nextcloud/config/apcu.config.php
Warning: /var/www/html/config/apps.config.php differs from the latest version of this image at /usr/src/nextcloud/config/apps.config.php
Warning: /var/www/html/config/redis.config.php differs from the latest version of this image at /usr/src/nextcloud/config/redis.config.php
Warning: /var/www/html/config/reverse-proxy.config.php differs from the latest version of this image at /usr/src/nextcloud/config/reverse-proxy.config.php
Warning: /var/www/html/config/s3.config.php differs from the latest version of this image at /usr/src/nextcloud/config/s3.config.php
Warning: /var/www/html/config/smtp.config.php differs from the latest version of this image at /usr/src/nextcloud/config/smtp.config.php
Warning: /var/www/html/config/swift.config.php differs from the latest version of this image at /usr/src/nextcloud/config/swift.config.php
Warning: /var/www/html/config/upgrade-disable-web.config.php differs from the latest version of this image at /usr/src/nextcloud/config/upgrade-disable-web.config.php

It seems that the files only differ by 1 byte (an additional line feed at the end of the file). But I am not sure if this could have side effects when a new image version is rolled out.

Additional information

None, I think.

@pfaelzerchen pfaelzerchen added the enhancement New feature or request label Nov 27, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

No branches or pull requests

1 participant