increase docker img space ?


Recommended Posts

Have 15 gb made from the beginning but now sab doesn't want to start cause i am out of space

the thingie says i am using 15 gb from the 15 gb available

 

root@R2D2:~# btrfs fi df /var/lib/docker

Data, single: total=12.97GiB, used=12.97GiB

System, DUP: total=8.00MiB, used=16.00KiB

System, single: total=4.00MiB, used=0.00

Metadata, DUP: total=1.00GiB, used=315.86MiB

Metadata, single: total=8.00MiB, used=0.00

unknown, single: total=112.00MiB, used=48.00KiB

root@R2D2:~#  btrfs fi show /dev/loop8

Label: none  uuid: a387e807-27ce-4713-99ae-57c856f74c02

        Total devices 1 FS bytes used 13.28GiB

        devid    1 size 15.00GiB used 15.00GiB path /dev/loop8

 

Btrfs v3.16

root@R2D2:~# df /var/lib/docker

Filesystem    1K-blocks    Used Available Use% Mounted on

/dev/loop8      15728640 14249724        4 100% /var/lib/docker

 

so i would like to increase the space with 5gb ...

 

searched all over but can't figure out how to do this ....

 

so please how is this done ?

Link to comment

Recently had the same problem and couldnt see a guide to expand the docker.image.

 

I stopped containers, stopped docker, deleted the docker image and rebuilt with more space.

As most of my dockers were my-templates - it was easy to rebuild as the data was stored outside of the docker.image.

Link to comment

>:(

well i ended up doing same as above ...

i think let's reboot my unraid maybe btrfs will have cleaned up some stuff after a reboot.....

behold my dissapointment when docker didn't even want to start any more

and no specific errors in the logs either why docker didn't want to start  :(

 

so i renamed the docker.img to dockerold.img

put the size to 25gb in the gui and rebooted unraid

after that docker started an i had 25gb disk image

just redid all the templates and everything up and running again ...

 

took only a few hours to do but there should be an easier solution not ?

 

i also tried the resize thing  but on /var/lib/docker and got an error message telling me that the size is too big

 

 

 

 

Link to comment

New one on me. At a guess this might have blasted your old img, created a new one and redonwloaded all the docker images.

 

But we should confirm this because if you are right it would be brilliant

 

confirmed, i didnt dream it :-), just created a new docker image 1GB in size, started, allowed it to generate the file, stopped docker, changed size to 5GB, started and size of img is now 5GB :-)

Link to comment

did you try that with existing dockers installed ?

are they still there ?

cause what NAS was suggesting is ok my 20gb was there with dockers

but when you change the size in the gui

would it not delete the existing 20gb with dockers and make a new image from 25gb without the dockers there any more ?

 

ok i can simulate that, one sec....

 

ok i created a new docker image (5GB)

pulled down a docker image and created container by running

stopped docker

increased size in ui

started docker

 

i could see the docker container there and i could successfully start it no problems, so in short, yes it did in my experiment keep the docker containers/images - kudos to limetech :-)

 

If your worried about doing the above then stop docker, copy your current IMG file with another name then try the expand, if it goes tits up then stop docker, delete current IMG file and rename your backup and start docker to get back to where you were :-) simplez

 

Link to comment

;D

 

great job...

somebody should add that to the wiki ... or a sticky somewhere ....

never thought about the easy solution LOL

 

to be honest the newbies are ahead of us more experienced types here, as they will try the gui first and then ask on the forum, whereas we assume it cant be as easy as clicking on the ui and thus get all geeky and start dropping to cli :-), lesson learned for myself is try to trust the ui a bit more as this is where unraid is heading towards less cli and more web interface, and very much rightly so too in my opinion!.

Link to comment
  • 11 months later...

I know this is an old post but it's the method I tried to use to enlarge my docker image, when I did this I had several dockers that vanished, and when I leave basic view I show a bunch of abandoned containers.  Any idea what would be the cause of this happening?

Link to comment

I know this is an old post but it's the method I tried to use to enlarge my docker image, when I did this I had several dockers that vanished, and when I leave basic view I show a bunch of abandoned containers.  Any idea what would be the cause of this happening?

What exactly did you do?  The proper way nowadays would be to just stop docker, then change the size of the image in the GUI, then restart docker.

 

Since it sounds like the the image might be corrupted somehow, you're probably best off starting a new docker image file, and re-adding your containers using the AddContainer and my* templates to get back in business.

Link to comment

well that's what I did, was stop docker, change the size, restart.  That's when things hit the fan, I think it was out of space for some reason and that's what corrupted the containers, I've been removing them and re-adding to get them working using the templates and since everything was stored elsewhere on the array it seems to be working ok so far.

Link to comment

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.