* Ho to identify location of Primary Copy Of Obj ?
@ 2012-09-25 9:30 hemant surale
2012-09-25 20:34 ` Dan Mick
0 siblings, 1 reply; 9+ messages in thread
From: hemant surale @ 2012-09-25 9:30 UTC (permalink / raw)
To: ceph-devel
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.
^ permalink raw reply [flat|nested] 9+ messages in thread* Re: Ho to identify location of Primary Copy Of Obj ? 2012-09-25 9:30 Ho to identify location of Primary Copy Of Obj ? hemant surale @ 2012-09-25 20:34 ` Dan Mick 2012-09-25 21:29 ` Sage Weil 2012-09-26 6:54 ` hemant surale 0 siblings, 2 replies; 9+ messages in thread From: Dan Mick @ 2012-09-25 20:34 UTC (permalink / raw) To: hemant surale; +Cc: ceph-devel Hemant: Yes, you can. Use ceph osd getmap -o <file> to get the OSD map, and then use osdmaptool --find-object-map <objectname> <file> 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 > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Ho to identify location of Primary Copy Of Obj ? 2012-09-25 20:34 ` Dan Mick @ 2012-09-25 21:29 ` Sage Weil 2012-09-26 10:59 ` hemant surale 2012-09-26 6:54 ` hemant surale 1 sibling, 1 reply; 9+ messages in thread From: Sage Weil @ 2012-09-25 21:29 UTC (permalink / raw) To: Dan Mick; +Cc: hemant surale, ceph-devel On Tue, 25 Sep 2012, Dan Mick wrote: > Hemant: > > Yes, you can. Use ceph osd getmap -o <file> to get the OSD map, and then use > osdmaptool --find-object-map <objectname> <file> 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. You can do this more simply with: ceph osd map <poolname> <objectname> sage > > 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 > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Ho to identify location of Primary Copy Of Obj ? 2012-09-25 21:29 ` Sage Weil @ 2012-09-26 10:59 ` hemant surale 0 siblings, 0 replies; 9+ messages in thread From: hemant surale @ 2012-09-26 10:59 UTC (permalink / raw) To: Sage Weil, Dan Mick; +Cc: ceph-devel Hi Sage, Dan , When I tried to execute cmd " osdmaptool --test-map-object "anyrandomname" osdmap " it still shows some random number as mapped osds. Because I havnt created Object even for that result is shown as some random numbers/ as osds where that Object is mapped. And with replication factor of 3 , I think " osdmaptool --test-map-object Objname osdmap" should show 3 nodes at least . But currently it shows only 1 node . Please help me out . Thanks & Regards, Hemant Surale. On Wed, Sep 26, 2012 at 2:59 AM, Sage Weil <sage@inktank.com> wrote: > On Tue, 25 Sep 2012, Dan Mick wrote: >> Hemant: >> >> Yes, you can. Use ceph osd getmap -o <file> to get the OSD map, and then use >> osdmaptool --find-object-map <objectname> <file> 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. > > You can do this more simply with: > > ceph osd map <poolname> <objectname> > > sage > >> >> 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 >> >> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Ho to identify location of Primary Copy Of Obj ? 2012-09-25 20:34 ` Dan Mick 2012-09-25 21:29 ` Sage Weil @ 2012-09-26 6:54 ` hemant surale 2012-09-26 15:21 ` Sage Weil 1 sibling, 1 reply; 9+ messages in thread From: hemant surale @ 2012-09-26 6:54 UTC (permalink / raw) To: Dan Mick; +Cc: ceph-devel 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] . - Hemant Surale. On Wed, Sep 26, 2012 at 2:04 AM, Dan Mick <dan.mick@inktank.com> wrote: > Hemant: > > Yes, you can. Use ceph osd getmap -o <file> to get the OSD map, and then > use osdmaptool --find-object-map <objectname> <file> 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 >> > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Ho to identify location of Primary Copy Of Obj ? 2012-09-26 6:54 ` hemant surale @ 2012-09-26 15:21 ` Sage Weil 2012-09-26 21:53 ` Dan Mick 0 siblings, 1 reply; 9+ messages in thread From: Sage Weil @ 2012-09-26 15:21 UTC (permalink / raw) To: hemant surale; +Cc: Dan Mick, ceph-devel 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 <dan.mick@inktank.com> wrote: > > Hemant: > > > > Yes, you can. Use ceph osd getmap -o <file> to get the OSD map, and then > > use osdmaptool --find-object-map <objectname> <file> 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 > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Ho to identify location of Primary Copy Of Obj ? 2012-09-26 15:21 ` Sage Weil @ 2012-09-26 21:53 ` Dan Mick 2012-09-26 23:41 ` Sage Weil 0 siblings, 1 reply; 9+ messages in thread From: Dan Mick @ 2012-09-26 21:53 UTC (permalink / raw) To: hemant surale; +Cc: ceph-devel Ah, yeah, that assumption would be a problem. So, Hemant, does ceph osd dump <poolname> <objectname> 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 <dan.mick@inktank.com> wrote: >>> Hemant: >>> >>> Yes, you can. Use ceph osd getmap -o <file> to get the OSD map, and then >>> use osdmaptool --find-object-map <objectname> <file> 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 >> >> ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Ho to identify location of Primary Copy Of Obj ? 2012-09-26 21:53 ` Dan Mick @ 2012-09-26 23:41 ` Sage Weil 2012-09-27 5:11 ` Dan Mick 0 siblings, 1 reply; 9+ messages in thread From: Sage Weil @ 2012-09-26 23:41 UTC (permalink / raw) To: Dan Mick; +Cc: hemant surale, ceph-devel On Wed, 26 Sep 2012, Dan Mick wrote: > Ah, yeah, that assumption would be a problem. > > So, Hemant, does > ceph osd dump <poolname> <objectname> Ahem, ceph osd map <poolname> <objectname> :) 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 <dan.mick@inktank.com> wrote: > > > > Hemant: > > > > > > > > Yes, you can. Use ceph osd getmap -o <file> to get the OSD map, and > > > > then > > > > use osdmaptool --find-object-map <objectname> <file> 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 > > ^ permalink raw reply [flat|nested] 9+ messages in thread
* Re: Ho to identify location of Primary Copy Of Obj ? 2012-09-26 23:41 ` Sage Weil @ 2012-09-27 5:11 ` Dan Mick 0 siblings, 0 replies; 9+ messages in thread From: Dan Mick @ 2012-09-27 5:11 UTC (permalink / raw) To: Sage Weil; +Cc: hemant surale, ceph-devel 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 <poolname> <objectname> > > Ahem, > > ceph osd map <poolname> <objectname> > > :) 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 <dan.mick@inktank.com> wrote: >>>>> Hemant: >>>>> >>>>> Yes, you can. Use ceph osd getmap -o <file> to get the OSD map, and >>>>> then >>>>> use osdmaptool --find-object-map <objectname> <file> 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 >> >> ^ permalink raw reply [flat|nested] 9+ messages in thread
end of thread, other threads:[~2012-09-27 5:11 UTC | newest] Thread overview: 9+ messages (download: mbox.gz follow: Atom feed -- links below jump to the message on this page -- 2012-09-25 9:30 Ho to identify location of Primary Copy Of Obj ? hemant surale 2012-09-25 20:34 ` Dan Mick 2012-09-25 21:29 ` Sage Weil 2012-09-26 10:59 ` hemant surale 2012-09-26 6:54 ` hemant surale 2012-09-26 15:21 ` Sage Weil 2012-09-26 21:53 ` Dan Mick 2012-09-26 23:41 ` Sage Weil 2012-09-27 5:11 ` Dan Mick
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.