glustershd.log Deleted open file: can i set file path to newlocation without restarting gluster service

853 views Asked by At

I am a new user to gluster. And its log file taking too much size on disk. I used "#gluster volume log rotate VolumeName" to rotate logs, but it has no effect on file glustershd.log. I copied the file and remove the original log file from /var/log/glusterfs/ and create a new file with same name in that directory(my bad luck...) than I realized process still writes in the deleted open file. (For other users now I realized the best way to do this is to truncate the log file instead of moving and deleting)

I can see that file in open file but mark as deleted. 24599595 0 l-wx------ 1 root root 64 Dec 30 20:23 /proc/2965/fd/4 -> /var/log/glusterfs/glustershd.log\ (deleted)

My Question is: can I redirect the gluster process to use file which is in /var/log/glusterfs/glustershd.log without restarting the service.???? Or can I move the deleted open file to its original location.

What would happen if I restart gluster service, my live servers has real time databases on it.

I configured gluster with distributed replication.

Two server:

Server:1
/export/brick1/brick
/export/brick2/brick
and Server:2
/export/brick1/brick
/export/brick2/brick

1 Volume with 4 bricks

1

There are 1 answers

0
Adeel Ahmad On BEST ANSWER

i found answer to my question after did some R&D on glusterfs, There is no way you can point gluster to other log file without restarting it. truncate is a good option to reduce the log file file size if space is the issue.

regarding what would happen if i restart the glusterfs service answer to that is nothing would happen to it because glusterfs is configured in distributed replication mode. and there are 2 servers in replication with 4 bricks on them 2 each. if you restart the glusterd daemon on one server i wont effect the real time db, glusterfs provide real time fail over. when you deamon comes online it starts auto healing.