How to increase base device size per container?

The name of the pictureThe name of the pictureThe name of the pictureClash Royale CLAN TAG#URR8PPP











up vote
0
down vote

favorite












While building a container (the same happens when I just run the same commands inside a container) I've run into an error complaining about "no space left on device". I checked with df and confirmed that I have enough space. My OS is Arch Linux, here is output of docker info:



[mark@arch stackage-head]$ docker info
Containers: 0
Running: 0
Paused: 0
Stopped: 0
Images: 123
Server Version: 18.03.0-ce
Storage Driver: devicemapper
Pool Name: docker-8:3-5898903-pool
Pool Blocksize: 65.54kB
Base Device Size: 10.74GB
Backing Filesystem: xfs
Udev Sync Supported: true
Data file: /dev/loop0
Metadata file: /dev/loop1
Data loop file: /var/lib/docker/devicemapper/devicemapper/data
Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
Data Space Used: 45.27GB
Data Space Total: 107.4GB
Data Space Available: 56.87GB
Metadata Space Used: 36.01MB
Metadata Space Total: 2.147GB
Metadata Space Available: 2.111GB
Thin Pool Minimum Free Space: 10.74GB
Deferred Removal Enabled: true
Deferred Deletion Enabled: true
Deferred Deleted Device Count: 0
Library Version: 1.02.146 (2017-12-18)
Logging Driver: json-file
Cgroup Driver: cgroupfs
Plugins:
Volume: local
Network: bridge host macvlan null overlay
Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
Swarm: inactive
Runtimes: runc
Default Runtime: runc
Init Binary: docker-init
containerd version: cfd04396dc68220d1cecbe686a6cc3aa5ce3667c
runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
init version: 949e6fa
Security Options:
seccomp
Profile: default
Kernel Version: 4.15.11-1-ARCH
Operating System: Arch Linux
OSType: linux
Architecture: x86_64
CPUs: 8
Total Memory: 15.58GiB
Name: arch
ID: VKYM:3FM2:MAE7:SZPY:E4CR:6U6K:Z5SG:5A66:NEJT:K4MD:LN57:FBXM
Docker Root Dir: /var/lib/docker
Debug Mode (client): false
Debug Mode (server): false
Username: mrkkrp
Registry: https://index.docker.io/v1/
Labels:
Experimental: false
Insecure Registries:
127.0.0.0/8
Live Restore Enabled: false

WARNING: devicemapper: usage of loopback devices is strongly discouraged for production use.
Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.


I tried using the --storage-opt size=20G option but it fails like so:



[mark@arch stackage-head]$ docker run -it --storage-opt size=20G snoyberg/stackage:nightly bash
docker: Error response from daemon: Failed to grow rootfs:exit status 1:xfs_growfs: /dev/mapper/docker-8:3-5898903-3456c9ee1d5a83fc705125974101c89015562d0cc4c00bc5e1c97bd560dded6a-init is not a mounted XFS filesystem.
See 'docker run --help'.


As per the docs this should work.



I checked Arch Linux wiki, which has a relevant section:



  • https://wiki.archlinux.org/index.php/Docker#Failed_to_create_some.2Fpath.2Fto.2Ffile:_No_space_left_on_device

However I'm not sure how this applies to me because I don't have XFS filesystem mounted in /etc/fstab, as I understand devicemapper creates them as needed for containers.



A container cannot grow larger than this "base device size" so I tried to increase it in various ways.



  • With docker daemon --storage-opt dm.basesize=20G as per this oldish post. Alas, --storage-opt is reported as an unknown flag.


  • By passing --storage-opt dm.basesize=20G to docker run, but this time dm.basesize is reported as an unknown option.







share|improve this question
























    up vote
    0
    down vote

    favorite












    While building a container (the same happens when I just run the same commands inside a container) I've run into an error complaining about "no space left on device". I checked with df and confirmed that I have enough space. My OS is Arch Linux, here is output of docker info:



    [mark@arch stackage-head]$ docker info
    Containers: 0
    Running: 0
    Paused: 0
    Stopped: 0
    Images: 123
    Server Version: 18.03.0-ce
    Storage Driver: devicemapper
    Pool Name: docker-8:3-5898903-pool
    Pool Blocksize: 65.54kB
    Base Device Size: 10.74GB
    Backing Filesystem: xfs
    Udev Sync Supported: true
    Data file: /dev/loop0
    Metadata file: /dev/loop1
    Data loop file: /var/lib/docker/devicemapper/devicemapper/data
    Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
    Data Space Used: 45.27GB
    Data Space Total: 107.4GB
    Data Space Available: 56.87GB
    Metadata Space Used: 36.01MB
    Metadata Space Total: 2.147GB
    Metadata Space Available: 2.111GB
    Thin Pool Minimum Free Space: 10.74GB
    Deferred Removal Enabled: true
    Deferred Deletion Enabled: true
    Deferred Deleted Device Count: 0
    Library Version: 1.02.146 (2017-12-18)
    Logging Driver: json-file
    Cgroup Driver: cgroupfs
    Plugins:
    Volume: local
    Network: bridge host macvlan null overlay
    Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
    Swarm: inactive
    Runtimes: runc
    Default Runtime: runc
    Init Binary: docker-init
    containerd version: cfd04396dc68220d1cecbe686a6cc3aa5ce3667c
    runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
    init version: 949e6fa
    Security Options:
    seccomp
    Profile: default
    Kernel Version: 4.15.11-1-ARCH
    Operating System: Arch Linux
    OSType: linux
    Architecture: x86_64
    CPUs: 8
    Total Memory: 15.58GiB
    Name: arch
    ID: VKYM:3FM2:MAE7:SZPY:E4CR:6U6K:Z5SG:5A66:NEJT:K4MD:LN57:FBXM
    Docker Root Dir: /var/lib/docker
    Debug Mode (client): false
    Debug Mode (server): false
    Username: mrkkrp
    Registry: https://index.docker.io/v1/
    Labels:
    Experimental: false
    Insecure Registries:
    127.0.0.0/8
    Live Restore Enabled: false

    WARNING: devicemapper: usage of loopback devices is strongly discouraged for production use.
    Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.


    I tried using the --storage-opt size=20G option but it fails like so:



    [mark@arch stackage-head]$ docker run -it --storage-opt size=20G snoyberg/stackage:nightly bash
    docker: Error response from daemon: Failed to grow rootfs:exit status 1:xfs_growfs: /dev/mapper/docker-8:3-5898903-3456c9ee1d5a83fc705125974101c89015562d0cc4c00bc5e1c97bd560dded6a-init is not a mounted XFS filesystem.
    See 'docker run --help'.


    As per the docs this should work.



    I checked Arch Linux wiki, which has a relevant section:



    • https://wiki.archlinux.org/index.php/Docker#Failed_to_create_some.2Fpath.2Fto.2Ffile:_No_space_left_on_device

    However I'm not sure how this applies to me because I don't have XFS filesystem mounted in /etc/fstab, as I understand devicemapper creates them as needed for containers.



    A container cannot grow larger than this "base device size" so I tried to increase it in various ways.



    • With docker daemon --storage-opt dm.basesize=20G as per this oldish post. Alas, --storage-opt is reported as an unknown flag.


    • By passing --storage-opt dm.basesize=20G to docker run, but this time dm.basesize is reported as an unknown option.







    share|improve this question






















      up vote
      0
      down vote

      favorite









      up vote
      0
      down vote

      favorite











      While building a container (the same happens when I just run the same commands inside a container) I've run into an error complaining about "no space left on device". I checked with df and confirmed that I have enough space. My OS is Arch Linux, here is output of docker info:



      [mark@arch stackage-head]$ docker info
      Containers: 0
      Running: 0
      Paused: 0
      Stopped: 0
      Images: 123
      Server Version: 18.03.0-ce
      Storage Driver: devicemapper
      Pool Name: docker-8:3-5898903-pool
      Pool Blocksize: 65.54kB
      Base Device Size: 10.74GB
      Backing Filesystem: xfs
      Udev Sync Supported: true
      Data file: /dev/loop0
      Metadata file: /dev/loop1
      Data loop file: /var/lib/docker/devicemapper/devicemapper/data
      Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
      Data Space Used: 45.27GB
      Data Space Total: 107.4GB
      Data Space Available: 56.87GB
      Metadata Space Used: 36.01MB
      Metadata Space Total: 2.147GB
      Metadata Space Available: 2.111GB
      Thin Pool Minimum Free Space: 10.74GB
      Deferred Removal Enabled: true
      Deferred Deletion Enabled: true
      Deferred Deleted Device Count: 0
      Library Version: 1.02.146 (2017-12-18)
      Logging Driver: json-file
      Cgroup Driver: cgroupfs
      Plugins:
      Volume: local
      Network: bridge host macvlan null overlay
      Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
      Swarm: inactive
      Runtimes: runc
      Default Runtime: runc
      Init Binary: docker-init
      containerd version: cfd04396dc68220d1cecbe686a6cc3aa5ce3667c
      runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
      init version: 949e6fa
      Security Options:
      seccomp
      Profile: default
      Kernel Version: 4.15.11-1-ARCH
      Operating System: Arch Linux
      OSType: linux
      Architecture: x86_64
      CPUs: 8
      Total Memory: 15.58GiB
      Name: arch
      ID: VKYM:3FM2:MAE7:SZPY:E4CR:6U6K:Z5SG:5A66:NEJT:K4MD:LN57:FBXM
      Docker Root Dir: /var/lib/docker
      Debug Mode (client): false
      Debug Mode (server): false
      Username: mrkkrp
      Registry: https://index.docker.io/v1/
      Labels:
      Experimental: false
      Insecure Registries:
      127.0.0.0/8
      Live Restore Enabled: false

      WARNING: devicemapper: usage of loopback devices is strongly discouraged for production use.
      Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.


      I tried using the --storage-opt size=20G option but it fails like so:



      [mark@arch stackage-head]$ docker run -it --storage-opt size=20G snoyberg/stackage:nightly bash
      docker: Error response from daemon: Failed to grow rootfs:exit status 1:xfs_growfs: /dev/mapper/docker-8:3-5898903-3456c9ee1d5a83fc705125974101c89015562d0cc4c00bc5e1c97bd560dded6a-init is not a mounted XFS filesystem.
      See 'docker run --help'.


      As per the docs this should work.



      I checked Arch Linux wiki, which has a relevant section:



      • https://wiki.archlinux.org/index.php/Docker#Failed_to_create_some.2Fpath.2Fto.2Ffile:_No_space_left_on_device

      However I'm not sure how this applies to me because I don't have XFS filesystem mounted in /etc/fstab, as I understand devicemapper creates them as needed for containers.



      A container cannot grow larger than this "base device size" so I tried to increase it in various ways.



      • With docker daemon --storage-opt dm.basesize=20G as per this oldish post. Alas, --storage-opt is reported as an unknown flag.


      • By passing --storage-opt dm.basesize=20G to docker run, but this time dm.basesize is reported as an unknown option.







      share|improve this question












      While building a container (the same happens when I just run the same commands inside a container) I've run into an error complaining about "no space left on device". I checked with df and confirmed that I have enough space. My OS is Arch Linux, here is output of docker info:



      [mark@arch stackage-head]$ docker info
      Containers: 0
      Running: 0
      Paused: 0
      Stopped: 0
      Images: 123
      Server Version: 18.03.0-ce
      Storage Driver: devicemapper
      Pool Name: docker-8:3-5898903-pool
      Pool Blocksize: 65.54kB
      Base Device Size: 10.74GB
      Backing Filesystem: xfs
      Udev Sync Supported: true
      Data file: /dev/loop0
      Metadata file: /dev/loop1
      Data loop file: /var/lib/docker/devicemapper/devicemapper/data
      Metadata loop file: /var/lib/docker/devicemapper/devicemapper/metadata
      Data Space Used: 45.27GB
      Data Space Total: 107.4GB
      Data Space Available: 56.87GB
      Metadata Space Used: 36.01MB
      Metadata Space Total: 2.147GB
      Metadata Space Available: 2.111GB
      Thin Pool Minimum Free Space: 10.74GB
      Deferred Removal Enabled: true
      Deferred Deletion Enabled: true
      Deferred Deleted Device Count: 0
      Library Version: 1.02.146 (2017-12-18)
      Logging Driver: json-file
      Cgroup Driver: cgroupfs
      Plugins:
      Volume: local
      Network: bridge host macvlan null overlay
      Log: awslogs fluentd gcplogs gelf journald json-file logentries splunk syslog
      Swarm: inactive
      Runtimes: runc
      Default Runtime: runc
      Init Binary: docker-init
      containerd version: cfd04396dc68220d1cecbe686a6cc3aa5ce3667c
      runc version: 4fc53a81fb7c994640722ac585fa9ca548971871
      init version: 949e6fa
      Security Options:
      seccomp
      Profile: default
      Kernel Version: 4.15.11-1-ARCH
      Operating System: Arch Linux
      OSType: linux
      Architecture: x86_64
      CPUs: 8
      Total Memory: 15.58GiB
      Name: arch
      ID: VKYM:3FM2:MAE7:SZPY:E4CR:6U6K:Z5SG:5A66:NEJT:K4MD:LN57:FBXM
      Docker Root Dir: /var/lib/docker
      Debug Mode (client): false
      Debug Mode (server): false
      Username: mrkkrp
      Registry: https://index.docker.io/v1/
      Labels:
      Experimental: false
      Insecure Registries:
      127.0.0.0/8
      Live Restore Enabled: false

      WARNING: devicemapper: usage of loopback devices is strongly discouraged for production use.
      Use `--storage-opt dm.thinpooldev` to specify a custom block storage device.


      I tried using the --storage-opt size=20G option but it fails like so:



      [mark@arch stackage-head]$ docker run -it --storage-opt size=20G snoyberg/stackage:nightly bash
      docker: Error response from daemon: Failed to grow rootfs:exit status 1:xfs_growfs: /dev/mapper/docker-8:3-5898903-3456c9ee1d5a83fc705125974101c89015562d0cc4c00bc5e1c97bd560dded6a-init is not a mounted XFS filesystem.
      See 'docker run --help'.


      As per the docs this should work.



      I checked Arch Linux wiki, which has a relevant section:



      • https://wiki.archlinux.org/index.php/Docker#Failed_to_create_some.2Fpath.2Fto.2Ffile:_No_space_left_on_device

      However I'm not sure how this applies to me because I don't have XFS filesystem mounted in /etc/fstab, as I understand devicemapper creates them as needed for containers.



      A container cannot grow larger than this "base device size" so I tried to increase it in various ways.



      • With docker daemon --storage-opt dm.basesize=20G as per this oldish post. Alas, --storage-opt is reported as an unknown flag.


      • By passing --storage-opt dm.basesize=20G to docker run, but this time dm.basesize is reported as an unknown option.









      share|improve this question











      share|improve this question




      share|improve this question










      asked Apr 2 at 9:55









      Mark

      14319




      14319

























          active

          oldest

          votes











          Your Answer







          StackExchange.ready(function()
          var channelOptions =
          tags: "".split(" "),
          id: "106"
          ;
          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',
          convertImagesToLinks: false,
          noModals: false,
          showLowRepImageUploadWarning: true,
          reputationToPostImages: null,
          bindNavPrevention: true,
          postfix: "",
          onDemand: true,
          discardSelector: ".discard-answer"
          ,immediatelyShowMarkdownHelp:true
          );



          );








           

          draft saved


          draft discarded


















          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f435011%2fhow-to-increase-base-device-size-per-container%23new-answer', 'question_page');

          );

          Post as a guest



































          active

          oldest

          votes













          active

          oldest

          votes









          active

          oldest

          votes






          active

          oldest

          votes










           

          draft saved


          draft discarded


























           


          draft saved


          draft discarded














          StackExchange.ready(
          function ()
          StackExchange.openid.initPostLogin('.new-post-login', 'https%3a%2f%2funix.stackexchange.com%2fquestions%2f435011%2fhow-to-increase-base-device-size-per-container%23new-answer', 'question_page');

          );

          Post as a guest













































































          Popular posts from this blog

          How to check contact read email or not when send email to Individual?

          Bahrain

          Postfix configuration issue with fips on centos 7; mailgun relay