Cloudron makes it easy to run web apps like WordPress, Nextcloud, GitLab on your server. Find out more or install now.


    Cloudron Forum

    • Register
    • Login
    • Search
    • Categories
    • Recent
    • Tags
    • Popular

    Storage limits per-app

    Feature Requests
    8
    21
    790
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • ?
      A Former User last edited by

      Is this something that is possible? The use case here is providing testing environments to clients for apps that allow user generated content. This can be useful to make sure a single app does not fill a drive.

      murgero 1 Reply Last reply Reply Quote 13
      • robi
        robi last edited by

        Sounds like tying it into a quota system.

        Life of Advanced Technology

        ? 1 Reply Last reply Reply Quote 0
        • ?
          A Former User @robi last edited by

          @robi Precisely. I could see it in the same resources section. Default could be dynamic (unrestricted) and a user could set it to a discrete value.

          1 Reply Last reply Reply Quote 0
          • murgero
            murgero App Dev @Guest last edited by

            @atrilahiji Interesting request and interesting use case - I think it's a neat idea but only for certain apps (mail, lamp, surfer, nextcloud (especially!), and social networks like Mastodon and pixelfed)

            Not sure how the implementation would be though

            --
            https://urgero.org
            ~ Professional Nerd. Freelance Programmer. ~
            Matrix: @murgero:urgero.org

            jdaviescoates ? 2 Replies Last reply Reply Quote 0
            • jdaviescoates
              jdaviescoates @murgero last edited by

              @murgero @atrilahiji one way I guess this could be done right now would be create an external volume (e.g. a Hetzner Cloud Volume) and use that as the data folder for the app you don't want filling up the primary disk. You can also check the usage of this disk volume in System info.

              I use Cloudron with Gandi & Hetzner

              1 Reply Last reply Reply Quote 0
              • ?
                A Former User @murgero last edited by

                @murgero Exactly, I was thinking for stuff like Nextcloud or Moodle specifically.

                1 Reply Last reply Reply Quote 1
                • girish
                  girish Staff last edited by

                  If anyone knows how this can be done on linux, I am open to investigating this. As in how does mount a storage directory into a docker container that has a specific size? I can only think of some (sparse) file based loopback filesystem. I don't like that approach and would prefer some other alternative. I haven't looked into recent developments in linux quota system.

                  M MooCloud_Matt 2 Replies Last reply Reply Quote 0
                  • M
                    msbt App Dev @girish last edited by

                    @girish what about https://docs.docker.com/engine/reference/commandline/run/#set-storage-driver-options-per-container (from https://stackoverflow.com/questions/38542426/docker-container-specific-disk-quota)

                    girish 1 Reply Last reply Reply Quote 0
                    • robi
                      robi last edited by

                      If storage for Apps was integrated with container attached storage from MayaData.com, this would be an easier option.

                      This will also help Apps be more distributed and clustered, among other benefits.

                      Life of Advanced Technology

                      MooCloud_Matt 1 Reply Last reply Reply Quote 0
                      • MooCloud_Matt
                        MooCloud_Matt @girish last edited by

                        @girish
                        it can be done with LVM, btrfs or ZFS.
                        And their relative Docker driver, can be an option with an installation on ubuntu + one of those FS.

                        Matteo. R.
                        Founder and Tech-Support Manager.
                        MooCloud MSP
                        Swiss Managed Service Provider

                        1 Reply Last reply Reply Quote 0
                        • MooCloud_Matt
                          MooCloud_Matt @robi last edited by

                          @robi said in Storage limits per-app:

                          MayaData.com

                          I think they use OpenEBS, and as all the distributed storage solutions are complicated to set up, we use Ceph and need a dedicated port on the cluster server for the sync job, not as a requirement but as a need for reasonable performance to be able to use there features.

                          Matteo. R.
                          Founder and Tech-Support Manager.
                          MooCloud MSP
                          Swiss Managed Service Provider

                          robi 1 Reply Last reply Reply Quote 0
                          • girish
                            girish Staff @msbt last edited by

                            @msbt Interesting link, thanks. I wonder if it works for volumes also. It says it depends on the "volume plugin". Have to investigate. On Cloudron, the data directory is just a normal volume and doesn't use any plugin and it's unclear if that standard thing supports storage-opt.

                            1 Reply Last reply Reply Quote 0
                            • robi
                              robi @MooCloud_Matt last edited by

                              @moocloud_matt said in Storage limits per-app:

                              OpenEBS

                              Yes, but there is a more advanced version at MayaData.

                              @staff and I have spoken with them before.

                              Life of Advanced Technology

                              robi 1 Reply Last reply Reply Quote 0
                              • Referenced by  robi robi 
                              • Referenced by  girish girish 
                              • Aizat
                                Aizat last edited by

                                Any news about this? This is very useful especially if we're giving access to our clients who may overuse the storage in some of the apps on Cloudron.

                                girish 1 Reply Last reply Reply Quote 3
                                • girish
                                  girish Staff @Aizat last edited by

                                  @Aizat Still looking for suggestions to my comment https://forum.cloudron.io/topic/5103/storage-limits-per-app/7

                                  1 Reply Last reply Reply Quote 0
                                  • Referenced by  girish girish 
                                  • girish
                                    girish Staff last edited by

                                    Maybe we have use usrquota - https://www.digitalocean.com/community/tutorials/how-to-set-filesystem-quotas-on-ubuntu-18-04 . I guess this involves creating a user per app.

                                    XFS has pquota - https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/managing_file_systems/assembly_limiting-storage-space-usage-on-xfs-with-quotas_managing-file-systems . EXT4 has prjquota - https://access.redhat.com/documentation/en-us/red_hat_enterprise_linux/8/html/managing_file_systems/assembly_limiting-storage-space-usage-on-ext4-with-quotas_managing-file-systems

                                    Also, found that there is a --storage-size when using XFS in Docker - https://docs.docker.com/engine/reference/commandline/run/#set-storage-driver-options-per-container

                                    1 Reply Last reply Reply Quote 1
                                    • robi
                                      robi @robi last edited by

                                      This was also addressed in OpenEBS - https://github.com/openebs/dynamic-localpv-provisioner/issues/13

                                      Life of Advanced Technology

                                      girish 1 Reply Last reply Reply Quote 0
                                      • girish
                                        girish Staff @robi last edited by

                                        @robi Nice find, looks like they implemented this as XFS only. Most VPS providers use EXT4 by default afaik.

                                        robi 1 Reply Last reply Reply Quote 0
                                        • robi
                                          robi @girish last edited by

                                          @girish It does not matter that VPS providers use as you control what happens inside containers.

                                          If you choose to attach container volumes they can be XFS layers with all the nice tools XFS comes with, which EXT4 lacks.

                                          Similarly for attaching external volumes of additional space apart from the default FS the OS is installed on.

                                          Life of Advanced Technology

                                          girish 1 Reply Last reply Reply Quote 0
                                          • girish
                                            girish Staff @robi last edited by

                                            @robi the volumes can be XFS, but it requires a backing device. On a standard VPS, this means that we have to create a (big enough) file on EXT4 file system and then format it as XFS. This setup has the usual issues of loopback devices - what size this initial file should be, how to resize it live to increase/decrease storage etc. Not sure how well this performs either.

                                            robi 1 Reply Last reply Reply Quote 0
                                            • robi
                                              robi @girish last edited by

                                              @girish yep, or do a little parted scripting first to have a device backed partition avoiding loopback issues for a more static setup..

                                              wanna make changes? restore from remote backup.

                                              For a more dynamic setup integrate OpenEBS/MayaData so you can keep attaching additional extent layers or do virtual migrations to different sized container attached storage mounts.

                                              Life of Advanced Technology

                                              1 Reply Last reply Reply Quote 0
                                              • First post
                                                Last post
                                              Powered by NodeBB