<html xmlns:v="urn:schemas-microsoft-com:vml" xmlns:o="urn:schemas-microsoft-com:office:office" xmlns:w="urn:schemas-microsoft-com:office:word" xmlns:m="http://schemas.microsoft.com/office/2004/12/omml" xmlns="http://www.w3.org/TR/REC-html40"><head><meta http-equiv=Content-Type content="text/html; charset=utf-8"><meta name=Generator content="Microsoft Word 15 (filtered medium)"><style><!--
/* Font Definitions */
@font-face
        {font-family:宋体;
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"Cambria Math";
        panose-1:2 4 5 3 5 4 6 3 2 4;}
@font-face
        {font-family:Calibri;
        panose-1:2 15 5 2 2 2 4 3 2 4;}
@font-face
        {font-family:微软雅黑;
        panose-1:2 11 5 3 2 2 4 2 2 4;}
@font-face
        {font-family:"\@宋体";
        panose-1:2 1 6 0 3 1 1 1 1 1;}
@font-face
        {font-family:"\@微软雅黑";
        panose-1:2 11 5 3 2 2 4 2 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0cm;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:宋体;}
a:link, span.MsoHyperlink
        {mso-style-priority:99;
        color:blue;
        text-decoration:underline;}
a:visited, span.MsoHyperlinkFollowed
        {mso-style-priority:99;
        color:purple;
        text-decoration:underline;}
span.EmailStyle17
        {mso-style-type:personal-reply;
        font-family:"Calibri","sans-serif";
        color:#1F497D;}
.MsoChpDefault
        {mso-style-type:export-only;
        font-family:"Calibri","sans-serif";}
@page WordSection1
        {size:612.0pt 792.0pt;
        margin:72.0pt 90.0pt 72.0pt 90.0pt;}
div.WordSection1
        {page:WordSection1;}
--></style><!--[if gte mso 9]><xml>
<o:shapedefaults v:ext="edit" spidmax="1026" />
</xml><![endif]--><!--[if gte mso 9]><xml>
<o:shapelayout v:ext="edit">
<o:idmap v:ext="edit" data="1" />
</o:shapelayout></xml><![endif]--></head><body lang=ZH-CN link=blue vlink=purple><div class=WordSection1><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>Since we use coreos,  mount directly into host can’t be done. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>We used a very complex procedure to handle this before, first mounted into a glusterfs container, then shared to os, then other container mounted it. But I thought It’s too complicated, and abandoned it. <o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>As to PV and PVC, I just did some testing. I seted up PVC with glusterfs, limited the capacity to 8GB, but when I mounted the corresponding PV from pod, I had the entire 1.8TB volume. It was not what I expected.<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'><o:p>&nbsp;</o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'>Likun<o:p></o:p></span></p><p class=MsoNormal><span lang=EN-US style='font-size:10.5pt;font-family:"Calibri","sans-serif";color:#1F497D'> <o:p></o:p></span></p><p class=MsoNormal><b><span style='font-size:11.0pt;font-family:"微软雅黑","sans-serif"'>发件人<span lang=EN-US>:</span></span></b><span lang=EN-US style='font-size:11.0pt;font-family:"微软雅黑","sans-serif"'> Vijay Bellur [mailto:vbellur@redhat.com] <br></span><b><span style='font-size:11.0pt;font-family:"微软雅黑","sans-serif"'>发送时间<span lang=EN-US>:</span></span></b><span lang=EN-US style='font-size:11.0pt;font-family:"微软雅黑","sans-serif"'> 2016</span><span style='font-size:11.0pt;font-family:"微软雅黑","sans-serif"'>年<span lang=EN-US>12</span>月<span lang=EN-US>31</span>日<span lang=EN-US> 7:34<br></span><b>收件人<span lang=EN-US>:</span></b><span lang=EN-US> likun<br></span><b>抄送<span lang=EN-US>:</span></b><span lang=EN-US> gluster-users<br></span><b>主题<span lang=EN-US>:</span></b><span lang=EN-US> Re: [Gluster-users] how to use a small part of glusterfs volume in kubernetes<o:p></o:p></span></span></p><p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p><div><p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p><div><p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p><div><p class=MsoNormal><span lang=EN-US>On Fri, Dec 30, 2016 at 4:07 AM, likun &lt;<a href="mailto:kun.li@ucarinc.com" target="_blank">kun.li@ucarinc.com</a>&gt; wrote:<o:p></o:p></span></p><blockquote style='border:none;border-left:solid #CCCCCC 1.0pt;padding:0cm 0cm 0cm 6.0pt;margin-left:4.8pt;margin-right:0cm'><div><div><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US>Anyone use glusterfs in kubernetes environment?<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US>&nbsp;<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US>We use coreos. As you know, from 1.4.3, coreos version kubernetes has included glusterfs-client debian package in hypercube image. So recently we moved our kubernetes to 1.5.1, and began to mount glusterfs from pod directly.<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US>&nbsp;<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US>But we can just mount the whole glusterfs volume, is there any way to use a small part of glusterfs volume</span>?<span lang=EN-US>like a directory in the volume, and 10G limited through quota. Can PV and PVC do this ?<o:p></o:p></span></p><p class=MsoNormal style='mso-margin-top-alt:auto;mso-margin-bottom-alt:auto'><span lang=EN-US>&nbsp;<o:p></o:p></span></p></div></div></blockquote><div><p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>You can possibly accomplish this by mounting the entire glusterfs volume into the container host and bind mounting different sub-directories of the volume in different containers. Gluster supports configuring quota on sub-directories. Note that data services like geo-replication, snapshots etc. cannot be configured for sub-directories.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>Are your PVs &nbsp;for read write once or read write many workloads? We are looking at adding read write once support with iSCSI in Gluster 3.10.<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>Regards,<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US>Vijay<o:p></o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p></div><div><p class=MsoNormal><span lang=EN-US><o:p>&nbsp;</o:p></span></p></div></div></div></div></div></body></html>