Skip to contentSkip to conversation

ceph was didn't stop.

DISCUSSION ramu 3 participants 4 messages Jun 27, 2012 – Jun 28, 2012

lore
Share & tools
lore

ramu

author
#0 lore raw

Hi all,

I started ceph through /etc/init.d/ -a start,but it was not stop.I tried
with /etc/init.d/ceph -a stop and /etc/init.d/ceph -v -a stop and service ceph -a stop also,there is no error logs showing.I tried with /etc/init.d/ceph -a killall it's working but I want stop single osd or mon
it was not working.Please help me.

Thanks,
Ramu.

#1 lore raw
Quoted 7 lines · ramu

Hi all,

I started ceph through /etc/init.d/ -a start,but it was not stop.I tried
with /etc/init.d/ceph -a stop and /etc/init.d/ceph -v -a stop and service ceph -a stop also,there is no error logs showing.I tried with /etc/init.d/ceph -a killall it's working but I want stop single osd or mon
it was not working.Please help me.

What command are you running to kill a single osd or mon? '/etc/init.d/ceph -a stop osd.0' should work.

If it's still failing, you could change "#!/bin/sh" to "#!/bin/sh -x" at the top of /etc/init.d/ceph to see which command isn't working.

Josh

author
#2 lore raw

Josh Durgin <josh.durgin <at> inktank.com> writes:

Hi Josh,
I tried to stop single osd with /etc/init.d/ceph -a stop osd.0.
But it was not stop.And I changed" #!/bin/sh" to "#!/bin/sh -x" also, this is the one osd process in commandline.

=== osd.1 ===
+ return 0
+ get_conf pid_file /var/run/ceph/osd.1.pid pid file
+ var=pid_file
+ def=/var/run/ceph/osd.1.pid
+ key=pid file
+ shift
+ shift
+ shift
+ [ -z ]
+ [ 0 -eq 1 ]
+ /usr/local/bin/ceph-conf -c /etc/ceph/ceph.conf -n osd.1 pid file
+ eval echo -n /var/run/ceph/osd.1.pid
+ echo -n /var/run/ceph/osd.1.pid
+ eval pid_file="/var/run/ceph/osd.1.pid"
+ pid_file=/var/run/ceph/osd.1.pid
+ [ -n /var/run/ceph/osd.1.pid ]
+ dirname /var/run/ceph/osd.1.pid
+ do_cmd mkdir -p /var/run/ceph
+ [ -z ssh gamma ]
+ [ 0 -eq 1 ]
+ ssh gamma cd /etc/ceph ; ulimit -c unlimited ; mkdir -p /var/run/ceph
+ get_conf log_dir log dir
+ var=log_dir
+ def=
+ key=log dir
+ shift
+ shift
+ shift
+ [ -z ]
+ [ 0 -eq 1 ]
+ /usr/local/bin/ceph-conf -c /etc/ceph/ceph.conf -n osd.1 log dir
+ eval echo -n
+ echo -n
+ eval log_dir=""
+ log_dir=
+ get_conf log_sym_dir log sym dir
+ var=log_sym_dir
+ def=
+ key=log sym dir
+ shift
+ shift
+ shift
+ [ -z ]
+ [ 0 -eq 1 ]
+ /usr/local/bin/ceph-conf -c /etc/ceph/ceph.conf -n osd.1 log sym dir
+ eval echo -n
+ echo -n
+ eval log_sym_dir=""
+ log_sym_dir=
+ [ -n ]
+ [ -n ]
+ [ stop = start ]
+ binary=/usr/local/bin/ceph-osd
+ [ stop = start ]
+ cmd=/usr/local/bin/ceph-osd -i 1
+ [ gamma = vu-AP480-S ]
+ + grepecho -v -q alpha gamma gamma alpha
alpha
+ cur_conf=/tmp/ceph.conf.6982
+ cmd=/usr/local/bin/ceph-osd -i 1 -c /tmp/ceph.conf.6982
+ echo osd.1
+ grep -q ^osd
+ get_conf osd_data osd data
+ var=osd_data
+ def=
+ key=osd data
+ shift
+ shift
+ shift
+ [ -z ]
+ [ 0 -eq 1 ]
+ /usr/local/bin/ceph-conf -c /etc/ceph/ceph.conf -n osd.1 osd data
+ eval osd_data="/data/osd.1"
+ osd_data=/data/osd.1
+ get_conf btrfs_path /data/osd.1 btrfs path
+ var=btrfs_path
+ def=/data/osd.1
+ key=btrfs path
+ shift
+ shift
+ shift
+ [ -z ]
+ [ 0 -eq 1 ]
+ /usr/local/bin/ceph-conf -c /etc/ceph/ceph.conf -n osd.1 btrfs path
+ eval echo -n /data/osd.1
+ echo -n /data/osd.1
+ eval btrfs_path="/data/osd.1"
+ btrfs_path=/data/osd.1
+ get_conf btrfs_devs btrfs devs
+ var=btrfs_devs
+ def=
+ key=btrfs devs
+ shift
+ shift
+ shift
+ [ -z ]
+ [ 0 -eq 1 ]
+ /usr/local/bin/ceph-conf -c /etc/ceph/ceph.conf -n osd.1 btrfs devs
+ eval echo -n
+ echo -n
+ eval btrfs_devs=""
+ btrfs_devs=
+ echo
+ cut -d -f 1
+ first_dev=
+ get_conf lockfile /var/lock/subsys/ceph lock file
+ var=lockfile
+ def=/var/lock/subsys/ceph
+ key=lock file
+ shift
+ shift
+ shift
+ [ -z ]
+ [ 0 -eq 1 ]
+ /usr/local/bin/ceph-conf -c /etc/ceph/ceph.conf -n osd.1 lock file
+ eval echo -n /var/lock/subsys/ceph
+ echo -n /var/lock/subsys/ceph
+ eval lockfile="/var/lock/subsys/ceph"
+ lockfile=/var/lock/subsys/ceph
+ dirname /var/lock/subsys/ceph
+ lockdir=/var/lock/subsys
+ [ ! -d /var/lock/subsys ]
+ lockfile=
+ get_conf pre_stop pre stop command
+ var=pre_stop
+ def=
+ key=pre stop command
+ shift
+ shift
+ shift
+ [ -z ]
+ [ 0 -eq 1 ]
+ /usr/local/bin/ceph-conf -c /etc/ceph/ceph.conf -n osd.1 pre stop command
+ eval echo -n
+ echo -n
+ eval pre_stop=""
+ pre_stop=
+ get_conf post_stop post stop command
+ var=post_stop
+ def=
+ key=post stop command
+ shift
+ shift
+ shift
+ [ -z ]
+ [ 0 -eq 1 ]
+ /usr/local/bin/ceph-conf -c /etc/ceph/ceph.conf -n osd.1 post stop command
+ eval echo -n
+ echo -n
+ eval post_stop=""
+ post_stop=
+ [ -n ]
+ stop_daemon osd.1 ceph-osd /var/run/ceph/osd.1.pid
+ name=osd.1
+ daemon=ceph-osd
+ pidfile=/var/run/ceph/osd.1.pid
+ signal=
+ action=
+ [ -z ]
+ action=Stopping
+ echo -n Stopping Ceph osd.1 on gamma...
Stopping Ceph osd.1 on gamma...+ do_cmd while [ 1 ]; do

	[ -e /var/run/ceph/osd.1.pid ] || break
	pid=`cat /var/run/ceph/osd.1.pid`
	while [ -e /proc/$pid ] && grep -q ceph-osd /proc/$pid/cmdline ; do
	    cmd="kill  $pid"
	    echo -n $cmd...
	    $cmd
	    sleep 1
	    continue
	done
	break
    done
+ [ -z ssh gamma ]
+ [ 0 -eq 1 ]
+ ssh gamma cd /etc/ceph ; ulimit -c unlimited ; while [ 1 ]; do 
	[ -e /var/run/ceph/osd.1.pid ] || break
	pid=`cat /var/run/ceph/osd.1.pid`
	while [ -e /proc/$pid ] && grep -q ceph-osd /proc/$pid/cmdline ; do
	    cmd="kill  $pid"
	    echo -n $cmd...
	    $cmd
	    sleep 1
	    continue
	done
	break
    done

+ echo done
done
+ [ -n ]
+ [ -n ]
+ [ 0 -eq 1 ]
+ exit 0

Thanks,
Ramu.

#3 lore raw
Quoted 4 lines · ramu

+ ssh gamma cd /etc/ceph ; ulimit -c unlimited ; while [ 1 ]; do [ -e /var/run/ceph/osd.1.pid ] || break
       pid=cat /var/run/ceph/osd.1.pid
       while [ -e /proc/$pid ] && grep -q ceph-osd /proc/$pid/cmdline ; do

Quoted 8 lines

           cmd="kill  $pid"
           echo -n $cmd...
           $cmd
           sleep 1
           continue
       done
       break
   done

Well, if that didn't do it (and I don't see the "echo -n $cmd..." output anywhere, so if was most likely false), then it's highly likely the PID file has gone missing or is corrupt. This is a classic failure mode of sysvinit style self-daemonizing and PID file handling. Kill the process manually for now, and let us know of this keeps happening; right now "somebody rm -rf /var/run/ceph" is as good a guess as any.

This is one of the reasons why I advocate upstart/runit/etc, and why the "new style" of deployment uses upstart.
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in the body of a message to [email protected]
More majordomo info at http://vger.kernel.org/majordomo-info.html