<p>I know this is a bit weird, but I'm building an application that makes small local changes to ephemeral file/folder systems and needs to sync them with a store of record. I am using NFS right now, but it is slow, not super scalable, and expensive. Instead, I'd love to take advantage of <code>btrfs</code> or <code>zfs</code> snapshotting for efficient syncing of snapshots of a small local filesystem, and push the snapshots into cloud storage.</p>
<p>I am running this application in Kubernetes (in GKE), which uses GCP VMs with <code>ext4</code> formatted root partitions. This means that when I mount an <code>emptyDir</code> volume into my pods, the folder is on an <code>ext4</code> filesystem I believe.</p>
<p>Is there an easy way to get an ephemeral volume mounted with a different filesystem that supports these fancy snapshotting operations?</p>

hornairs
<p>No. Nor does GKE offer that kind of low level control anyway but the rest of this answer presumes you've managed to create a local mount of some kind. The easiest answer is a hostPath mount, however that requires you manually account for multiple similar pods on the same host so they don't collide. A new option is an ephemeral CSI volume combined with a CSI plugin that basically reimplements emptyDir. <a href="https://github.com/kubernetes-csi/csi-driver-host-path" rel="nofollow noreferrer">https://github.com/kubernetes-csi/csi-driver-host-path</a> gets most of the way there but would 1) require more work for this use case and 2) is <em>explicitly</em> not supported for production use. Failing either of those, you can move the whole kubelet data directory onto another mount, though that might not accomplish what you are looking for.</p>
