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

            Möglingen Índice Localización Historia Demografía Referencias Enlaces externos Menú de navegación48°53′18″N 9°07′45″E / 48.888333333333, 9.129166666666748°53′18″N 9°07′45″E / 48.888333333333, 9.1291666666667Sitio web oficial Mapa de Möglingen«Gemeinden in Deutschland nach Fläche, Bevölkerung und Postleitzahl am 30.09.2016»Möglingen

            Virtualbox - Configuration error: Querying “UUID” failed (VERR_CFGM_VALUE_NOT_FOUND)“VERR_SUPLIB_WORLD_WRITABLE” error when trying to installing OS in virtualboxVirtual Box Kernel errorFailed to open a seesion for the virtual machineFailed to open a session for the virtual machineUbuntu 14.04 LTS Virtualbox errorcan't use VM VirtualBoxusing virtualboxI can't run Linux-64 Bit on VirtualBoxUnable to insert the virtual optical disk (VBoxguestaddition) in virtual machine for ubuntu server in win 10VirtuaBox in Ubuntu 18.04 Issues with Win10.ISO Installation

            Antonio De Lisio Carrera Referencias Menú de navegación«Caracas: evolución relacional multipleja»«Cuando los gobiernos subestiman a las localidades: L a Iniciativa para la Integración de la Infraestructura Regional Suramericana (IIRSA) en la frontera Colombo-Venezolana»«Maestría en Planificación Integral del Ambiente»«La Metrópoli Caraqueña: Expansión Simplificadora o Articulación Diversificante»«La Metrópoli Caraqueña: Expansión Simplificadora o Articulación Diversificante»«Conózcanos»«Caracas: evolución relacional multipleja»«La Metrópoli Caraqueña: Expansión Simplificadora o Articulación Diversificante»