<!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] 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 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 TCP Port RDMA Port Online Pid<br />------------------------------------------------------------------------------<br />Brick giting1:/export/ec2/fs 49154 0 Y 10856<br />Brick giting2:/export/ec2/fs 49154 0 Y 7967<br />Brick giting3:/export/ec2/fs 49153 0 Y 7216<br />NFS Server on localhost N/A N/A N N/A<br />Self-heal Daemon on localhost N/A N/A Y 10884<br />NFS Server on giting3 2049 0 Y 7236<br />Self-heal Daemon on giting3 N/A N/A Y 7244<br />NFS Server on giting2 2049 0 Y 7987<br />Self-heal Daemon on giting2 N/A N/A Y 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 Size Used Avail Use% Mounted on<br />/dev/mapper/centos-root 18G 12G 5.8G 67% /<br />devtmpfs 1.9G 0 1.9G 0% /dev<br />tmpfs 1.9G 0 1.9G 0% /dev/shm<br />tmpfs 1.9G 41M 1.9G 3% /run<br />tmpfs 1.9G 0 1.9G 0% /sys/fs/cgroup<br />/dev/sdb 40G 33M 40G 1% /export/bk1<br />/dev/sda1 497M 168M 330M 34% /boot<br />tmpfs 380M 0 380M 0% /run/user/0<br />giting1:dht 80G 66M 80G 1% /dht<br />giting1:/ec1 35G 24G 12G 67% /volume/ec1<br />giting1:ec2 35G 24G 12G 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 filename</span></div>
<div><span style="font-family: monospace, monospace;">=======================</span></div>
<div><span style="font-family: monospace, monospace;">10 /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 filename</span></div>
<div><span style="font-family: monospace, monospace;">=======================</span></div>
<div><span style="font-family: monospace, monospace;">10 /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 filename</span></div>
<div><span style="font-family: monospace, monospace;">=======================</span></div>
<div><span style="font-family: monospace, monospace;">10 /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 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 filename</div>
<div>=======================</div>
<div>10 /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 filename</div>
<div>=======================</div>
<div>10 /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 filename</div>
<div>=======================</div>
<div>10 /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;"> </pre>
</div>
</div>
</div>
</blockquote>
</body></html>