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
From: David Teigland [mailto:email@example.com]
Sent: Tuesday, July 30, 2013 10:14 PM
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
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 : sanlock daemon started 2.7 host
2013-07-30 21:36:10+0800 1676 : 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.