Quota inside LXD containerInstall quota stuck on repquotalxc launch hangs for lxdStart a screen session inside LXD-managed containerUlimit for user asterisk inside an LXD containerLXD unable to start containerLXD container intial startup does not have an IP addresssRedhat container for LXDRunning LXD inside ViruozzoDisable IPv6 from boot inside LXD/LXC containerFailed container creation: LXD doesn't have a uid/gid allocation

Implement the Thanos sorting algorithm

How can we prove that any integral in the set of non-elementary integrals cannot be expressed in the form of elementary functions?

How do we know the LHC results are robust?

Two monoidal structures and copowering

Was Spock the First Vulcan in Starfleet?

CREATE opcode: what does it really do?

Term for the "extreme-extension" version of a straw man fallacy?

How does buying out courses with grant money work?

Crossing the line between justified force and brutality

How to Reset Passwords on Multiple Websites Easily?

Customer Requests (Sometimes) Drive Me Bonkers!

How did Doctor Strange see the winning outcome in Avengers: Infinity War?

What is the difference between "behavior" and "behaviour"?

How do I extract a value from a time formatted value in excel?

Avoiding estate tax by giving multiple gifts

Risk of infection at the gym?

What is paid subscription needed for in Mortal Kombat 11?

How to run a prison with the smallest amount of guards?

Opposite of a diet

How to check is there any negative term in a large list?

Why Were Madagascar and New Zealand Discovered So Late?

How do scammers retract money, while you can’t?

Is expanding the research of a group into machine learning as a PhD student risky?

Tiptoe or tiphoof? Adjusting words to better fit fantasy races



Quota inside LXD container


Install quota stuck on repquotalxc launch hangs for lxdStart a screen session inside LXD-managed containerUlimit for user asterisk inside an LXD containerLXD unable to start containerLXD container intial startup does not have an IP addresssRedhat container for LXDRunning LXD inside ViruozzoDisable IPv6 from boot inside LXD/LXC containerFailed container creation: LXD doesn't have a uid/gid allocation













0















I want to enable quota inside LXD container so as to limit each user to 10GB storage. However I got the following error:



root@test:~# quotacheck -avug
quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.


How to enable quota inside LXD container?



Below is my host configuration:



$ lxc config show test
architecture: x86_64
config:
raw.lxc: lxc.rootfs.options=usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0
security.privileged: "true"
volatile.base_image: 08bbf441bb737097586e9f313b239cecbba96222e58457881b3718c45c17e074
volatile.eth0.hwaddr: 00:16:3e:d3:ab:f7
volatile.idmap.base: "0"
volatile.idmap.next: '[]'
volatile.last_state.idmap: '[]'
volatile.last_state.power: RUNNING
devices:
root:
path: /
type: disk
ephemeral: false
profiles:
- default
stateful: false
description: ""

$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"
NAME="Ubuntu"
VERSION="16.04.4 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.4 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial


Below is my container configuration:



root@test:~# cat /etc/fstab 
LABEL=cloudimg-rootfs / ext4 defaults 0 0

root@test:~# cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"
NAME="Ubuntu"
VERSION="16.04.4 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.4 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial









share|improve this question
























  • " or filesystem not mounted with quota option." Is that not enough to go on for you?

    – Rinzwind
    Jun 2 '18 at 18:15











  • I tried adding usrquota,grpquota as below but still got the same error. root@test:~# cat /etc/fstab LABEL=cloudimg-rootfs / ext4 defaults,usrquota,grpquota 0 0

    – Brooke Tsui
    Jun 3 '18 at 8:47
















0















I want to enable quota inside LXD container so as to limit each user to 10GB storage. However I got the following error:



root@test:~# quotacheck -avug
quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.


How to enable quota inside LXD container?



Below is my host configuration:



$ lxc config show test
architecture: x86_64
config:
raw.lxc: lxc.rootfs.options=usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0
security.privileged: "true"
volatile.base_image: 08bbf441bb737097586e9f313b239cecbba96222e58457881b3718c45c17e074
volatile.eth0.hwaddr: 00:16:3e:d3:ab:f7
volatile.idmap.base: "0"
volatile.idmap.next: '[]'
volatile.last_state.idmap: '[]'
volatile.last_state.power: RUNNING
devices:
root:
path: /
type: disk
ephemeral: false
profiles:
- default
stateful: false
description: ""

$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"
NAME="Ubuntu"
VERSION="16.04.4 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.4 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial


Below is my container configuration:



root@test:~# cat /etc/fstab 
LABEL=cloudimg-rootfs / ext4 defaults 0 0

root@test:~# cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"
NAME="Ubuntu"
VERSION="16.04.4 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.4 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial









share|improve this question
























  • " or filesystem not mounted with quota option." Is that not enough to go on for you?

    – Rinzwind
    Jun 2 '18 at 18:15











  • I tried adding usrquota,grpquota as below but still got the same error. root@test:~# cat /etc/fstab LABEL=cloudimg-rootfs / ext4 defaults,usrquota,grpquota 0 0

    – Brooke Tsui
    Jun 3 '18 at 8:47














0












0








0








I want to enable quota inside LXD container so as to limit each user to 10GB storage. However I got the following error:



root@test:~# quotacheck -avug
quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.


How to enable quota inside LXD container?



Below is my host configuration:



$ lxc config show test
architecture: x86_64
config:
raw.lxc: lxc.rootfs.options=usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0
security.privileged: "true"
volatile.base_image: 08bbf441bb737097586e9f313b239cecbba96222e58457881b3718c45c17e074
volatile.eth0.hwaddr: 00:16:3e:d3:ab:f7
volatile.idmap.base: "0"
volatile.idmap.next: '[]'
volatile.last_state.idmap: '[]'
volatile.last_state.power: RUNNING
devices:
root:
path: /
type: disk
ephemeral: false
profiles:
- default
stateful: false
description: ""

$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"
NAME="Ubuntu"
VERSION="16.04.4 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.4 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial


Below is my container configuration:



root@test:~# cat /etc/fstab 
LABEL=cloudimg-rootfs / ext4 defaults 0 0

root@test:~# cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"
NAME="Ubuntu"
VERSION="16.04.4 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.4 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial









share|improve this question
















I want to enable quota inside LXD container so as to limit each user to 10GB storage. However I got the following error:



root@test:~# quotacheck -avug
quotacheck: Cannot find filesystem to check or filesystem not mounted with quota option.


How to enable quota inside LXD container?



Below is my host configuration:



$ lxc config show test
architecture: x86_64
config:
raw.lxc: lxc.rootfs.options=usrjquota=aquota.user,grpjquota=aquota.group,jqfmt=vfsv0
security.privileged: "true"
volatile.base_image: 08bbf441bb737097586e9f313b239cecbba96222e58457881b3718c45c17e074
volatile.eth0.hwaddr: 00:16:3e:d3:ab:f7
volatile.idmap.base: "0"
volatile.idmap.next: '[]'
volatile.last_state.idmap: '[]'
volatile.last_state.power: RUNNING
devices:
root:
path: /
type: disk
ephemeral: false
profiles:
- default
stateful: false
description: ""

$ cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"
NAME="Ubuntu"
VERSION="16.04.4 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.4 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial


Below is my container configuration:



root@test:~# cat /etc/fstab 
LABEL=cloudimg-rootfs / ext4 defaults 0 0

root@test:~# cat /etc/*release
DISTRIB_ID=Ubuntu
DISTRIB_RELEASE=16.04
DISTRIB_CODENAME=xenial
DISTRIB_DESCRIPTION="Ubuntu 16.04.4 LTS"
NAME="Ubuntu"
VERSION="16.04.4 LTS (Xenial Xerus)"
ID=ubuntu
ID_LIKE=debian
PRETTY_NAME="Ubuntu 16.04.4 LTS"
VERSION_ID="16.04"
HOME_URL="http://www.ubuntu.com/"
SUPPORT_URL="http://help.ubuntu.com/"
BUG_REPORT_URL="http://bugs.launchpad.net/ubuntu/"
VERSION_CODENAME=xenial
UBUNTU_CODENAME=xenial






lxd quota






share|improve this question















share|improve this question













share|improve this question




share|improve this question








edited Jun 2 '18 at 19:54









L.F.C.

3283618




3283618










asked Jun 2 '18 at 15:39









Brooke TsuiBrooke Tsui

11




11












  • " or filesystem not mounted with quota option." Is that not enough to go on for you?

    – Rinzwind
    Jun 2 '18 at 18:15











  • I tried adding usrquota,grpquota as below but still got the same error. root@test:~# cat /etc/fstab LABEL=cloudimg-rootfs / ext4 defaults,usrquota,grpquota 0 0

    – Brooke Tsui
    Jun 3 '18 at 8:47


















  • " or filesystem not mounted with quota option." Is that not enough to go on for you?

    – Rinzwind
    Jun 2 '18 at 18:15











  • I tried adding usrquota,grpquota as below but still got the same error. root@test:~# cat /etc/fstab LABEL=cloudimg-rootfs / ext4 defaults,usrquota,grpquota 0 0

    – Brooke Tsui
    Jun 3 '18 at 8:47

















" or filesystem not mounted with quota option." Is that not enough to go on for you?

– Rinzwind
Jun 2 '18 at 18:15





" or filesystem not mounted with quota option." Is that not enough to go on for you?

– Rinzwind
Jun 2 '18 at 18:15













I tried adding usrquota,grpquota as below but still got the same error. root@test:~# cat /etc/fstab LABEL=cloudimg-rootfs / ext4 defaults,usrquota,grpquota 0 0

– Brooke Tsui
Jun 3 '18 at 8:47






I tried adding usrquota,grpquota as below but still got the same error. root@test:~# cat /etc/fstab LABEL=cloudimg-rootfs / ext4 defaults,usrquota,grpquota 0 0

– Brooke Tsui
Jun 3 '18 at 8:47











2 Answers
2






active

oldest

votes


















0














You should select zfs or btrfs as storage backend in the initialization of LXD to support disk quota. Other storage backends don't support quota.






share|improve this answer























  • I was using ZFS as show below. $ lxc info config: storage.zfs_pool_name: lxd api_extensions: - id_map - id_map_base - resource_limits api_status: stable api_version: "1.0" auth: trusted auth_methods: [] public: false environment: addresses: [] architectures: - x86_64 - i686 driver: lxc driver_version: 2.0.8 kernel: Linux kernel_architecture: x86_64 kernel_version: 4.4.0-130-generic server: lxd server_pid: 2661 server_version: 2.0.11 storage: zfs storage_version: "5"

    – Brooke Tsui
    Jul 4 '18 at 14:59



















0














I have been looking all around having myself the same issue. Here is what I ended with.



The filesystem supported features are in the doc



So, the only way to have quotas support from inside the container is using BTRFS, which I personally don't wanna to use.



On ZFS you can only set quota from the host, not from the guest, because ZFS support in LXD doesn't check the "Storage driver usable inside a container" box. There an issue about it.
Regarding users and groups quotas set from the host. I haven't tested and wonder how it is supported and if it may need UID/GID mapping from guest to host. No sure about that though.



On ZFS, ZVOL do exist and can be formatted as ext4, they are seen as a standard block device from the guest side, and thus can be used for standard linux quotas. But those cannot be used for rootfs, see the issue on GitHub. You can still mount it in areas that have users data to check against quotas (eg. /home, /var).



Then there is libvirt virtualization over ZFS ZVOLs, which is slower but just works as expected regarding linux quotas.



As an advice, always make your ZVOLs at minimum needed size as it is much easier to expand than to shrink, the later requiring downtime.






share|improve this answer






















    Your Answer








    StackExchange.ready(function()
    var channelOptions =
    tags: "".split(" "),
    id: "89"
    ;
    initTagRenderer("".split(" "), "".split(" "), channelOptions);

    StackExchange.using("externalEditor", function()
    // Have to fire editor after snippets, if snippets enabled
    if (StackExchange.settings.snippets.snippetsEnabled)
    StackExchange.using("snippets", function()
    createEditor();
    );

    else
    createEditor();

    );

    function createEditor()
    StackExchange.prepareEditor(
    heartbeatType: 'answer',
    autoActivateHeartbeat: false,
    convertImagesToLinks: true,
    noModals: true,
    showLowRepImageUploadWarning: true,
    reputationToPostImages: 10,
    bindNavPrevention: true,
    postfix: "",
    imageUploader:
    brandingHtml: "Powered by u003ca class="icon-imgur-white" href="https://imgur.com/"u003eu003c/au003e",
    contentPolicyHtml: "User contributions licensed under u003ca href="https://creativecommons.org/licenses/by-sa/3.0/"u003ecc by-sa 3.0 with attribution requiredu003c/au003e u003ca href="https://stackoverflow.com/legal/content-policy"u003e(content policy)u003c/au003e",
    allowUrls: true
    ,
    onDemand: true,
    discardSelector: ".discard-answer"
    ,immediatelyShowMarkdownHelp:true
    );



    );













    draft saved

    draft discarded


















    StackExchange.ready(
    function ()
    StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1042963%2fquota-inside-lxd-container%23new-answer', 'question_page');

    );

    Post as a guest















    Required, but never shown

























    2 Answers
    2






    active

    oldest

    votes








    2 Answers
    2






    active

    oldest

    votes









    active

    oldest

    votes






    active

    oldest

    votes









    0














    You should select zfs or btrfs as storage backend in the initialization of LXD to support disk quota. Other storage backends don't support quota.






    share|improve this answer























    • I was using ZFS as show below. $ lxc info config: storage.zfs_pool_name: lxd api_extensions: - id_map - id_map_base - resource_limits api_status: stable api_version: "1.0" auth: trusted auth_methods: [] public: false environment: addresses: [] architectures: - x86_64 - i686 driver: lxc driver_version: 2.0.8 kernel: Linux kernel_architecture: x86_64 kernel_version: 4.4.0-130-generic server: lxd server_pid: 2661 server_version: 2.0.11 storage: zfs storage_version: "5"

      – Brooke Tsui
      Jul 4 '18 at 14:59
















    0














    You should select zfs or btrfs as storage backend in the initialization of LXD to support disk quota. Other storage backends don't support quota.






    share|improve this answer























    • I was using ZFS as show below. $ lxc info config: storage.zfs_pool_name: lxd api_extensions: - id_map - id_map_base - resource_limits api_status: stable api_version: "1.0" auth: trusted auth_methods: [] public: false environment: addresses: [] architectures: - x86_64 - i686 driver: lxc driver_version: 2.0.8 kernel: Linux kernel_architecture: x86_64 kernel_version: 4.4.0-130-generic server: lxd server_pid: 2661 server_version: 2.0.11 storage: zfs storage_version: "5"

      – Brooke Tsui
      Jul 4 '18 at 14:59














    0












    0








    0







    You should select zfs or btrfs as storage backend in the initialization of LXD to support disk quota. Other storage backends don't support quota.






    share|improve this answer













    You should select zfs or btrfs as storage backend in the initialization of LXD to support disk quota. Other storage backends don't support quota.







    share|improve this answer












    share|improve this answer



    share|improve this answer










    answered Jul 3 '18 at 10:48









    Vahid AmintabarVahid Amintabar

    465




    465












    • I was using ZFS as show below. $ lxc info config: storage.zfs_pool_name: lxd api_extensions: - id_map - id_map_base - resource_limits api_status: stable api_version: "1.0" auth: trusted auth_methods: [] public: false environment: addresses: [] architectures: - x86_64 - i686 driver: lxc driver_version: 2.0.8 kernel: Linux kernel_architecture: x86_64 kernel_version: 4.4.0-130-generic server: lxd server_pid: 2661 server_version: 2.0.11 storage: zfs storage_version: "5"

      – Brooke Tsui
      Jul 4 '18 at 14:59


















    • I was using ZFS as show below. $ lxc info config: storage.zfs_pool_name: lxd api_extensions: - id_map - id_map_base - resource_limits api_status: stable api_version: "1.0" auth: trusted auth_methods: [] public: false environment: addresses: [] architectures: - x86_64 - i686 driver: lxc driver_version: 2.0.8 kernel: Linux kernel_architecture: x86_64 kernel_version: 4.4.0-130-generic server: lxd server_pid: 2661 server_version: 2.0.11 storage: zfs storage_version: "5"

      – Brooke Tsui
      Jul 4 '18 at 14:59

















    I was using ZFS as show below. $ lxc info config: storage.zfs_pool_name: lxd api_extensions: - id_map - id_map_base - resource_limits api_status: stable api_version: "1.0" auth: trusted auth_methods: [] public: false environment: addresses: [] architectures: - x86_64 - i686 driver: lxc driver_version: 2.0.8 kernel: Linux kernel_architecture: x86_64 kernel_version: 4.4.0-130-generic server: lxd server_pid: 2661 server_version: 2.0.11 storage: zfs storage_version: "5"

    – Brooke Tsui
    Jul 4 '18 at 14:59






    I was using ZFS as show below. $ lxc info config: storage.zfs_pool_name: lxd api_extensions: - id_map - id_map_base - resource_limits api_status: stable api_version: "1.0" auth: trusted auth_methods: [] public: false environment: addresses: [] architectures: - x86_64 - i686 driver: lxc driver_version: 2.0.8 kernel: Linux kernel_architecture: x86_64 kernel_version: 4.4.0-130-generic server: lxd server_pid: 2661 server_version: 2.0.11 storage: zfs storage_version: "5"

    – Brooke Tsui
    Jul 4 '18 at 14:59














    0














    I have been looking all around having myself the same issue. Here is what I ended with.



    The filesystem supported features are in the doc



    So, the only way to have quotas support from inside the container is using BTRFS, which I personally don't wanna to use.



    On ZFS you can only set quota from the host, not from the guest, because ZFS support in LXD doesn't check the "Storage driver usable inside a container" box. There an issue about it.
    Regarding users and groups quotas set from the host. I haven't tested and wonder how it is supported and if it may need UID/GID mapping from guest to host. No sure about that though.



    On ZFS, ZVOL do exist and can be formatted as ext4, they are seen as a standard block device from the guest side, and thus can be used for standard linux quotas. But those cannot be used for rootfs, see the issue on GitHub. You can still mount it in areas that have users data to check against quotas (eg. /home, /var).



    Then there is libvirt virtualization over ZFS ZVOLs, which is slower but just works as expected regarding linux quotas.



    As an advice, always make your ZVOLs at minimum needed size as it is much easier to expand than to shrink, the later requiring downtime.






    share|improve this answer



























      0














      I have been looking all around having myself the same issue. Here is what I ended with.



      The filesystem supported features are in the doc



      So, the only way to have quotas support from inside the container is using BTRFS, which I personally don't wanna to use.



      On ZFS you can only set quota from the host, not from the guest, because ZFS support in LXD doesn't check the "Storage driver usable inside a container" box. There an issue about it.
      Regarding users and groups quotas set from the host. I haven't tested and wonder how it is supported and if it may need UID/GID mapping from guest to host. No sure about that though.



      On ZFS, ZVOL do exist and can be formatted as ext4, they are seen as a standard block device from the guest side, and thus can be used for standard linux quotas. But those cannot be used for rootfs, see the issue on GitHub. You can still mount it in areas that have users data to check against quotas (eg. /home, /var).



      Then there is libvirt virtualization over ZFS ZVOLs, which is slower but just works as expected regarding linux quotas.



      As an advice, always make your ZVOLs at minimum needed size as it is much easier to expand than to shrink, the later requiring downtime.






      share|improve this answer

























        0












        0








        0







        I have been looking all around having myself the same issue. Here is what I ended with.



        The filesystem supported features are in the doc



        So, the only way to have quotas support from inside the container is using BTRFS, which I personally don't wanna to use.



        On ZFS you can only set quota from the host, not from the guest, because ZFS support in LXD doesn't check the "Storage driver usable inside a container" box. There an issue about it.
        Regarding users and groups quotas set from the host. I haven't tested and wonder how it is supported and if it may need UID/GID mapping from guest to host. No sure about that though.



        On ZFS, ZVOL do exist and can be formatted as ext4, they are seen as a standard block device from the guest side, and thus can be used for standard linux quotas. But those cannot be used for rootfs, see the issue on GitHub. You can still mount it in areas that have users data to check against quotas (eg. /home, /var).



        Then there is libvirt virtualization over ZFS ZVOLs, which is slower but just works as expected regarding linux quotas.



        As an advice, always make your ZVOLs at minimum needed size as it is much easier to expand than to shrink, the later requiring downtime.






        share|improve this answer













        I have been looking all around having myself the same issue. Here is what I ended with.



        The filesystem supported features are in the doc



        So, the only way to have quotas support from inside the container is using BTRFS, which I personally don't wanna to use.



        On ZFS you can only set quota from the host, not from the guest, because ZFS support in LXD doesn't check the "Storage driver usable inside a container" box. There an issue about it.
        Regarding users and groups quotas set from the host. I haven't tested and wonder how it is supported and if it may need UID/GID mapping from guest to host. No sure about that though.



        On ZFS, ZVOL do exist and can be formatted as ext4, they are seen as a standard block device from the guest side, and thus can be used for standard linux quotas. But those cannot be used for rootfs, see the issue on GitHub. You can still mount it in areas that have users data to check against quotas (eg. /home, /var).



        Then there is libvirt virtualization over ZFS ZVOLs, which is slower but just works as expected regarding linux quotas.



        As an advice, always make your ZVOLs at minimum needed size as it is much easier to expand than to shrink, the later requiring downtime.







        share|improve this answer












        share|improve this answer



        share|improve this answer










        answered 20 mins ago









        LaurentLaurent

        2131215




        2131215



























            draft saved

            draft discarded
















































            Thanks for contributing an answer to Ask Ubuntu!


            • Please be sure to answer the question. Provide details and share your research!

            But avoid


            • Asking for help, clarification, or responding to other answers.

            • Making statements based on opinion; back them up with references or personal experience.

            To learn more, see our tips on writing great answers.




            draft saved


            draft discarded














            StackExchange.ready(
            function ()
            StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2faskubuntu.com%2fquestions%2f1042963%2fquota-inside-lxd-container%23new-answer', 'question_page');

            );

            Post as a guest















            Required, but never shown





















































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown

































            Required, but never shown














            Required, but never shown












            Required, but never shown







            Required, but never shown







            Popular posts from this blog

            Are there any comparative studies done between Ashtavakra Gita and Buddhim?How is it wrong to believe that a self exists, or that it doesn't?Can you criticise or improve Ven. Bodhi's description of MahayanaWas the doctrine of 'Anatta', accepted as doctrine by modern Buddhism, actually taught by the Buddha?Relationship between Buddhism, Hinduism and Yoga?Comparison of Nirvana, Tao and Brahman/AtmaIs there a distinction between “ego identity” and “craving/hating”?Are there many differences between Taoism and Buddhism?Loss of “faith” in buddhismSimilarity between creation in Abrahamic religions and beginning of life in Earth mentioned Agganna Sutta?Are there studies about the difference between meditating in the morning versus in the evening?Can one follow Hinduism and Buddhism at the same time?Are there any prohibitions on participating in other religion's practices?Psychology of 'flow'

            What to do with chalk when deepwater soloing? Announcing the arrival of Valued Associate #679: Cesar Manara Planned maintenance scheduled April 17/18, 2019 at 00:00UTC (8:00pm US/Eastern) Photo Competition: April - At Home in The Great OutdoorsIs it ok for my climbing shoes/chalk bag to get wet?What hand and finger exercises help with climbing?Chalk: pure, plus drying agent, liquid?What can I do with a retired rope and harness?What to do with the lap coiled rope if the belayer wishes to lead consecutive pitches?How do to a safety knot when abseiling with 2 ropes?What are the advantages of being short when climbing?When should you start to train with Campus Boards, Hang Boards and Peg Boards?Climbing: fear/panic on boulder wallWith what specific techniques are various bouldering grades associated?What are the most important numerical features to look for when comparing climbing ropes?

            How to start Thunderbird minimized on start-up?How to run Thunderbird on startup, minimised?How to make Thunderbird Mail runs at startup?How do I start applications automatically on login?How can I delay a specific program on startup?How do I hide Thunderbird from the launcher while running?How to keep Thunderbird and Pidgin running on background?How to open Thunderbird minimised at startup in Ubuntu 16.04How to start Thunderbird minimized to Unity system tray on start-up?Minimize Thunderbird to Traythunderbird script to disable option: “delete message on server”Why is Thunderbird pegging a core at 100%?Thunderbird resets profile after second start upClearing out Thunderbird on UbuntuThunderbird and a shared “home” partitionBidirectionally synchronize Thunderbird profiles (POP3 mail accounts) between two computersWhy doesn't Ubuntu/Thunderbird save my PGP key?How to start Thunderbird minimized to Unity system tray on start-up?Recovering thunderbird files from quick formatted drive?