<div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hi Atin,</div><div><br></div><div>Thank you for your reply.</div><div>I have two questions for you.</div><div><br></div><div>1.Are the two files info and info.tmp are only to be created or changed in function glusterd_store_volinfo()? I did not find other point in which the two file are changed.</div><div>2.I found that&nbsp;<span style="line-height: 23.8px;">glusterd_store_volinfo() will be call in many point by glusterd.Is there a problem of thread synchronization?If so, one thread may open a same file info.tmp using&nbsp;</span><span style="color: rgb(128, 0, 128); font-family: Î¢ÈíÑźÚ, 'Microsoft Yahei', Arial, Helvetica, sans-serif; line-height: 22.4px; background-color: rgb(238, 238, 238);">O_TRUNC </span><span style="line-height: 23.8px;">flag when another thread is writing the info,tmp.Could this case happen?</span></div><br><div>Thanks,</div><div>Xin</div><br><div style="position:relative;zoom:1"></div><div id="divNeteaseMailCard"></div><br>At 2016-11-10 21:41:06, "Atin Mukherjee" &lt;amukherj@redhat.com&gt; wrote:<br> <blockquote id="isReplyContent" style="PADDING-LEFT: 1ex; MARGIN: 0px 0px 0px 0.8ex; BORDER-LEFT: #ccc 1px solid"><div dir="ltr">Did you run out of disk space by any chance? AFAIK, the code is like we write new stuffs to .tmp file and rename it back to the original file. In case of a disk space issue I expect both the files to be of non zero size. But having said that I vaguely remember a similar issue (in the form of a bug or an email) landed up once but we couldn't reproduce it, so something is wrong with the atomic update here is what I guess. I'll be glad if you have a reproducer for the same and then we can dig into it further.<br></div><div class="gmail_extra"><br><div class="gmail_quote">On Thu, Nov 10, 2016 at 1:32 PM, songxin <span dir="ltr">&lt;<a href="mailto:songxin_1980@126.com" target="_blank">songxin_1980@126.com</a>&gt;</span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div style="line-height:1.7;color:#000000;font-size:14px;font-family:Arial"><div>Hi,</div><div>When I start the glusterd some error happened.</div><div>And the log is following.</div><div><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px">[2016-11-08 07:58:34.989365] I [MSGID: 100030] [glusterfsd.c:2318:main] 0-/usr/sbin/glusterd: Started running /usr/sbin/glusterd version 3.7.6 (args: /usr/sbin/glusterd -p /var/run/glusterd.pid --log-level INFO)&nbsp;</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px">[2016-11-08 07:58:34.998356] I [MSGID: 106478] [glusterd.c:1350:init] 0-management: Maximum allowed open file descriptors set to 65536&nbsp;</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px">[2016-11-08 07:58:35.000667] I [MSGID: 106479] [glusterd.c:1399:init] 0-management: Using /system/glusterd as working directory</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px">[2016-11-08 07:58:35.024508] I [MSGID: 106514] [glusterd-store.c:2075:<wbr></wbr>glusterd_restore_op_version] 0-management: Upgrade detected. Setting op-version to minimum : 1&nbsp;</span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px"><b>[2016-11-08 07:58:35.025356] E [MSGID: 106206] [glusterd-store.c:2562:<wbr></wbr>glusterd_store_update_volinfo] 0-management: Failed to get next store iter&nbsp;</b></span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px"><b>[2016-11-08 07:58:35.025401] E [MSGID: 106207] [glusterd-store.c:2844:<wbr></wbr>glusterd_store_retrieve_<wbr></wbr>volume] 0-management: Failed to update volinfo for c_glusterfs volume&nbsp;</b></span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px"><b>[2016-11-08 07:58:35.025463] E [MSGID: 106201] [glusterd-store.c:3042:<wbr></wbr>glusterd_store_retrieve_<wbr></wbr>volumes] 0-management: Unable to restore volume: c_glusterfs&nbsp;</b></span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px"><b>[2016-11-08 07:58:35.025544] E [MSGID: 101019] [xlator.c:428:xlator_init] 0-management: Initialization of volume 'management' failed, review your volfile again&nbsp;</b></span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px"><b>[2016-11-08 07:58:35.025582] E [graph.c:322:glusterfs_graph_<wbr></wbr>init] 0-management: initializing translator failed&nbsp;</b></span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px"><b>[2016-11-08 07:58:35.025629] E [graph.c:661:glusterfs_graph_<wbr></wbr>activate] 0-graph: init failed&nbsp;</b></span><br style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px"><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px">[2016-11-08 07:58:35.026109] W [glusterfsd.c:1236:cleanup_<wbr></wbr>and_exit] (--&gt;/usr/sbin/glusterd(<wbr></wbr>glusterfs_volumes_init-<wbr></wbr>0x1b260) [0x1000a718] --&gt;/usr/sbin/glusterd(<wbr></wbr>glusterfs_process_volfp-<wbr></wbr>0x1b3b8) [0x1000a5a8] --&gt;/usr/sbin/glusterd(cleanup_<wbr></wbr>and_exit-0x1c02c) [0x100098bc] ) 0-: received signum (0), shutting down&nbsp;</span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px"><br></span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px"><br></span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px">And then I found that the size of vols/volume_name/info is 0.It cause glusterd shutdown.</span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px">But I found that vols/volume_name_info.tmp is not 0.</span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px">And I found that there is a brick file&nbsp;</span><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px">vols/volume_name/bricks/<wbr></wbr>xxxx.brick is 0, but&nbsp;</span><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px">vols/volume_name/bricks/<wbr></wbr>xxxx.brick.tmp is not 0.</span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px"><br></span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px">I read the function code&nbsp;</span><font color="#333333" face="Arial, sans-serif"><span style="line-height:20px">glusterd_store_volinfo ()</span></font><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px">&nbsp;in glusterd-store.c .</span></div><div><span style="color:rgb(51,51,51);font-family:Arial,sans-serif;line-height:20px">I know that the info.tmp will be rename to info in function&nbsp;</span><font color="#333333" face="Arial, sans-serif"><span style="line-height:20px">glusterd_store_<wbr></wbr>volume_atomic_update().</span></font></div><div><font color="#333333" face="Arial, sans-serif"><span style="line-height:20px"><br></span></font></div><div><font color="#333333" face="Arial, sans-serif"><span style="line-height:20px">But my question is that why the info file is 0 but info.tmp is not 0.</span></font></div><div><br></div><div><br></div><div>Thanks,</div><div>Xin</div></div><br><br><span title="neteasefooter"><p>&nbsp;</p></span><br>______________________________<wbr></wbr>_________________<br>
Gluster-users mailing list<br>
<a href="mailto:Gluster-users@gluster.org">Gluster-users@gluster.org</a><br>
<a href="http://www.gluster.org/mailman/listinfo/gluster-users" rel="noreferrer" target="_blank">http://www.gluster.org/<wbr></wbr>mailman/listinfo/gluster-users</a><br></blockquote></div><br><br clear="all"><br>-- <br><div class="gmail_signature" data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><br></div><div>~ Atin (atinm)<br></div></div></div></div>
</div>
</blockquote></div><br><br><span title="neteasefooter"><p>&nbsp;</p></span>