Skip to content
This repository has been archived by the owner on Feb 8, 2021. It is now read-only.

feature request: configurable disk space #663

Open
minzcmu opened this issue Sep 27, 2017 · 9 comments
Open

feature request: configurable disk space #663

minzcmu opened this issue Sep 27, 2017 · 9 comments

Comments

@minzcmu
Copy link
Contributor

minzcmu commented Sep 27, 2017

Hi,

Currently, under resources, we can only configure vcpu and memory. I found that by default the disk space allocated is 10G. Do your team have any plan to make disk space also configurable?

Is it setting here? https://github.com/hyperhq/hyperd/blob/master/storage/defaults.go#L5

https://docs.hypercontainer.io/reference/podfile.html

@minzcmu
Copy link
Contributor Author

minzcmu commented Sep 29, 2017

@gnawux Hi, can you help with the issue or point me to someone who knows about it? Thanks!

@gnawux
Copy link
Member

gnawux commented Sep 29, 2017

@minz1027 the DEFAULT_DM_VOL_SIZE is the default value in case:

  • devicemapper is chosen as the storage driver
  • need create a volume by the daemon

And in most cases, the volumes are created by an external dedicated volume management system, and passed to the daemon. This is why it is not an configurable item now.

However, it is welcome to submit a PR for adding an size field for the pod spec.

@minzcmu
Copy link
Contributor Author

minzcmu commented Oct 3, 2017

@gnawux Hi Xu, thanks for your reply! I have some questions about this,

  • Does it mean the configurable vol size thing will only work for devicemapper?
  • Do you want me to just add a size field to the pod spec or pass it all the way to construct a dm?

@gnawux
Copy link
Member

gnawux commented Oct 3, 2017

@minz1027 currently, only the block devices support a "size" property. Once you have a size field, you may apply it to all storage drivers. For block devices, such as devicemapper and rawblock, they may create a volume with specified size. And for directories, the might be implemented based on quota, which depends on the feature of the underlying filesystem.

@minzcmu
Copy link
Contributor Author

minzcmu commented Oct 10, 2017

@gnawux Hi Xu, I have the code to pass size through cmd line and pod spec. But the thing is I found that the size property or storage for the daemon is set when creating a new daemon.

daemon.Storage.Init()

By the time we tried to create a pod, the daemon should be already created and running. How can we override the storage property in that case?

@gnawux
Copy link
Member

gnawux commented Oct 11, 2017

I think you may change the interface of create volume,

err = dm.CreateVolume(dms.VolPoolName, deviceName, dev_id_str, storage.DEFAULT_VOL_MKFS, storage.DEFAULT_DM_VOL_SIZE, restore)

here we create the volume with default size, and you may change it to employ the size specified in pod spec.

@minzcmu
Copy link
Contributor Author

minzcmu commented Oct 11, 2017

@gnawux Hmm.. I am not sure if that will solve my problem. My problem is when I try to hyperctl run with a very large image(~10G), I will get no space left on the disk error when pulling the image.

It doesn't seem to be related to the volume.

What I want is more like setting the dm.basesize in docker daemon.
https://docs.docker.com/engine/reference/commandline/dockerd/

@minzcmu
Copy link
Contributor Author

minzcmu commented Oct 16, 2017

@gnawux Hi Xu, my PR got merge yay! I wonder when would you guys do release with that change? Thanks!

@gnawux
Copy link
Member

gnawux commented Oct 17, 2017

@minz1027 thank you, and it would be released in this week when #664 get merged

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants