From mboxrd@z Thu Jan 1 00:00:00 1970 From: Dan Mick Subject: Re: Ho to identify location of Primary Copy Of Obj ? Date: Wed, 26 Sep 2012 22:11:39 -0700 Message-ID: <5063E00B.9090605@inktank.com> References: <50621552.2050900@inktank.com> <50637957.2070800@inktank.com> Mime-Version: 1.0 Content-Type: text/plain; charset=ISO-8859-1; format=flowed Content-Transfer-Encoding: 7bit Return-path: Received: from mail-pb0-f46.google.com ([209.85.160.46]:57850 "EHLO mail-pb0-f46.google.com" rhost-flags-OK-OK-OK-OK) by vger.kernel.org with ESMTP id S1751332Ab2I0FLm (ORCPT ); Thu, 27 Sep 2012 01:11:42 -0400 Received: by pbbrr4 with SMTP id rr4so2999590pbb.19 for ; Wed, 26 Sep 2012 22:11:41 -0700 (PDT) In-Reply-To: Sender: ceph-devel-owner@vger.kernel.org List-ID: To: Sage Weil Cc: hemant surale , ceph-devel@vger.kernel.org AGH! So sorry Hemant. I really was thinking 'map' when I typed that. On 09/26/2012 04:41 PM, Sage Weil wrote: > On Wed, 26 Sep 2012, Dan Mick wrote: >> Ah, yeah, that assumption would be a problem. >> >> So, Hemant, does >> ceph osd dump > > Ahem, > > ceph osd map > > :) sage > >> >> show you information that makes sense? >> >> On 09/26/2012 08:21 AM, Sage Weil wrote: >>> On Wed, 26 Sep 2012, hemant surale wrote: >>>> Hi Dan , >>>> I have set replication factor to 3 of pool 'newbyh' . Then when i >>>> tried to execute cmds told by you I got that it reported like >>>> >>>> ---------------------------------------------------- >>>> root@third-virtual-machine:~# osdmaptool --test-map-object Obj1 osdmap >>>> osdmaptool: osdmap file 'osdmap' >>>> object 'Obj1' -> 0.c3c4 -> [0,1] >>>> ----------------------------------------------------- >>>> >>>> I even checked manually the dirs at every node . it shows proper data >>>> available within osd0,osd1 & osd2 . ( i hve 3 node cluster using VM >>>> Ceph v0.36 ) >>>> >>>> So my questions is why in above execution it shows that Obj1 is at >>>> [0,1] .. it should report all nodes like [0,1,2] . >>> >>> The --test-map-object is currently somewhat useless because it assumes >>> pool 0 ('data'), and your object is probably in a different pool. >>> >>> sage >>> >>>> >>>> >>>> >>>> - >>>> Hemant Surale. >>>> >>>> On Wed, Sep 26, 2012 at 2:04 AM, Dan Mick wrote: >>>>> Hemant: >>>>> >>>>> Yes, you can. Use ceph osd getmap -o to get the OSD map, and >>>>> then >>>>> use osdmaptool --find-object-map to output the >>>>> PG the object hashes to and the list of OSDs that PG maps to (primary >>>>> first): >>>>> >>>>> $ ceph osd getmap -o osdmap >>>>> got osdmap epoch 59 >>>>> $ osdmaptool --test-map-object dmick.rbd osdmap >>>>> osdmaptool: osdmap file 'osdmap' >>>>> object 'dmick.rbd' -> 0.69c8 -> [3,1] >>>>> >>>>> shows dmick.rbd mapping to pg 0.69c8, which in turn maps to OSDs 3 and >>>>> 1, 3 >>>>> being the primary. >>>>> >>>>> >>>>> On 09/25/2012 02:30 AM, hemant surale wrote: >>>>>> >>>>>> Hi Community, >>>>>> Is it possible to identify where exactly primary copy of >>>>>> obj >>>>>> is stored ? I am using crushmaps to use specific osds for data >>>>>> placement but i want to knw the primary capoy location. Or I need to >>>>>> replace pseudo random function by some deterministic function to guide >>>>>> ceph to utilize specific osd? >>>>>> >>>>>> >>>>>> Regards, >>>>>> Hemant Surale. >>>>>> -- >>>>>> 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 >>>>>> >>>>> >>>> -- >>>> 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 >>>> >>>> >> -- >> 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 >> >>