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

Docker overlay2 disk mounts not showing up correctly #647

Open
JohannesLares opened this issue Jul 22, 2024 · 3 comments
Open

Docker overlay2 disk mounts not showing up correctly #647

JohannesLares opened this issue Jul 22, 2024 · 3 comments

Comments

@JohannesLares
Copy link

Steps to reproduce

  1. Run Nextcloud with docker v25 or higher
  2. Use overlay2 as mount type
  3. Go to server info page

Expected behaviour

Disks should show up as expected. Picture with docker v24 and mounts with devicemapper.

Screenshot 2024-07-22 at 12 53 09

Actual behaviour

Disks do not show up. Picture with docker v27 and mounts with overlay2

Screenshot 2024-07-22 at 12 51 50

This issue can be fixed by adding a flag (df -TPk to df -TPka) to https://github.com/nextcloud/serverinfo/blob/master/lib/OperatingSystems/Linux.php#L197

Server configuration

Operating system:
RHEL 9.3

Web server:
NGINX

Database:
MariaDB

PHP version:
8.2.20

Nextcloud version: (see Nextcloud admin page)
28.0.6

Where did you install Nextcloud from:
Docker hub

List of activated apps:

Enabled:
  - activity: 2.20.0
  - circles: 28.0.0
  - cloud_federation_api: 1.11.0
  - comments: 1.18.0
  - contactsinteraction: 1.9.0
  - dav: 1.29.1
  - federatedfilesharing: 1.18.0
  - federation: 1.18.0
  - files: 2.0.0
  - files_pdfviewer: 2.9.0
  - files_reminders: 1.1.0
  - files_sharing: 1.20.0
  - files_trashbin: 1.18.0
  - files_versions: 1.21.0
  - firstrunwizard: 2.17.0
  - logreader: 2.13.0
  - lookup_server_connector: 1.16.0
  - nextcloud_announcements: 1.17.0
  - notifications: 2.16.0
  - oauth2: 1.16.3
  - password_policy: 1.18.0
  - photos: 2.4.0
  - privacy: 1.12.0
  - provisioning_api: 1.18.0
  - recommendations: 2.0.0
  - related_resources: 1.3.0
  - serverinfo: 1.18.0
  - settings: 1.10.1
  - sharebymail: 1.18.0
  - support: 1.11.1
  - survey_client: 1.16.0
  - systemtags: 1.18.0
  - text: 3.9.1
  - theming: 2.3.0
  - twofactor_backupcodes: 1.17.0
  - updatenotification: 1.18.0
  - user_ldap: 1.19.0
  - user_oidc: 1.3.3
  - user_status: 1.8.1
  - viewer: 2.2.0
  - weather_status: 1.8.0
  - workflowengine: 2.10.0
Disabled:
  - admin_audit: 1.18.0
  - b2sharebridge: 4.2.0
  - bruteforcesettings: 2.8.0
  - dashboard: 7.8.0 (installed 7.8.0)
  - encryption: 2.16.0
  - files_external: 1.20.0
  - suspicious_login: 6.0.0
  - twofactor_totp: 10.0.0-beta.2

Nextcloud configuration:

<?php
$CONFIG = array (
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'memcache.locking' => '\\OC\\Memcache\\Redis',
  'memcache.distributed' => '\\OC\\Memcache\\Redis',
  'apps_paths' => 
  array (
    0 => 
    array (
      'path' => '/var/www/html/apps',
      'url' => '/apps',
      'writable' => false,
    ),
    1 => 
    array (
      'path' => '/var/www/html/custom_apps',
      'url' => '/custom_apps',
      'writable' => true,
    ),
  ),
  'upgrade.disable-web' => true,
  'instanceid' => '',
  'passwordsalt' => '',
  'secret' => '',
  'trusted_domains' => 
  array (
    0 => 'dev.b2drop.csc.fi',
  ),
  'datadirectory' => '/var/www/html/data',
  'dbtype' => 'mysql',
  'version' => '28.0.6.1',
  'overwrite.cli.url' => 'https://dev.b2drop.csc.fi',
  'dbname' => 'owncloud',
  'dbhost' => 'mariadb',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => '',
  'dbpassword' => '',
  'installed' => true,
  'redis' => 
  array (
    'host' => 'redis',
    'port' => 6379,
  ),
  'user_oidc' => 
  array (
    'auto_provision' => false,
    'single_logout' => false,
  ),
  'remember_login_cookie_lifetime' => 300,
  'session_lifetime' => 60,
  'session_relaxed_expiry' => true,
  'session_keepalive' => false,
  'auto_logout' => false,
  'maintenance_window_start' => 1,
  'theme' => 'b2drop',
  'loglevel' => 2,
  'maintenance' => false,
);

Client configuration

Browser:
Safari 17.5

Operating system:
macOS Sonoma 14.5

@kesselb
Copy link
Collaborator

kesselb commented Jul 23, 2024

Thanks for your bug report 👍

Adding a also means to show inaccessible filesystems.

Do you have an idea why docker 25.x treats your fileystem as inaccessible?

@JohannesLares
Copy link
Author

JohannesLares commented Aug 5, 2024

From my tests, I have noticed, that df -TPk shows only the first occurrence of a specific kind of mount, and df -TPka shows all the mounts.

$ df -TPk
Filesystem     Type    1024-blocks    Used Available Capacity Mounted on
overlay        overlay    82999276 6529676  76469600       8% /
tmpfs          tmpfs         65536       0     65536       0% /dev
shm            tmpfs         65536       0     65536       0% /dev/shm
/dev/vda4      xfs        82999276 6529676  76469600       8% /etc/hosts
tmpfs          tmpfs       1818440       4   1818436       1% /<redacted>
tmpfs          tmpfs       1818440       0   1818440       0% /proc/acpi
tmpfs          tmpfs       1818440       0   1818440       0% /proc/scsi
tmpfs          tmpfs       1818440       0   1818440       0% /sys/firmware
$ df -TPka
Filesystem     Type    1024-blocks    Used Available Capacity Mounted on
overlay        overlay    82999276 6529676  76469600       8% /
proc           proc              0       0         0        - /proc
tmpfs          tmpfs         65536       0     65536       0% /dev
devpts         devpts            0       0         0        - /dev/pts
sysfs          sysfs             0       0         0        - /sys
cgroup         cgroup2           0       0         0        - /sys/fs/cgroup
mqueue         mqueue            0       0         0        - /dev/mqueue
shm            tmpfs         65536       0     65536       0% /dev/shm
/dev/vda4      xfs        82999276 6529676  76469600       8% /etc/resolv.conf
/dev/vda4      xfs        82999276 6529676  76469600       8% /etc/hostname
/dev/vda4      xfs        82999276 6529676  76469600       8% /etc/hosts
tmpfs          tmpfs       1818440       4   1818436       1% /<redacted>
/dev/vda4      xfs        82999276 6529676  76469600       8% /var/www/html
/dev/vda4      xfs        82999276 6529676  76469600       8% /var/www/data
/dev/vda4      xfs        82999276 6529676  76469600       8% /var/www/data2
/dev/vda4      xfs        82999276 6529676  76469600       8% /var/www/html/config
...

Only the first /dev/vda4 mount is shown with df -TPk, when df -TPka shows all /dev/vda4 mounts.

From df man page:

-a, --all
              include pseudo, duplicate, inaccessible file systems

I think that the data volumes are dropped without -a flag, because those can be seen as duplicates.

@ernolf
Copy link
Contributor

ernolf commented Sep 3, 2024

The reason why you don't see the overlay filesystem is because overlay filsystems are explicitly excluded. See #303

if (in_array($matches['Type'][$i], ['tmpfs', 'devtmpfs', 'squashfs', 'overlay'], false)) {

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants