Sorry, I hava misunderstood the usage of the 'sanlock daemon'. In fact, I want to
change the logging level dynamically with the 'sanlock' command.
The function of different commands:
sanlock daemon --- start daemon
sanlock client --- send request to daemon (default command if none given)
sanlock direct --- access storage directly (no coordination with daemon)
Thank you, Dave
-----Original Message-----
From: David Teigland [mailto:teigland@redhat.com]
Sent: Tuesday, July 30, 2013 10:14 PM
To: Qixiaozhen
Cc: sanlock-devel(a)lists.fedorahosted.org
Subject: Re: Two daemons existing and more details. RE: Error occurs when I try to change
the log level in sanlock v2.7 and fedora 18. Error Info: lockfile setlk error
/var/run/sanlock/sanlock.pid: Resource temporarily unavailable
On Tue, Jul 30, 2013 at 02:00:32AM +0000, Qixiaozhen wrote:
[root@localhost sanlock2.7_rpm_f18]# service sanlock start
Redirecting to /bin/systemctl start sanlock.service
[root@localhost sanlock2.7_rpm_f18]# ps -ef | grep sanlock
sanlock 959 1 0 21:16 ? 00:00:00 sanlock daemon -U sanlock -G sanlock
root 962 959 0 21:16 ? 00:00:00 sanlock daemon -U sanlock -G sanlock
[root@localhost sanlock2.7_rpm_f18]# lsof
/var/run/sanlock/sanlock.pid
COMMAND PID USER FD TYPE DEVICE SIZE/OFF NODE NAME
sanlock 959 sanlock 6wW REG 0,17 4 16287 /var/../run/sanlock/sanlock.pid
[root@localhost sanlock2.7_rpm_f18]# sanlock daemon -L 7
[root@localhost sanlock2.7_rpm_f18]# tail /var/log/sanlock.log
2013-07-30 21:16:07+0800 473 [959]: sanlock daemon started 2.7 host
408f9139-5a7b-423c-81ba-48310373f8be.localhost.
2013-07-30 21:36:10+0800 1676 [1059]: lockfile setlk error /var/run/sanlock/sanlock.pid:
Resource temporarily unavailable
Perhaps you misunderstand what "sanlock daemon -L 7" does.
Anything that begins "sanlock daemon" is a command to start a
new daemon, which fails here because you already started it.
I suspect you want this command to change the logging level of
the existing daemon, but that is not currently possible.
Dave