Is the external storage (smb) forced if the local storage is almost full?

I am testing Nextcloud on my Proxmox server as an LXC container (Trigger warning I am a noob).

I want to store the user’s files on an Old NAS I have, which can just be securely accessed by SMB (It also has NFS but I do not like that I can not set any password in that way).

I already tried to move the data folder following this steps, but due to the nature of that SMB server, I can not modify the folder/file ownership so that alternative is a dead end.

So here comes my question, If I make the LXC container disc space as small as possible, would Nexcloud start creating files on the external storage?

I want to keep all the files (mostly photos) On the NAS and be able to create as small as possible backups of the LXC container and let the NAS handle the data mirroring and backup.

Does anything I write here make sense? Should I start looking at another alternative?


From the sounds of it, External Storage is not what you want. Mount the SMB via your OS into wherever your NC datadirectory is pointed. File ownership should match the old datadirectory (i.e. your web server user most likely).

(If you have existing data obviously you’ll need to migrate it to the replacement mount point).

P.S. Alternatively: If there is only one user you may be able to use user-level External Storage by setting the mount point to / in NC (the users “root”), but I’m not sure how reliable/supported that is.

I tried this, but I could not change the ownership of that folder from root to the www-data user. The command does not fail but the ownership doesn’t change. For what I found, it is not really that possible with smb folders.

The ownership mapping is done in the OS mount options (i.e. in /etc/fstab). Check the uid / gid parameters IIRC.

That was the trick, I had to map the mounted folder to the LXC container user id for www-data

1 Like