<p>In my <code>/mnt/</code> I have a number of hard drives mounted (e.g. at <code>/mnt/hdd1/</code>, <code>/mnt/hdd2/</code>). Is there any way to make a K8s Persistent Volume on <code>/mnt</code> that can see the content of the hard drives mounted under <code>/mnt</code>? When I make a Local Persistent Volume on <code>/mnt</code>, the K8s pods see the directories hdd1 and hdd2, but they appear as empty.</p>
<p>The following is what I have tested:</p>
<h3>Undesired solution 1:</h3>
<p>I can make a Local Persistent Volume on <code>/mnt/hdd1</code> and then my K8s pod will be able to see the contents of hdd1 hard drive. But as I mentioned before, I want my pod to see <strong>all</strong> the hard drives and I don't want to make a persistent volume for each hard drive especially when I mount a new hard drive under <code>/mnt</code>.</p>
<h3>Undesired solution 2:</h3>
<p>I can mount a Local Persistent Volume on <code>/mnt/</code> with the K8s option of <code>mountPropagation: HostToContainer</code> in the yaml file for my deployment. In this case my pod will see the content of the hard drive if I <strong>remount</strong> the hard drive. But this is not desired because if the pod restarts,  I need to remount the hard drive again for the pod to see its content! (Only works when hard drive is remounted when the pod is alive)</p>

Ali_MM
<p>This approach, <a href="https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner" rel="nofollow noreferrer">Local Persistence Volume Static Provisioner</a>, suits better with Kubernetes way of working.</p>
<p>It supports metrics, storage lifecycle (eg. cleanup), node/pv affinity, extensible (eg. dynamic ephemeral storage). For example, with <a href="https://github.com/brunsgaard/eks-nvme-ssd-provisioner" rel="nofollow noreferrer">eks-nvme-ssd-provisioner</a>, there can be a daemonset running to provision fast storage as local. This is ideal for workload that requires ephemeral local storage for data cache, fast compute, while no need to manually perform mount on the ec2 node before pods start.</p>
<p>Usage yaml examples are here, <a href="https://github.com/kubernetes-sigs/sig-storage-local-static-provisioner/tree/master/examples" rel="nofollow noreferrer">sig-storage-local-static-provisioner/examples</a>.</p>
