All of lore.kernel.org
 help / color / mirror / Atom feed
From: Tommi Virtanen <tommi.virtanen@dreamhost.com>
To: "doki74216@gmail.com" <doki74216@gmail.com>
Cc: ceph-devel@vger.kernel.org
Subject: Re: How to reduce active mds number
Date: Tue, 3 May 2011 10:34:45 -0700	[thread overview]
Message-ID: <20110503173445.GE20739@dreamer> (raw)
In-Reply-To: <BANLkTi=BR6tDMjm_cZD6beBQ_VB4Ojj1gw@mail.gmail.com>

On Tue, May 03, 2011 at 10:07:01AM +0800, doki74216@gmail.com wrote:
> 2) I want to set the active one to standby. I excute"ceph mds
> set_max_mds 1" and "ceph mds stop 0".
>     But here is why I confuse:
>     mds0 becomes stopping not standby.??
>     It shows:
> 192.138.200.185:6800/14465 ‘1’mds0.6 up:stopping seq 14
> 192.138.200.184:6800/15442 ‘0’mds1.1 up:active seq 210

I think the confusion here is that "ceph mds stop 0" really tells it
to stop, not to go to standby. Once it finishes stopping (= has safely
exported all its data to the other mds), you can start it again, and
then it'll get to be standby.

This ASCII art from the source might explain. Ignore the extra detail:

 boot  --> standby, creating, or starting.


 dne  ---->   creating  ----->   active*
 ^ ^___________/                /  ^ ^
 |                             /  /  |
 destroying                   /  /   |
   ^                         /  /    |
   |                        /  /     |
 stopped <---- stopping* <-/  /      |
      \                      /       |
        ----- starting* ----/        |
                                     |
 failed                              |
    \                                |
     \--> replay*  --> reconnect* --> rejoin*

     * = can fail


Your mds is still in the state "stopping". To get to standby, it needs
to finish that, then get to "boot" again (by being restarted), and
then it can enter standby.

On the other hand, I can reproduce the problem of an MDS just being in
state "stopping" for along time. I'll see what others have to say
about that.


> 3) When I excute"ceph mds set_max_mds 2", mds0 doesn't become active,
>     I type"ceph mds dump -o -"
>     But it shows:
> 192.138.200.185:6800/14465 ‘1’mds0.6 up:stopping seq 14 export_targets=1
> 192.138.200.184:6800/15442 ‘0’mds1.1 up:active seq 210
>    There is no two active MDSes, why?

Your mds is still in the state "stopping". It needs to finish that
first. If you've set max_mds==2, it should get to active once it's
done.


> 4) Therefore, I still hope that there are one active mds and one
> standby mds(by default).
>     I restart the system. I execute" /etc/init.d/ceph -a stop" and "
> /etc/init.d/ceph -a start"
>     I type"ceph -s"
>     But it shows:
> mds e52:  2/2/1 up {0=up:rejoin, 1=up:resolve}
>                              ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^  what means?
>     After awhile I execue”ceph mds stat” , it shows:
> ‘e61: 2/2/1 up {o=up:relay, 1=up:relay}’ (0)
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^ what means?

The word "relay" is never mentioned in the source tree. And seeing
that "o" in there makes me think you're typing these lines in. If
you're copying log lines to email, please use copy-paste and don't
type them in manually; variation from the exact message makes helping
you harder.

"replay" is when an MDS is starting up and reading its journal,
replaying the operations stored there against the final data storage.

"resolve" is when the MDSes go through their journals and figure out
how to handle operations that can cross MDS boundaries, such as
renames across directories.


> 5) I set the man active number to one because I still want the system
> by default value(one active and one standby).
>     I execute"ceph mds set_max_mds 1"
>     It shows:
> mds e80: 2/2/1 up {0=up:rejoin, 1=up:rejoin}, 1:up:standby
> mds e80: 2/2/1 up {0=up:active, 1=up:rejoin}, 1:up:standby
> mds e80: 2/2/1 up {0=up:active, 1=up:active}, 1:up:standby
> ^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
>     I don't know what it means.
>     Why there are three statuses? Aren't there just 2 MDSes in my system?
>     I execue"ceph -s"
>     It shows:
> mds e94: 2/2/1 up {0=up:active,1=up:active}, 1 up:standby
> 
> Please help me to solve these questions..
> And teach me how to set the MDS by the default(1 active & 1 standby)?
> Thank you very much  ^^

I don't have a good answer to this one. The /1 in the 2/2/1 means your
max_mds really is 1. It might be a question of there being no
automatic transition from active to standby.

I can reproduce this problem locally, and will try to figure it out.

-- 
:(){ :|:&};:
--
To unsubscribe from this list: send the line "unsubscribe ceph-devel" in
the body of a message to majordomo@vger.kernel.org
More majordomo info at  http://vger.kernel.org/majordomo-info.html

  reply	other threads:[~2011-05-03 17:34 UTC|newest]

Thread overview: 5+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2011-04-22  9:20 How to reduce active mds number AnnyRen
2011-04-22 15:46 ` Sage Weil
2011-05-03  2:07   ` doki74216
2011-05-03 17:34     ` Tommi Virtanen [this message]
2011-05-03 17:51       ` Tommi Virtanen

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20110503173445.GE20739@dreamer \
    --to=tommi.virtanen@dreamhost.com \
    --cc=ceph-devel@vger.kernel.org \
    --cc=doki74216@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.