[Gluster-devel] Failure to release unusable file open fd_count on glusterfs v3.7.11

彭繼霆 wowowowowody at gmail.com
Wed Jun 8 03:00:09 UTC 2016


Hi,

I have a volume created with 3 bricks.

After delete file which was created by "echo", the file has been move
to unlink folder.

Excepted result, opened fd should be zero, and unlink folder contains no file.

But actually, opened fd is not zero,  unlink folder contains a file.


Here are some examples:

# gluster volume info ec2

Volume Name: ec2
Type: Disperse
Volume ID: 47988520-0e18-4413-9e55-3ec3f3352600
Status: Started
Number of Bricks: 1 x (2 + 1) = 3
Transport-type: tcp
Bricks:
Brick1: giting1:/export/ec2/fs
Brick2: giting2:/export/ec2/fs
Brick3: giting3:/export/ec2/fs
Options Reconfigured:
performance.readdir-ahead: on


# gluster v status ec2

Status of volume: ec2
Gluster process                             TCP Port  RDMA Port  Online  Pid
------------------------------------------------------------------------------
Brick giting1:/export/ec2/fs                49154     0          Y
10856
Brick giting2:/export/ec2/fs                49154     0          Y
7967
Brick giting3:/export/ec2/fs                49153     0          Y
7216
NFS Server on localhost                     N/A       N/A        N       N/A
Self-heal Daemon on localhost               N/A       N/A        Y
10884
NFS Server on giting3                       2049      0          Y
7236
Self-heal Daemon on giting3                 N/A       N/A        Y
7244
NFS Server on giting2                       2049      0          Y
7987
Self-heal Daemon on giting2                 N/A       N/A        Y
7995

Task Status of Volume ec2
------------------------------------------------------------------------------
There are no active volume tasks

# mount -t glusterfs giting1:ec2 /ec2
# df -h
Filesystem               Size  Used Avail Use% Mounted on
/dev/mapper/centos-root   18G   12G  5.8G  67% /
devtmpfs                 1.9G     0  1.9G   0% /dev
tmpfs                    1.9G     0  1.9G   0% /dev/shm
tmpfs                    1.9G   41M  1.9G   3% /run
tmpfs                    1.9G     0  1.9G   0% /sys/fs/cgroup
/dev/sdb                  40G   33M   40G   1% /export/bk1
/dev/sda1                497M  168M  330M  34% /boot
tmpfs                    380M     0  380M   0% /run/user/0
giting1:dht               80G   66M   80G   1% /dht
giting1:/ec1              35G   24G   12G  67% /volume/ec1
giting1:ec2               35G   24G   12G  67% /ec2

# gluster v top ec2 open
Brick: giting1:/export/ec2/fs
Current open fds: 0, Max open fds: 0, Max openfd time: N/A
Brick: giting2:/export/ec2/fs
Current open fds: 0, Max open fds: 0, Max openfd time: N/A
Brick: giting3:/export/ec2/fs
Current open fds: 0, Max open fds: 0, Max openfd time: N/A

# for ((i=0;i<10;i++)); do echo 123 > /ec2/test.txt; done

# gluster v top ec2 open
Brick: giting1:/export/ec2/fs
Current open fds: 9, Max open fds: 10, Max openfd time: 2016-06-08
10:09:23.665717
Count           filename
=======================
10              /test.txt
Brick: giting3:/export/ec2/fs
Current open fds: 9, Max open fds: 10, Max openfd time: 2016-06-08
10:09:23.299795
Count           filename
=======================
10              /test.txt
Brick: giting2:/export/ec2/fs
Current open fds: 9, Max open fds: 10, Max openfd time: 2016-06-08
10:09:23.236294
Count           filename
=======================
10              /test.txt


# ll /export/ec2/fs/.glusterfs/unlink/
total 0

# rm /ec2/test.txt

# ls -l /export/ec2/fs/.glusterfs/unlink/
total 8
-rw-r--r-- 1 root root 512 Jun  8 18:09 a053b266-15c5-4ac7-ac44-841e177c7ebe

# gluster v top ec2 open
Brick: giting1:/export/ec2/fs
Current open fds: 8, Max open fds: 10, Max openfd time: 2016-06-08
10:09:23.665717
Count           filename
=======================
10              /test.txt
Brick: giting2:/export/ec2/fs
Current open fds: 8, Max open fds: 10, Max openfd time: 2016-06-08
10:09:23.236294
Count           filename
=======================
10              /test.txt
Brick: giting3:/export/ec2/fs
Current open fds: 8, Max open fds: 10, Max openfd time: 2016-06-08
10:09:23.299795
Count           filename
=======================
10              /test.txt


Reference:
Commit: storage/posix: Implement .unlink directory
https://github.com/gluster/glusterfs/commit/195548f55b09bf71db92929b7b734407b863093c

Regards,

Gi-ting Peng
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.gluster.org/pipermail/gluster-devel/attachments/20160608/71c0ddd1/attachment-0001.html>


More information about the Gluster-devel mailing list