If you pointed them at the same NFS export (server + path) then it's expected that they would see each other's changes. You can either create another export on the server or mount a sub-dir of that export (e.g. export /home, but mount /home/you vs /home/me) or you can use k8s' `subPath` field on the pods to mount different subdirs. On Fri, Aug 24, 2018 at 9:39 AM Stephen Eaton <stephen.ea...@trifork.nl> wrote: > > I tried creating two PV's of 10Gi both pointing at the same NFS of 1TB. I > also create 2 PVCs for the same StorageClass also of 10Gi. > > The problem is that when I add a file to on the the PVs the same file is > present on the other PV. > > What I would like to be able to do it to create to separate 'partitions' (or > locaigical separation) so that one PV does not share the data of the other PV > - is this possible? > > On Monday, August 1, 2016 at 9:52:41 AM UTC+2, Tim Hockin wrote: >> >> YOu can create multiple PVs with the same NFS export, as long as that >> is acceptable to you :) >> >> On Mon, Aug 1, 2016 at 12:51 AM, Qian Zhang <zhq5...@gmail.com> wrote: >> > Got it, thanks Tim! >> > >> > BTW, is there any best practice to use PV of NFS type? E.g., there is an >> > NFS >> > server which has only one export, should admin only create 1 PV for it? Or >> > it is also OK to create multiple PVs? >> > >> > >> > Thanks, >> > Qian Zhang >> > >> > On Mon, Aug 1, 2016 at 3:32 PM, 'Tim Hockin' via Containers at Google >> > <google-c...@googlegroups.com> wrote: >> >> >> >> If your NFS system supports that, that is one way ti could be done, yes. >> >> >> >> On Mon, Aug 1, 2016 at 12:13 AM, Qian Zhang <zhq5...@gmail.com> wrote: >> >> > I am curious how the storage system behind us does the enforcement, >> >> > e.g., >> >> > will we let NFS server know the capacity of PV is 1GB, and NFS server >> >> > can >> >> > guarantee the pod using that PV can not write more than 1GB? >> >> > >> >> > >> >> > Thanks, >> >> > Qian Zhang >> >> > >> >> > On Mon, Aug 1, 2016 at 3:00 PM, 'Tim Hockin' via Containers at Google >> >> > <google-c...@googlegroups.com> wrote: >> >> >> >> >> >> Nobody enforces it yet (well, WE don't, but the storage system behind >> >> >> us might). It's a way to match user needs (PVC) to available >> >> >> resources (PV). >> >> >> >> >> >> > why does user need to define the PVC's capacity when creating the >> >> >> > PVC? >> >> >> >> >> >> If the user needs 100GB and I give them a PV with 2 GB, they will not >> >> >> be happy. They have to specify how much they nee so we can bind (or >> >> >> provision) a PV for them. >> >> >> >> >> >> On Sun, Jul 31, 2016 at 11:54 PM, Qian Zhang <zhq5...@gmail.com> >> >> >> wrote: >> >> >> > Yeah, actually I am also a bit confused about the capacity user >> >> >> > defined >> >> >> > in >> >> >> > PV and PVC, who will be responsible for enforcing it? E.g., I have an >> >> >> > NFS >> >> >> > server which has 10GB free, and I create a PV (1GB) and PVC (1GB), >> >> >> > and >> >> >> > create a pod uses that PVC. So in the pod, can I only write 1GB into >> >> >> > the >> >> >> > mounted NFS directory? If so, who enforces it? >> >> >> > >> >> >> > And if a PV can only be used by a single PVC, why does user need to >> >> >> > define >> >> >> > the PVC's capacity when creating the PVC? I think we should not ask >> >> >> > user >> >> >> > to >> >> >> > define it, i.e., all the capacity of the PV should be used. >> >> >> > >> >> >> > >> >> >> > >> >> >> > Thanks, >> >> >> > Qian Zhang >> >> >> > >> >> >> > On Mon, Aug 1, 2016 at 2:45 PM, 'Tim Hockin' via Containers at Google >> >> >> > <google-c...@googlegroups.com> wrote: >> >> >> >> >> >> >> >> A PV uses a single backing medium, but multiple PVs might share that >> >> >> >> medium. Consider "thin" block devices which allocate actual space >> >> >> >> on >> >> >> >> demand. You might over-commit your storage system. Consider NFS >> >> >> >> which can have multiple exports on the same filesystem. You might >> >> >> >> over-commit your NFS server. >> >> >> >> >> >> >> >> Not saying it's a great idea, just that it is possible. >> >> >> >> >> >> >> >> On Sun, Jul 31, 2016 at 11:40 PM, Qian Zhang <zhq5...@gmail.com> >> >> >> >> wrote: >> >> >> >> > Thanks Tim! So a PV can only be used by a single PVC no matter >> >> >> >> > what >> >> >> >> > its >> >> >> >> > type >> >> >> >> > is. >> >> >> >> > >> >> >> >> > And can you please clarify a bit about "You can make a PV that >> >> >> >> > uses >> >> >> >> > the >> >> >> >> > same >> >> >> >> > backing medium, if the driver allows it"? I do not quite >> >> >> >> > understand >> >> >> >> > about >> >> >> >> > it, I think a PV should always use a single backing medium rather >> >> >> >> > than >> >> >> >> > multiple, right? >> >> >> >> > >> >> >> >> > >> >> >> >> > Thanks, >> >> >> >> > Qian Zhang >> >> >> >> > >> >> >> >> > On Mon, Aug 1, 2016 at 2:34 PM, 'Tim Hockin' via Containers at >> >> >> >> > Google >> >> >> >> > <google-c...@googlegroups.com> wrote: >> >> >> >> >> >> >> >> >> >> A PersistentVolume (PV) is an atomic abstraction. You can not >> >> >> >> >> subdivide it across multiple claims. You can make a PV that uses >> >> >> >> >> the >> >> >> >> >> same backing medium, if the driver allows it. E.g. consider NFS. >> >> >> >> >> If >> >> >> >> >> your NFS server has 150 GB free, nothing stops you from making 2 >> >> >> >> >> PVs >> >> >> >> >> each of size 100GB. We can't validate that. It might be bad for >> >> >> >> >> your >> >> >> >> >> users, but that is a decision you have to make as a cluster >> >> >> >> >> admin. >> >> >> >> >> >> >> >> >> >> On Sun, Jul 31, 2016 at 11:31 PM, Qian Zhang >> >> >> >> >> <zhq5...@gmail.com> >> >> >> >> >> wrote: >> >> >> >> >> > Hi, >> >> >> >> >> > >> >> >> >> >> > If I have one persistent volume (100GB) created in Kubernetes, >> >> >> >> >> > can >> >> >> >> >> > I >> >> >> >> >> > create >> >> >> >> >> > two persistent volume claims (50GB for each) to use this >> >> >> >> >> > persistent >> >> >> >> >> > volume? >> >> >> >> >> > It seems I can not do it with NFS type of persistent volume, >> >> >> >> >> > i.e., >> >> >> >> >> > once >> >> >> >> >> > an >> >> >> >> >> > NFS persistent volume is partially used by a persistent volume >> >> >> >> >> > claim, >> >> >> >> >> > it >> >> >> >> >> > can >> >> >> >> >> > not be used by any other persistent volume claims even it still >> >> >> >> >> > has >> >> >> >> >> > free >> >> >> >> >> > capacity. But I am not sure if the other type of persistent >> >> >> >> >> > volumes >> >> >> >> >> > (Ceph, >> >> >> >> >> > Glusterfs, etc.) have the same behavior. >> >> >> >> >> > >> >> >> >> >> > -- >> >> >> >> >> > You received this message because you are subscribed to the >> >> >> >> >> > Google >> >> >> >> >> > Groups >> >> >> >> >> > "Containers at Google" group. >> >> >> >> >> > To unsubscribe from this group and stop receiving emails from >> >> >> >> >> > it, >> >> >> >> >> > send >> >> >> >> >> > an >> >> >> >> >> > email to google-contain...@googlegroups.com. >> >> >> >> >> > To post to this group, send email to >> >> >> >> >> > google-c...@googlegroups.com. >> >> >> >> >> > Visit this group at >> >> >> >> >> > https://groups.google.com/group/google-containers. >> >> >> >> >> > For more options, visit https://groups.google.com/d/optout. >> >> >> >> >> >> >> >> >> >> -- >> >> >> >> >> You received this message because you are subscribed to a topic >> >> >> >> >> in >> >> >> >> >> the >> >> >> >> >> Google Groups "Containers at Google" group. >> >> >> >> >> To unsubscribe from this topic, visit >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> >> https://groups.google.com/d/topic/google-containers/6A1ZwSYkG8I/unsubscribe. >> >> >> >> >> To unsubscribe from this group and all its topics, send an email >> >> >> >> >> to >> >> >> >> >> google-contain...@googlegroups.com. >> >> >> >> >> To post to this group, send email to >> >> >> >> >> google-c...@googlegroups.com. >> >> >> >> >> Visit this group at >> >> >> >> >> https://groups.google.com/group/google-containers. >> >> >> >> >> For more options, visit https://groups.google.com/d/optout. >> >> >> >> > >> >> >> >> > >> >> >> >> > -- >> >> >> >> > You received this message because you are subscribed to the Google >> >> >> >> > Groups >> >> >> >> > "Containers at Google" group. >> >> >> >> > To unsubscribe from this group and stop receiving emails from it, >> >> >> >> > send >> >> >> >> > an >> >> >> >> > email to google-contain...@googlegroups.com. >> >> >> >> > To post to this group, send email to >> >> >> >> > google-c...@googlegroups.com. >> >> >> >> > Visit this group at >> >> >> >> > https://groups.google.com/group/google-containers. >> >> >> >> > For more options, visit https://groups.google.com/d/optout. >> >> >> >> >> >> >> >> -- >> >> >> >> You received this message because you are subscribed to a topic in >> >> >> >> the >> >> >> >> Google Groups "Containers at Google" group. >> >> >> >> To unsubscribe from this topic, visit >> >> >> >> >> >> >> >> >> >> >> >> https://groups.google.com/d/topic/google-containers/6A1ZwSYkG8I/unsubscribe. >> >> >> >> To unsubscribe from this group and all its topics, send an email to >> >> >> >> google-contain...@googlegroups.com. >> >> >> >> To post to this group, send email to >> >> >> >> google-c...@googlegroups.com. >> >> >> >> Visit this group at >> >> >> >> https://groups.google.com/group/google-containers. >> >> >> >> For more options, visit https://groups.google.com/d/optout. >> >> >> > >> >> >> > >> >> >> > -- >> >> >> > You received this message because you are subscribed to the Google >> >> >> > Groups >> >> >> > "Containers at Google" group. >> >> >> > To unsubscribe from this group and stop receiving emails from it, >> >> >> > send >> >> >> > an >> >> >> > email to google-contain...@googlegroups.com. >> >> >> > To post to this group, send email to >> >> >> > google-c...@googlegroups.com. >> >> >> > Visit this group at >> >> >> > https://groups.google.com/group/google-containers. >> >> >> > For more options, visit https://groups.google.com/d/optout. >> >> >> >> >> >> -- >> >> >> You received this message because you are subscribed to a topic in the >> >> >> Google Groups "Containers at Google" group. >> >> >> To unsubscribe from this topic, visit >> >> >> >> >> >> https://groups.google.com/d/topic/google-containers/6A1ZwSYkG8I/unsubscribe. >> >> >> To unsubscribe from this group and all its topics, send an email to >> >> >> google-contain...@googlegroups.com. >> >> >> To post to this group, send email to >> >> >> google-c...@googlegroups.com. >> >> >> Visit this group at https://groups.google.com/group/google-containers. >> >> >> For more options, visit https://groups.google.com/d/optout. >> >> > >> >> > >> >> > -- >> >> > You received this message because you are subscribed to the Google >> >> > Groups >> >> > "Containers at Google" group. >> >> > To unsubscribe from this group and stop receiving emails from it, send >> >> > an >> >> > email to google-contain...@googlegroups.com. >> >> > To post to this group, send email to google-c...@googlegroups.com. >> >> > Visit this group at https://groups.google.com/group/google-containers. >> >> > For more options, visit https://groups.google.com/d/optout. >> >> >> >> -- >> >> You received this message because you are subscribed to a topic in the >> >> Google Groups "Containers at Google" group. >> >> To unsubscribe from this topic, visit >> >> https://groups.google.com/d/topic/google-containers/6A1ZwSYkG8I/unsubscribe. >> >> To unsubscribe from this group and all its topics, send an email to >> >> google-contain...@googlegroups.com. >> >> To post to this group, send email to google-c...@googlegroups.com. >> >> Visit this group at https://groups.google.com/group/google-containers. >> >> For more options, visit https://groups.google.com/d/optout. >> > >> > >> > -- >> > You received this message because you are subscribed to the Google Groups >> > "Containers at Google" group. >> > To unsubscribe from this group and stop receiving emails from it, send an >> > email to google-contain...@googlegroups.com. >> > To post to this group, send email to google-c...@googlegroups.com. >> > Visit this group at https://groups.google.com/group/google-containers. >> > For more options, visit https://groups.google.com/d/optout. > > -- > You received this message because you are subscribed to the Google Groups > "Kubernetes user discussion and Q&A" group. > To unsubscribe from this group and stop receiving emails from it, send an > email to kubernetes-users+unsubscr...@googlegroups.com. > To post to this group, send email to kubernetes-users@googlegroups.com. > Visit this group at https://groups.google.com/group/kubernetes-users. > For more options, visit https://groups.google.com/d/optout.
-- You received this message because you are subscribed to the Google Groups "Kubernetes user discussion and Q&A" group. To unsubscribe from this group and stop receiving emails from it, send an email to kubernetes-users+unsubscr...@googlegroups.com. To post to this group, send email to kubernetes-users@googlegroups.com. Visit this group at https://groups.google.com/group/kubernetes-users. For more options, visit https://groups.google.com/d/optout.