<html>
<head>
<meta content="text/html; charset=windows-1252"
http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
<br>
<div class="moz-cite-prefix">On 03/21/2017 07:33 PM, Mackay, Michael
wrote:<br>
</div>
<blockquote
cite="mid:52DACBCCFD7E6B4E963B951CA172B9B5055DB2FC56@ES2K7-MBX.progeny.net"
type="cite">
<meta http-equiv="Content-Type" content="text/html;
charset=windows-1252">
<meta name="Generator" content="Microsoft Word 14 (filtered
medium)">
<style><!--
/* Font Definitions */
@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:Tahoma;
        panose-1:2 11 6 4 3 5 4 4 2 4;}
/* Style Definitions */
p.MsoNormal, li.MsoNormal, div.MsoNormal
        {margin:0in;
        margin-bottom:.0001pt;
        font-size:12.0pt;
        font-family:"Times New Roman","serif";}
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;}
p.MsoAcetate, li.MsoAcetate, div.MsoAcetate
        {mso-style-priority:99;
        mso-style-link:"Balloon Text Char";
        margin:0in;
        margin-bottom:.0001pt;
        font-size:8.0pt;
        font-family:"Tahoma","sans-serif";}
span.BalloonTextChar
        {mso-style-name:"Balloon Text Char";
        mso-style-priority:99;
        mso-style-link:"Balloon Text";
        font-family:"Tahoma","sans-serif";}
span.EmailStyle19
        {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:8.5in 11.0in;
        margin:1.0in 1.0in 1.0in 1.0in;}
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]-->
<div class="WordSection1">
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D">“</span>read-only
xlator is loaded at gluster server (brick) stack. so once the
volume is in place, you'd need to enable read-only option
using volume set and then you should be able to mount the
volume which would provide you the read-only access.”<o:p></o:p></p>
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal">OK, so fair enough, but is the physical
volume on which the brick resides allowed to be on a r/o
filesystem? <br>
</p>
</div>
</blockquote>
<br>
<blockquote
cite="mid:52DACBCCFD7E6B4E963B951CA172B9B5055DB2FC56@ES2K7-MBX.progeny.net"
type="cite">
<div class="WordSection1">
<p class="MsoNormal"> Again, it’s not just whether Gluster
considers the volume to be read-only to clients, but whether
the gluster brick and its underlying medium can be read-only.<o:p></o:p></p>
</div>
</blockquote>
No, it is only Gluster consider it as a read-only voume.<br>
<br>
If you go and access the gluster brick directly, you will be able to
write on it.<br>
In general, you should avoid accessing the bricks directly.<br>
<br>
<br>
Do you mean to say, like creating a gluster volume to be read-only
even from the beginning ?<br>
Can you tell about the use case ?<br>
<br>
As I understand, user will write some data and wish all the data to
be read-only. So, user set the volume to be read-only.<br>
<br>
<blockquote
cite="mid:52DACBCCFD7E6B4E963B951CA172B9B5055DB2FC56@ES2K7-MBX.progeny.net"
type="cite">
<div class="WordSection1">
<p class="MsoNormal"><o:p> </o:p></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><span
style="font-size:11.0pt;font-family:"Calibri","sans-serif";color:#1F497D"><o:p> </o:p></span></p>
<p class="MsoNormal"><b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">From:</span></b><span
style="font-size:10.0pt;font-family:"Tahoma","sans-serif"">
Atin Mukherjee [<a class="moz-txt-link-freetext" href="mailto:amukherj@redhat.com">mailto:amukherj@redhat.com</a>] <br>
<b>Sent:</b> Tuesday, March 21, 2017 9:42 AM<br>
<b>To:</b> Mackay, Michael<br>
<b>Cc:</b> Samikshan Bairagya; <a class="moz-txt-link-abbreviated" href="mailto:gluster-devel@gluster.org">gluster-devel@gluster.org</a><br>
<b>Subject:</b> (nwl) Re: [Gluster-devel] Read-only option
for a replicated (replication for fail-over) Gluster volume<o:p></o:p></span></p>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
<div>
<p class="MsoNormal">On Tue, Mar 21, 2017 at 6:06 PM,
Mackay, Michael <<a moz-do-not-send="true"
href="mailto:mackay@progeny.net" target="_blank">mackay@progeny.net</a>>
wrote:<o:p></o:p></p>
<p class="MsoNormal">Samikshan,<br>
<br>
Thanks for your suggestion.<br>
<br>
From what I understand, the read-only feature (which I
had seen and researched) is a client option for mounting
the filesystem. Unfortunately, we need the filesystem
itself to be set up read-only, so that no one can modify
it - in other words, we need to make sure that no client
can mount it read/write. So, it has to be set up and
started as r/o, and then the clients have no choice but
to get a r/o copy.<o:p></o:p></p>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">read-only xlator is loaded at
gluster server (brick) stack. so once the volume is in
place, you'd need to enable read-only option using
volume set and then you should be able to mount the
volume which would provide you the read-only access. <br>
<o:p></o:p></p>
</div>
<blockquote style="border:none;border-left:solid #CCCCCC
1.0pt;padding:0in 0in 0in
6.0pt;margin-left:4.8pt;margin-right:0in">
<p class="MsoNormal"><br>
Thanks<br>
Mike<o:p></o:p></p>
<div>
<div>
<p class="MsoNormal"><br>
-----Original Message-----<br>
From: Samikshan Bairagya [mailto:<a
moz-do-not-send="true"
href="mailto:sbairagy@redhat.com"><a class="moz-txt-link-abbreviated" href="mailto:sbairagy@redhat.com">sbairagy@redhat.com</a></a>]<br>
Sent: Monday, March 20, 2017 3:52 PM<br>
To: Mackay, Michael<br>
Cc: <a moz-do-not-send="true"
href="mailto:gluster-devel@gluster.org">gluster-devel@gluster.org</a><br>
Subject: Re: [Gluster-devel] Read-only option for
a replicated (replication for fail-over) Gluster
volume<br>
<br>
<br>
<br>
On 03/21/2017 12:38 AM, Mackay, Michael wrote:<br>
> Gluster folks:<br>
><br>
> Our group has a need for a distributed
filesystem, like Gluster, that can be mounted by
clients as read-only. We wish to have the ability
to seamless switch over to an alternate source of
this read-only data if the default source fails.<br>
> The reason for this ROFS is so that every
client can get access to applications and data
that we want to ensure stays the same
(unmodifiable) for an entire system delivery life
cycle. To date we've used read-only NFS mounts
reasonably well, but its failover performance is
not at all great.<br>
><br>
> We also don't want a "WORM" sort of
arrangement - we want to prevent any and all
writes to the volume once it's up and shared.<br>
><br>
> So, under the "how hard could it be" mantra,
we took version 3.7.15 and poked around a bit
until we got it to do just what we want. It was a
minor mod to 'xlators/features/index/src/index.c'
and 'xlators/storage/posix/src/posix-helpers.c',
along with a "force" option when doing the volume
start command.<br>
><br>
> We would happily share the specific changes,
and they seem to fit in the 3.10.0 code base too;
the question for the group is, would such a
capability be of interest to the Gluster
baseline? Possibly a precursor question (since I
don't have much experience in gluster-devel at
all, so please forgive my approach if it's wrong)
is, to whom should I pose this question, if it's
not to this group?<br>
><br>
> Thanks for your time and I'd be happy to
provide any further information.<br>
><br>
<br>
Hi Mike,<br>
<br>
Have you checked the 'features.read-only' volume
option. Apparently you can set it to on/off
depending on whether you want your volume to be
read-only or not. By default it is set to 'off'.
The following would make your volume read-only for
all clients accessing it:<br>
<br>
# gluster volume set <VOLNAME>
features.read-only on<br>
<br>
Hope that helped.<br>
<br>
~ Samikshan<br>
_______________________________________________<br>
Gluster-devel mailing list<br>
<a moz-do-not-send="true"
href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a><br>
<a moz-do-not-send="true"
href="http://lists.gluster.org/mailman/listinfo/gluster-devel"
target="_blank">http://lists.gluster.org/mailman/listinfo/gluster-devel</a><o:p></o:p></p>
</div>
</div>
</blockquote>
</div>
<p class="MsoNormal"><br>
<br clear="all">
<br>
-- <o:p></o:p></p>
<div>
<div>
<div>
<div>
<p class="MsoNormal"><o:p> </o:p></p>
</div>
<div>
<p class="MsoNormal">~ Atin (atinm)<o:p></o:p></p>
</div>
</div>
</div>
</div>
</div>
</div>
</div>
<br>
<fieldset class="mimeAttachmentHeader"></fieldset>
<br>
<pre wrap="">_______________________________________________
Gluster-devel mailing list
<a class="moz-txt-link-abbreviated" href="mailto:Gluster-devel@gluster.org">Gluster-devel@gluster.org</a>
<a class="moz-txt-link-freetext" href="http://lists.gluster.org/mailman/listinfo/gluster-devel">http://lists.gluster.org/mailman/listinfo/gluster-devel</a></pre>
</blockquote>
<br>
</body>
</html>