Red exclamation mark on local storage - docker/portainer, multiple ssds

Hello all,

I am bit stuck the last 2 days. I have read through forums for a solution but i am still getting a red exclamation mark when i add a local storage. My setup is Docker with Portainer to manage, and i have 5 data folders for Nextcloud. Data is the one i setup initially, this works fine, data2 and data3 is part of the same SSD as data but on different partitions. Data4 and data 5 have each their own SSD. I changed the permission with chown to match the settings of the first data folder but it did not helped.

Here are some information. From the permissions.

$ ls -l /srv/dockerdata/nextcloud_data/config/www/nextcloud/config/config.php
-rw-r----- 1 fileserveradmin fileserveradmin 802 Sep 13 12:16 /srv/dockerdata/nextcloud_data/config/www/nextcloud/config/config.php

$ ls -l /srv/dockerdata/nextcloud_data
total 8
drwxr-xr-x 8 fileserveradmin fileserveradmin 4096 Sep 12 13:30 config
drwxrwx— 6 fileserveradmin fileserveradmin 4096 Sep 12 14:37 data

From the rest of the folders in different partitions/SSDs

total 4
drwxrwx— 2 fileserveradmin fileserveradmin 4096 Sep 13 12:16 data2

total 4
drwxrwx— 2 fileserveradmin fileserveradmin 4096 Sep 12 18:38 data3

total 4
drwxrwxr-x 2 fileserveradmin fileserveradmin 4096 Sep 12 18:39 data4

total 4
drwxrwxr-x 2 fileserveradmin fileserveradmin 4096 Sep 12 18:40 data5

I can add them as bind mounts through Portainer when i edit and redeploy the container but unfortunately i can not control which folder is assigned to each drive/mount, at least 1 folder would be sufficient for me. It looks that Nextcloud waits to fill the first drive and then go to the next one, from what the floating tool-tips suggests.

To make things even more interesting, if i use only the /media/ i get a green check mark! If use a /media/sda4 for example, as expected i get the error again. The weird is also the /media/ is part of the root group and not the fileserveradmin group. But also the sda4 is part of the root group.

Here are their permissions.

drwxr-xr-x 7 root root 4096 Sep 12 18:13 media

$ ls -l /media/
total 20
drwxr-x—+ 2 root root 4096 Sep 7 21:08 fileserveradmin
drwxr-xr-x 4 root root 4096 Sep 13 11:51 sda4
drwxr-xr-x 4 root root 4096 Sep 12 18:37 sda5
drwxr-xr-x 4 root root 4096 Sep 12 18:38 sdb1
drwxr-xr-x 4 root root 4096 Sep 12 18:39 sdc1

Also when i go and check the /media/ there is no folder or files there, but i get them on web GUI of nextcloud

from root search for the ‘Nextcloud intro.mp4’ that does not appears inside the test folder.

/srv/dockerdata/nextcloud_data/data/omitted-admin/files/Nextcloud intro.mp4

/var/lib/docker/overlay2/12916fb1f09cd962288192b3ebe2499428cb42d3bb324dbcfd42dcb820c87696/diff/app/www/public/core/skeleton/Nextcloud intro.mp4

/var/lib/docker/overlay2/12916fb1f09cd962288192b3ebe2499428cb42d3bb324dbcfd42dcb820c87696/merged/app/www/public/core/skeleton/Nextcloud intro.mp4

/var/lib/docker/overlay2/12916fb1f09cd962288192b3ebe2499428cb42d3bb324dbcfd42dcb820c87696/merged/app/www/src/core/skeleton/Nextcloud intro.mp4

/var/lib/docker/overlay2/ba8c9edb0139f867b44dac321707a1af1ba8af26565f5f85ce9e6731a1ccc2ff/diff/app/www/src/core/skeleton/Nextcloud intro.mp4

/timeshift/snapshots/2023-09-13_13-00-01/localhost/srv/dockerdata/nextcloud_data/data/omitted-admin/files/Nextcloud intro.mp4

I am suspecting that there is a line in the config files that causing this.

edit:

Additionally tried the “check_data_directory_permissions’ => false,” and the “sudo chmod u+rwx /mnt/data” from this page
#236 - but unfortunately no joy, same issue. Also, 99% of the time i stop the Nextcloud container, make changes and start it again.

If anyone can help i will appreciate it!!

Can you please simply post your Docker Compose? That’ll make it easier to for us to get a clear view of what you’re doing and have already configured.

Also, it might be helpful if you can provide a brief overview of what you’re trying to accomplish with these various storage mounts. We can guess a bit, but I’d rather make sure I’m not misunderstanding your use case.

Hello jtr,

thank you for your reply. To explain further why all these storage mounts. I have a thin client with limited SATA ports available, and i want to have for example my photos on 1 drive, my videos on another drive, documents on another drive etc. I do not want to go to the route of raid because of the limited SATA ports and also to keep things simple, as i mentioned even 1 folder per drive would enough for me.

The thing is that i followed various solutions/ideas that worked in the past but i can not make those “external” mounts to work. I even plugged a usb stick and even after adjusting the permissions that also did not worked. And the fact that for some reason the /media/ comes with a green check, it is like add insult to injury.

Based on the Mount volume for just data · Issue #236 · nextcloud/docker · GitHub i can create this bindfs but i would like it to be the last option. Tbh i am not sure if it will work…

I tried to find the docker-compose.yml, but i could not spot it, after some research and based the info from this reddit post ( Reddit - Dive into anything ) i locate some config files here /var/lib/docker/containers/cont.id/

I attached here both and also the config.php of nextcloud (there is an extra line as i mentioned in my previous post/edit). I had to make the .json files more readable since all code was 1 line!!

/srv/dockerdata/nextcloud_data/config/www/nextcloud/config/config.php

<?php
$CONFIG = array (
  'datadirectory' => '/data',
  'instanceid' => 'ocls9s9iazh9',
  'passwordsalt' => 'omitted',
  'secret' => 'omitted',
  'trusted_domains' => 
  array (
    0 => '192.168.178.29:63563',
    1 => 'ommitted url',
  ),
  'dbtype' => 'mysql',
  'version' => '27.0.2.1',
  'overwrite.cli.url' => 'https://192.168.178.29:63563',
  'dbname' => 'nextcloud',
  'dbhost' => '192.168.178.29:3306',
  'dbport' => '',
  'dbtableprefix' => 'oc_',
  'mysql.utf8mb4' => true,
  'dbuser' => 'nextcloud-sql-admin',
  'dbpassword' => 'omitted',
  'installed' => true,
  'memcache.local' => '\\OC\\Memcache\\APCu',
  'filelocking.enabled' => 'true',
  'memcache.locking' => '\\OC\\Memcache\\APCu',
  'mail_smtpmode' => 'smtp',
  'mail_smtpsecure' => 'ssl',
  'mail_sendmailmode' => 'smtp',
  'check_data_directory_permissions' => false,
);

config.v2.json

{"StreamConfig":{},
"State":{"Running":true,
"Paused":false,
"Restarting":false,
"OOMKilled":false,
"RemovalInProgress":false,
"Dead":false,
"Pid":12254,
"ExitCode"0,
"Error":"",
"StartedAt":"2023-09-15T14:19:48.042260571Z",
"FinishedAt":"2023-09-15T14:18:07.204979977Z",
"Health":null},
"ID":"1f7070fd80ef762cf3a32b62d7776adf52a36ba72161cd4aaf438c509e38af9c",
"Created":"2023-09-13T18:34:27.900517307Z",
"Managed":false,
"Path":"/init",
"Args":[],
"Config":{"Hostname":"81a02ea299d6",
"Domainname":"",
"User":"",
"AttachStdin":false,
"AttachStdout":false,
"AttachStderr":false,
"ExposedPorts":{"443/tcp":{},
"80/tcp":{}},
"Tty":false,
"OpenStdin":false,
"StdinOnce":false,
"Env":["PUID=1000","PGID=1000","TZ=Europe/Berlin","PATH=/lsiopy/bin:/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin","PS1=$(whoami)@$(hostname):$(pwd)\\$","HOME=/root","TERM=xterm","S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0","S6_VERBOSITY=1","S6_STAGE2_HOOK=/docker-mods","VIRTUAL_ENV=/lsiopy","LSIO_FIRST_PARTY=true","LD_PRELOAD=/usr/lib/preloadable_libiconv.so"],
"Cmd":null,"Image":"linuxserver/nextcloud:latest",
"Volumes":{"/config":{},
"/data":{},
"/data2":{},
"/data3":{},
"/data4":{},
"/data5":{}},
"WorkingDir":"/",
"Entrypoint":["/init"],
"OnBuild":null,
"Labels":{"build_version":"Linuxserver.io version:- 27.0.2-ls269 Build-date:- 2023-09-05T11:53:35+00:00",
"maintainer":"aptalca",
"org.opencontainers.image.authors":"linuxserver.io",
"org.opencontainers.image.created":"2023-09-05T11:53:35+00:00",
"org.opencontainers.image.description":"[Nextcloud](https://nextcloud.com/) gives you access to all your files wherever you are.    Where are your photos and documents? With Nextcloud you pick a server of your choice, at home, in a data center or at a provider. And that is where your files will be. Nextcloud runs on that server, protecting your data and giving you access from your desktop or mobile devices. Through Nextcloud you also access, sync and share your existing data on that FTP drive at the office, a Dropbox or a NAS you have at home.  ",
"org.opencontainers.image.documentation":"https://docs.linuxserver.io/images/docker-nextcloud",
"org.opencontainers.image.licenses":"GPL-3.0-only",
"org.opencontainers.image.ref.name":"a116d0836b9bd62421ceef5e4f797928edfd3aa7",
"org.opencontainers.image.revision":"a116d0836b9bd62421ceef5e4f797928edfd3aa7",
"org.opencontainers.image.source":"https://github.com/linuxserver/docker-nextcloud",
"org.opencontainers.image.title":"Nextcloud",
"org.opencontainers.image.url":"https://github.com/linuxserver/docker-nextcloud/packages",
"org.opencontainers.image.vendor":"linuxserver.io",
"org.opencontainers.image.version":"27.0.2-ls269"}},

"Image":"sha256:057ec79097cecf2740cc12c507a912962412f193c8deb2d36f49b684381f7524",
"ImageManifest":null,
"NetworkSettings":{"Bridge":"",
"SandboxID":"4bec10a362c67cedd01391b208368c0455d1169921f1ebea0c6b3b04487a24a5",
"HairpinMode":false,
"LinkLocalIPv6Address":"",
"LinkLocalIPv6PrefixLen":0,
"Networks":{"bridge":{"IPAMConfig":{},
"Links":null,
"Aliases":null,
"NetworkID":"be9738013898600d22527490890bd40723e84ff181bb34ed0ebc8d2c79f409c2",
"EndpointID":"3df1139178e753fc25ec43a1456c50e8f07587f69f61226e7a105cca31f13389",
"Gateway":"172.17.0.1",
"IPAddress":"172.17.0.3",
"IPPrefixLen":16,
"IPv6Gateway":"",
"GlobalIPv6Address":"",
"GlobalIPv6PrefixLen":0,
"MacAddress":"02:42:ac:11:00:03",
"DriverOpts":null,
"IPAMOperational":false}},

"Service":null,
"Ports":{"443/tcp":[{"HostIp":"0.0.0.0",
"HostPort":"63563"},
{"HostIp":"::","HostPort":"63563"}],
"80/tcp":null},
"SandboxKey":"/var/run/docker/netns/4bec10a362c6",
"SecondaryIPAddresses":null,
"SecondaryIPv6Addresses":null,
"IsAnonymousEndpoint":false,
"HasSwarmEndpoint":false},
"LogPath":"/var/lib/docker/containers/1f7070fd80ef762cf3a32b62d7776adf52a36ba72161cd4aaf438c509e38af9c/1f7070fd80ef762cf3a32b62d7776adf52a36ba72161cd4aaf438c509e38af9c-json.log",
"Name":"/Nextcloud",
"Driver":"overlay2",
"OS":"linux",
"RestartCount":0,
"HasBeenStartedBefore":true,
"HasBeenManuallyStopped":false,

"MountPoints":{"/config":{"Source":"/srv/dockerdata/nextcloud_data/config",
"Destination":"/config",
"RW":true,
"Name":"",
"Driver":"",
"Type":"bind",
"Propagation":"rprivate",
"Spec":{"Type":"bind",
"Source":"/srv/dockerdata/nextcloud_data/config",
"Target":"/config"},
"SkipMountpointCreation":false},

"/data":{"Source":"/srv/dockerdata/nextcloud_data/data",
"Destination":"/data",
"RW":true,
"Name":"",
"Driver":"",
"Type":"bind",
"Propagation":"rprivate",
"Spec":{"Type":"bind","Source":"/srv/dockerdata/nextcloud_data/data",
"Target":"/data"},
"SkipMountpointCreation":false},

"/data2":{"Source":"/media/sda4/srv/dockerdata/nextcloud_data_arxeia_kai_efarmoges/data2",
"Destination":"/data2",
"RW":true,
"Name":"",
"Driver":"",
"Type":"bind",
"Propagation":"rprivate",
"Spec":{"Type":"bind",
"Source":"/media/sda4/srv/dockerdata/nextcloud_data_arxeia_kai_efarmoges/data2",
"Target":"/data2"},
"SkipMountpointCreation":false},

"/data3":{"Source":"/media/sda5/srv/dockerdata/nextcloud_data_kodikofilakio/data3",
"Destination":"/data3",
"RW":true,
"Name":"",
"Driver":"",
"Type":"bind",
"Propagation":"rprivate",
"Spec":{"Type":"bind",
"Source":"/media/sda5/srv/dockerdata/nextcloud_data_kodikofilakio/data3",
"Target":"/data3"},
"SkipMountpointCreation":false},

"/data4":{"Source":"/media/sdb1/srv/dockerdata/nextcloud_data_fotografies/data4",
"Destination":"/data4",
"RW":true,
"Name":"",
"Driver":"",
"Type":"bind",
"Propagation":"rprivate",
"Spec":{"Type":"bind",
"Source":"/media/sdb1/srv/dockerdata/nextcloud_data_fotografies/data4",
"Target":"/data4"},
"SkipMountpointCreation":false},

"/data5":{"Source":"/media/sdc1/srv/dockerdata/nextcloud_data_magnitoskopisis/data5",
"Destination":"/data5",
"RW":true,
"Name":"",
"Driver":"",
"Type":"bind",
"Propagation":"rprivate",
"Spec":{"Type":"bind",
"Source":"/media/sdc1/srv/dockerdata/nextcloud_data_magnitoskopisis/data5",
"Target":"/data5"},
"SkipMountpointCreation":false}},

"SecretReferences":null,
"ConfigReferences":null,
"MountLabel":"",
"ProcessLabel":"",
"AppArmorProfile":"docker-default",
"SeccompProfile":"",
"NoNewPrivileges":false,
"HostnamePath":"/var/lib/docker/containers/1f7070fd80ef762cf3a32b62d7776adf52a36ba72161cd4aaf438c509e38af9c/hostname",
"HostsPath":"/var/lib/docker/containers/1f7070fd80ef762cf3a32b62d7776adf52a36ba72161cd4aaf438c509e38af9c/hosts",
"ShmPath":"",
"ResolvConfPath":"/var/lib/docker/containers/1f7070fd80ef762cf3a32b62d7776adf52a36ba72161cd4aaf438c509e38af9c/resolv.conf",
"LocalLogCacheMeta":{"HaveNotifyEnabled":false}}

hostconfig.json

{"Binds":["/media/sda4/srv/dockerdata/nextcloud_data_arxeia_kai_efarmoges/data2:/data2","/media/sda5/srv/dockerdata/nextcloud_data_kodikofilakio/data3:/data3","/media/sdb1/srv/dockerdata/nextcloud_data_fotografies/data4:/data4","/media/sdc1/srv/dockerdata/nextcloud_data_magnitoskopisis/data5:/data5","/srv/dockerdata/nextcloud_data/config:/config","/srv/dockerdata/nextcloud_data/data:/data"],
"ContainerIDFile":"",
"LogConfig":{"Type":"json-file",
"Config":{}},
"NetworkMode":"bridge",
"PortBindings":{"443/tcp":[{"HostIp":"",
"HostPort":"63563"}]},
"RestartPolicy":{"Name":"unless-stopped",
"MaximumRetryCount":0},
"AutoRemove":false,
"VolumeDriver":"",
"VolumesFrom":null,
"ConsoleSize":[0,0],
"CapAdd":["AUDIT_WRITE","CHOWN","DAC_OVERRIDE","FOWNER","FSETID","KILL","MKNOD","NET_BIND_SERVICE","NET_RAW","SETFCAP","SETGID","SETPCAP","SETUID","SYS_CHROOT"],
"CapDrop":["AUDIT_CONTROL","BLOCK_SUSPEND","DAC_READ_SEARCH","IPC_LOCK","IPC_OWNER","LEASE","LINUX_IMMUTABLE","MAC_ADMIN","MAC_OVERRIDE","NET_ADMIN","NET_BROADCAST","SYSLOG","SYS_ADMIN","SYS_BOOT","SYS_MODULE","SYS_NICE","SYS_PACCT","SYS_PTRACE","SYS_RAWIO","SYS_RESOURCE","SYS_TIME","SYS_TTY_CONFIG","WAKE_ALARM"],
"CgroupnsMode":"host",
"Dns":[],
"DnsOptions":[],
"DnsSearch":[],
"ExtraHosts":[],
"GroupAdd":null,
"IpcMode":"private",
"Cgroup":"",
"Links":null,
"OomScoreAdj":0,
"PidMode":"",
"Privileged":false,
"PublishAllPorts":false,
"ReadonlyRootfs":false,
"SecurityOpt":null,
"UTSMode":"",
"UsernsMode":"",
"ShmSize":67108864,
"Runtime":"runc",
"Isolation":"",
"CpuShares":0,
"Memory":0,
"NanoCpus":0,
"CgroupParent":"",
"BlkioWeight":0,
"BlkioWeightDevice":null,
"BlkioDeviceReadBps":null,
"BlkioDeviceWriteBps":null,
"BlkioDeviceReadIOps":null,
"BlkioDeviceWriteIOps":null,
"CpuPeriod":0,
"CpuQuota":0,
"CpuRealtimePeriod":0,
"CpuRealtimeRuntime":0,
"CpusetCpus":"",
"CpusetMems":"",
"Devices":[],
"DeviceCgroupRules":null,
"DeviceRequests":[],
"MemoryReservation":0,
"MemorySwap":0,
"MemorySwappiness":null,
"OomKillDisable":false,
"PidsLimit":null,
"Ulimits":null,
"CpuCount":0,
"CpuPercent":0,
"IOMaximumIOps":0,
"IOMaximumBandwidth":0,
"MaskedPaths":["/proc/asound","/proc/acpi","/proc/kcore","/proc/keys","/proc/latency_stats","/proc/timer_list","/proc/timer_stats","/proc/sched_debug","/proc/scsi","/sys/firmware"],"ReadonlyPaths":["/proc/bus","/proc/fs","/proc/irq","/proc/sys","/proc/sysrq-trigger"],
"Init":false}

The first thing that jumps out to me is that you may be mixing up mounting points within your containers with the mount points for these underlying filesystems as they exist on your underlying host.

If /media/sdc1/srv/dockerdata/nextcloud_data_magnitoskopisis/data5 is the actual path on your underlying host, then you specify to Docker (or Portainer in this case) where you want that volume or mount point from the host to appear within your container. I believe you’re trying to make this one appear as /data5 in your container.

You should be able to confirm if things are ending up where you want them by opening a shell in your container and running a command like df. Until you are clear about and have functioning in-container access to those filesystems there is nothing to configure in Nextcloud.

Until you sort that part out, attempting to configure any Local-style External Storage mounts within Nextcloud is not going to get you anywhere.