<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN">
<html><body>
<p>Hi,</p>
<p>thanks for testing it. I've identified an fd leak in the disperse xlator. I've filed a bug [1] for this.</p>
<p>Xavi</p>
<p>[1]&nbsp;https://bugzilla.redhat.com/show_bug.cgi?id=1344396</p>
<p>On 08.06.2016 05:00, 彭繼霆 wrote:</p>
<blockquote type="cite" style="padding-left:5px; border-left:#1010ff 2px solid; margin-left:5px; width:100%"><!-- html ignored --><!-- head ignored --><!-- meta ignored -->
<div dir="ltr"><span style="font-family: monospace, monospace;">Hi, I have a volume created with 3 bricks.</span><span style="font-family: monospace, monospace;">After&nbsp;delete file which was created by "echo", the file has been move to unlink folder.</span><span style="font-family: monospace, monospace;">Excepted result, opened fd should be zero, and unlink folder contains no file.</span><span style="font-family: monospace, monospace;">But actually, opened fd is not zero, unlink folder contains a file.</span><span style="font-family: monospace, monospace;"><br /></span><span style="font-family: monospace, monospace;">Here are some examples:</span><span style="font-family: monospace, monospace;"><span style="font-size: medium;"># gluster volume info ec2</span><br /><br />Volume Name: ec2<br />Type: Disperse<br />Volume ID: 47988520-0e18-4413-9e55-3ec3f3352600<br />Status: Started<br />Number of Bricks: 1 x (2 + 1) = 3<br />Transport-type: tcp<br />Bricks:<br />Brick1: giting1:/export/ec2/fs<br />Brick2: giting2:/export/ec2/fs<br />Brick3: giting3:/export/ec2/fs<br />Options Reconfigured:<br />performance.readdir-ahead: on<br /><br /><br /><span style="font-size: medium;"># gluster v status ec2</span><br /><br />Status of volume: ec2<br />Gluster process &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; TCP Port &nbsp;RDMA Port &nbsp;Online &nbsp;Pid<br />------------------------------------------------------------------------------<br />Brick giting1:/export/ec2/fs &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;49154 &nbsp; &nbsp; 0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Y &nbsp; &nbsp; &nbsp; 10856<br />Brick giting2:/export/ec2/fs &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;49154 &nbsp; &nbsp; 0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Y &nbsp; &nbsp; &nbsp; 7967<br />Brick giting3:/export/ec2/fs &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;49153 &nbsp; &nbsp; 0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Y &nbsp; &nbsp; &nbsp; 7216<br />NFS Server on localhost &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; N/A &nbsp; &nbsp; &nbsp; N/A &nbsp; &nbsp; &nbsp; &nbsp;N &nbsp; &nbsp; &nbsp; N/A<br />Self-heal Daemon on localhost &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; N/A &nbsp; &nbsp; &nbsp; N/A &nbsp; &nbsp; &nbsp; &nbsp;Y &nbsp; &nbsp; &nbsp; 10884<br />NFS Server on giting3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2049 &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Y &nbsp; &nbsp; &nbsp; 7236<br />Self-heal Daemon on giting3 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; N/A &nbsp; &nbsp; &nbsp; N/A &nbsp; &nbsp; &nbsp; &nbsp;Y &nbsp; &nbsp; &nbsp; 7244<br />NFS Server on giting2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 2049 &nbsp; &nbsp; &nbsp;0 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;Y &nbsp; &nbsp; &nbsp; 7987<br />Self-heal Daemon on giting2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; N/A &nbsp; &nbsp; &nbsp; N/A &nbsp; &nbsp; &nbsp; &nbsp;Y &nbsp; &nbsp; &nbsp; 7995<br /><br />Task Status of Volume ec2<br />------------------------------------------------------------------------------<br />There are no active volume tasks<br /><span style="font-size: medium;"><br /># mount -t glusterfs giting1:ec2 /ec2<br /># df -h</span><br />Filesystem &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; Size &nbsp;Used Avail Use% Mounted on<br />/dev/mapper/centos-root &nbsp; 18G &nbsp; 12G &nbsp;5.8G &nbsp;67% /<br />devtmpfs &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 1.9G &nbsp; &nbsp; 0 &nbsp;1.9G &nbsp; 0% /dev<br />tmpfs &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1.9G &nbsp; &nbsp; 0 &nbsp;1.9G &nbsp; 0% /dev/shm<br />tmpfs &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1.9G &nbsp; 41M &nbsp;1.9G &nbsp; 3% /run<br />tmpfs &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;1.9G &nbsp; &nbsp; 0 &nbsp;1.9G &nbsp; 0% /sys/fs/cgroup<br />/dev/sdb &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;40G &nbsp; 33M &nbsp; 40G &nbsp; 1% /export/bk1<br />/dev/sda1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;497M &nbsp;168M &nbsp;330M &nbsp;34% /boot<br />tmpfs &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;380M &nbsp; &nbsp; 0 &nbsp;380M &nbsp; 0% /run/user/0<br />giting1:dht &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 80G &nbsp; 66M &nbsp; 80G &nbsp; 1% /dht<br />giting1:/ec1 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;35G &nbsp; 24G &nbsp; 12G &nbsp;67% /volume/ec1<br />giting1:ec2 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; 35G &nbsp; 24G &nbsp; 12G &nbsp;67% /ec2</span>
<div><span style="font-family: monospace, monospace;"><br /></span></div>
<div><span style="font-family: monospace, monospace;"><span style="font-size: medium;"># gluster v top ec2 open</span><br /></span></div>
<div>
<div><span style="font-family: monospace, monospace;">Brick: giting1:/export/ec2/fs</span></div>
<div><span style="font-family: monospace, monospace;">Current open fds: 0, Max open fds: 0, Max openfd time: N/A</span></div>
<div><span style="font-family: monospace, monospace;">Brick: giting2:/export/ec2/fs</span></div>
<div><span style="font-family: monospace, monospace;">Current open fds: 0, Max open fds: 0, Max openfd time: N/A</span></div>
<div><span style="font-family: monospace, monospace;">Brick: giting3:/export/ec2/fs</span></div>
<div><span style="font-family: monospace, monospace;">Current open fds: 0, Max open fds: 0, Max openfd time: N/A</span></div>
</div>
<div><span style="font-family: monospace, monospace; font-size: medium;"><br /></span></div>
<div><span style="font-family: monospace, monospace; font-size: medium;"># for ((i=0;i /ec2/test.txt; done</span></div>
<div><span style="font-family: monospace, monospace; font-size: medium;"><br /></span></div>
<div>
<div><span style="font-family: monospace, monospace; font-size: medium;"># gluster v top ec2 open</span></div>
<div><span style="font-family: monospace, monospace;">Brick: giting1:/export/ec2/fs</span></div>
<div><span style="font-family: monospace, monospace;">Current open fds: 9, Max open fds: 10, Max openfd time: 2016-06-08 10:09:23.665717</span></div>
<div><span style="font-family: monospace, monospace;">Count &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; filename</span></div>
<div><span style="font-family: monospace, monospace;">=======================</span></div>
<div><span style="font-family: monospace, monospace;">10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/test.txt</span></div>
<div><span style="font-family: monospace, monospace;">Brick: giting3:/export/ec2/fs</span></div>
<div><span style="font-family: monospace, monospace;">Current open fds: 9, Max open fds: 10, Max openfd time: 2016-06-08 10:09:23.299795</span></div>
<div><span style="font-family: monospace, monospace;">Count &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; filename</span></div>
<div><span style="font-family: monospace, monospace;">=======================</span></div>
<div><span style="font-family: monospace, monospace;">10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/test.txt</span></div>
<div><span style="font-family: monospace, monospace;">Brick: giting2:/export/ec2/fs</span></div>
<div><span style="font-family: monospace, monospace;">Current open fds: 9, Max open fds: 10, Max openfd time: 2016-06-08 10:09:23.236294</span></div>
<div><span style="font-family: monospace, monospace;">Count &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; filename</span></div>
<div><span style="font-family: monospace, monospace;">=======================</span></div>
<div><span style="font-family: monospace, monospace;">10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/test.txt</span></div>
</div>
<div><span style="font-family: monospace, monospace;"><br /></span></div>
<div><span style="font-family: monospace, monospace;"><span style="font-size: medium;"># ll /export/ec2/fs/.glusterfs/unlink/</span><br /></span></div>
<div><span style="font-family: monospace, monospace;">total 0<br /></span></div>
<div><span style="font-family: monospace, monospace; font-size: medium;"># rm /ec2/test.txt<br /></span></div>
<div><span style="font-family: monospace, monospace; font-size: medium;"><br /></span></div>
<div>
<div><span style="font-family: monospace, monospace; font-size: medium;"># ls -l /export/ec2/fs/.glusterfs/unlink/</span></div>
<div><span style="font-family: monospace, monospace;">total 8</span></div>
<div><span style="font-family: monospace, monospace;">-rw-r--r-- 1 root root 512 Jun &nbsp;8 18:09 a053b266-15c5-4ac7-ac44-841e177c7ebe</span></div>
</div>
<div><span style="font-family: monospace, monospace;"><br /></span></div>
<div>
<div><span style="font-size: medium;"># gluster v top ec2 open</span></div>
<div>Brick: giting1:/export/ec2/fs</div>
<div>Current open fds: 8, Max open fds: 10, Max openfd time: 2016-06-08 10:09:23.665717</div>
<div>Count &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; filename</div>
<div>=======================</div>
<div>10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/test.txt</div>
<div>Brick: giting2:/export/ec2/fs</div>
<div>Current open fds: 8, Max open fds: 10, Max openfd time: 2016-06-08 10:09:23.236294</div>
<div>Count &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; filename</div>
<div>=======================</div>
<div>10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/test.txt</div>
<div>Brick: giting3:/export/ec2/fs</div>
<div>Current open fds: 8, Max open fds: 10, Max openfd time: 2016-06-08 10:09:23.299795</div>
<div>Count &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; filename</div>
<div>=======================</div>
<div>10 &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp; &nbsp;/test.txt</div>
</div>
<div><span style="font-family: monospace, monospace;"><br /></span></div>
<div><span style="font-family: monospace, monospace;">Reference:</span></div>
<span style="font-family: monospace, monospace;">Commit: storage/posix: Implement .unlink directory<br /><a href="https://github.com/gluster/glusterfs/commit/195548f55b09bf71db92929b7b734407b863093c">https://github.com/gluster/glusterfs/commit/195548f55b09bf71db92929b7b734407b863093c</a></span>
<div><br />
<div>
<pre style="white-space: pre-wrap; color: #000000;">Regards,</pre>
<pre style="white-space: pre-wrap; color: #000000;">Gi-ting Peng</pre>
<pre style="white-space: pre-wrap; color: #000000;">&nbsp;</pre>
</div>
</div>
</div>
</blockquote>
</body></html>