-
Notifications
You must be signed in to change notification settings - Fork 18.7k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
daemon option (--storage-opt dm.basesize) for increasing the base device size on daemon restart #19123
daemon option (--storage-opt dm.basesize) for increasing the base device size on daemon restart #19123
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -271,12 +271,22 @@ Example use: `docker daemon --storage-opt dm.thinpooldev=/dev/mapper/thin-pool` | |
#### dm.basesize | ||
|
||
Specifies the size to use when creating the base device, which limits | ||
the size of images and containers. The default value is 100G. Note, | ||
thin devices are inherently "sparse", so a 100G device which is mostly | ||
empty doesn't use 100 GB of space on the pool. However, the filesystem | ||
the size of images and containers. The default value is 10G. Note, | ||
thin devices are inherently "sparse", so a 10G device which is mostly | ||
empty doesn't use 10 GB of space on the pool. However, the filesystem | ||
will use more space for base images the larger the device | ||
is. | ||
|
||
The base device size can be increased at daemon restart which will allow | ||
all future images and containers (based on those new images) to be of the | ||
new base device size. | ||
|
||
Example use: `docker daemon --storage-opt dm.basesize=50G` | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. As above There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @shishir-a412ed looks like you forgot to address this one? Can you change this to: Example use:
docker daemon --storage-opt dm.basesize=50G There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. ping @shishir-a412ed can you fix this one, then we are ready to go There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @thaJeztah This is in sync with other examples below. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. @shishir-a412ed fair, alright, lets keep it like this then 👍 |
||
|
||
This will increase the base device size to 50G. The Docker daemon will throw an | ||
error if existing base device size is larger than 50G. A user can use | ||
this option to expand the base device size however shrinking is not permitted. | ||
|
||
This value affects the system-wide "base" empty filesystem that may already | ||
be initialized and inherited by pulled images. Typically, a change to this | ||
value requires additional steps to take effect: | ||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
is this path always valid? can users override it somehow? we should take that into account.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't think we should allow users to change this. This directory is only needed since you have to actually mount the device in order to expand it. So we need to temporarily mount the device.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
agreed that it should not be user configurable. I am wondering why not create a directory say
tmpmnt
in devmapper graph driver directory itself. Say/var/lib/docker/devicemapper/mnt/tmpmnt
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@rhatdan what do you think of mounting at
/var/lib/docker/devicemapper/mnt/tmpmnt
(what @rhvgoyal suggested) ?There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't care, I am just not sure why it matters other then the mount point is not available to non privileged users.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I thought it is simpler. We don't have to create another directory inside /run. Also I am not sure if all the systems where docker runs have /run or not. And also not sure why there is a need for unprivileged users to be able to see this temporary mount point.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There is definitely no reason for non privileged users to see this. /run is a standard, that all distributions use, but I don't really care where we put it as long as it is not /tmp/