-
Notifications
You must be signed in to change notification settings - Fork 561
Document Usage of Ephemeral Disks #543
Comments
Yes there are ephemeral disks on every vm. documented here https://docs.microsoft.com/en-us/azure/virtual-machines/linux/optimization
depending on the vm size you get a different disk with different disk speeds. which is documented here |
Given the text quoted above, why are |
the suggestion there is to actual have a separate data disk and use that instead, not the ephemeral disk. @colemickens Any answer to the above question about why we are using osdisk with this is stated in Azure documentation
Edit: formatting, keep forgetting to do two newlines to make a new paragraph |
I never tried Kubernetes, but with DCOS ephemeral is used by default. why the difference choice? |
Thanks for the response. I'm aware of the difference between the os disks and epehermal disks. Just for my edification, when I create a emptyDir volume it will map to /dev/sdb? The portion where someone could be confused comes from https://kubernetes.io/docs/concepts/storage/volumes/#emptydir |
@bearrito I found that emptyDir volumes use the OS disk (i.e. not /dev/sdb). |
DCOS we started using the ephemeral disk to speed up install/start times. I am not familiar with the reasons for choosing to not use it for k8s. @colemickens should know. |
Thank you @alahiff This seems fairly impactful. I need a significant amount of space for check-pointing without incurring network IO costs to write to a Storage Account based disk or Managed Disk. Is mapping emptyDir to /dev/sda by design or should this ticket be reclassified from question to bug? |
I would consider it a bug, as it reduces the usefulness of emptyDirs. I've had to resort to using hostPath instead in order to use the ephemeral disk. |
@alahiff I concur. We are also considering the usage of host path. In particular we are attempt to override the creation of the agent vm's so we can run an azure template script, so that we me set the permissions on sdb which would allow us to run in unprivileged mode. Did you do something similar or just run the containers in privileged? |
@bearrito For the moment I'm just using the simplest option. I'm not using privileged containers, however - they initially run as root (& hence can write in sdb) then drop to an unprivileged user before doing actual work. Each container creates a directory in sdb named after its hostname in order to avoid collisions. emptyDirs would be much nicer! |
So right now we are pretty heads down working on our internal goals, hence why @colemickens hasn't been able to respond. But the idea of having emptyDir be on the ephemeral disk sounds good. If one of you want to take a stab at a PR mounting the ephemral disk or a partition of the ephemeral disk where empty dirs are created I'd be very willing to review it |
@squillace can you take a look at this? |
|
I got the fix, on every node: 1.
2.
3.
|
I'm not sure if this will help anyone else or not, but wanted to share in case it does. I needed to have the ability for my docker containers to use the ephemeral/temp drive (/mnt) that is created by default when the Nodes are built out. Without this, I believe my docker instances where writing to the OsDisk. I ended up using something like this in my .yaml file:
|
So the issue with the above solution is that /mnt might not point to the ephermal disk when the container starts. The ephermal disk is handled by waagent and for instance when you are moved to a new physical node during reboot or maintenance of the underlaying hardware, you will be assigned new ephermal space, waagent does partition creation and formating of this new space, processes that all takes time. Personally I have seen issues where it takes several minutes before /mnt is ready to be used. I am currently looking for a bullet proof solution as how to monitor that /mnt is the ephermal disk. and not just a folder on the os disk. |
This issue has been automatically marked as stale because it has not had recent activity. It will be closed if no further activity occurs. Thank you for your contribution. Note that acs-engine is deprecated--see https://github.com/Azure/aks-engine instead. |
The answer to this question might be entirely obvious to a seasoned K8's on ACS user. It isn't obvious to me coming from typical usage of Azure VM's
What is capacity to use ephemeral disks? None or some capacity? documented or undocumented?
I see them mentioned in #406 so ephermal disks seem to be a concept.
The text was updated successfully, but these errors were encountered: