Skip to contentSkip to conversation

OSD per disk.

DISCUSSION chandrashekhar 5 participants 11 messages May 28, 2012 – Jun 5, 2012 1 message not in the archive

lore
Share & tools
lore
#0 lore raw

Hi,

I want to setup a ceph cluster with 4 osds ( one OSD per disk), 2 mons, 1
mds. Please help me to configure this.

I have a machine with following hardware:

4 hard disks ( each 500GB).

/dev/sda - 500G ( OS )
/dev/sdb - 500G
/dev/sdc - 500G
/dev/sdd - 500G

OS: ubuntu 12.O4 server ( 64 bit )

Thanks,
Chandra.

#1 lore raw

Hi, just defined osds in ceph.conf, they mount each disk in correct mountpoint.

this example :
1st server :
/dev/sdb1 -> /data/osd0
/dev/sdc1 -> /data/osd1
/dev/sdd1 -> /data/osd2
....
same for journal.(you can use differents disk for journal or use another partition on same disk)

ceph.conf
[osd]

osd data = /data/osd$id
osd journal = /data/osd$id/journal
osd journal size = 512

[osd.0]
host = ceph-node-1

[osd.1]
host = ceph-node-1

[osd.2]
host = ceph-node-1

[osd.3]
host = ceph-node-2

[osd.4]
host = ceph-node-2

----- Mail original -----

De: "chandrashekhar" <[email protected]>
À: [email protected]
Envoyé: Lundi 28 Mai 2012 08:19:17
Objet: OSD per disk.

Hi,

I want to setup a ceph cluster with 4 osds ( one OSD per disk), 2 mons, 1 mds. Please help me to configure this.

I have a machine with following hardware:

4 hard disks ( each 500GB).

/dev/sda - 500G ( OS )
/dev/sdb - 500G
/dev/sdc - 500G
/dev/sdd - 500G

OS: ubuntu 12.O4 server ( 64 bit )

Thanks,
Chandra.

Signature · 24 lines
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 



-- 

-- 




	Alexandre D erumier 
Ingénieur Système 
Fixe : 03 20 68 88 90 
Fax : 03 20 68 90 81 
45 Bvd du Général Leclerc 59100 Roubaix - France 
12 rue Marivaux 75002 Paris - France 
	
--
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
#2 lore raw
Quoted 10 lines · Alexandre DERUMIER <aderumier <at> odiso.com> writes:

Hi, just defined osds in ceph.conf, they mount each disk in correct mountpoint.

this example :
1st server :
/dev/sdb1 -> /data/osd0
/dev/sdc1 -> /data/osd1
/dev/sdd1 -> /data/osd2
....
same for journal.(you can use differents disk for journal or use another

partition on same disk)

Quoted 44 lines

ceph.conf
[osd]

osd data = /data/osd$id
osd journal = /data/osd$id/journal
osd journal size = 512

[osd.0]
host = ceph-node-1

[osd.1]
host = ceph-node-1

[osd.2]
host = ceph-node-1

[osd.3]
host = ceph-node-2

[osd.4]
host = ceph-node-2

----- Mail original -----

De: "chandrashekhar" <chandubigc <at> gmail.com>
À: ceph-devel <at> vger.kernel.org
Envoyé: Lundi 28 Mai 2012 08:19:17
Objet: OSD per disk.

Hi,

I want to setup a ceph cluster with 4 osds ( one OSD per disk), 2 mons, 1 mds. Please help me to configure this.

I have a machine with following hardware:

4 hard disks ( each 500GB).

/dev/sda - 500G ( OS )
/dev/sdb - 500G
/dev/sdc - 500G
/dev/sdd - 500G

Quoted 5 lines

OS: ubuntu 12.O4 server ( 64 bit )

Thanks,
Chandra.

Thanks Alexandre, I created four directories in /data (osd0,osd1,osd2,osd3) and mounted as below:

/dev/sdb1 -> /data/osd1
/dev/sdc1 -> /data/osd2
/dev/sdd1 -> /data/osd3

But when I start ceph its starting mons and md daemons but not osds. Please help me to get this working.

Quoted 1 line

ceph -w

2012-05-28 14:43:23.756895    pg v2: 792 pgs: 792 creating; 0 bytes data, 0 KB
used, 0 KB / 0 KB avail
2012-05-28 14:43:23.762160   mds e1: 0/0/1 up
2012-05-28 14:43:23.762296   osd e1: 0 osds: 0 up, 0 in
2012-05-28 14:43:23.762586   log 2012-05-28 14:24:15.391671 mon.0
192.168.7.10:6789/0 4 : [INF] mon.a@0 won leader election with quorum 0,1
2012-05-28 14:43:23.762741   mon e1: 2 mons at

{a=192.168.7.10:6789/0,b=192.168.7.10:6790/0}

Here is my ceph.conf:
-------------------------------------------------
[global]
auth supported = cephx
keyring = /etc/ceph/keyring.admin

[mon]
mon data = /data/mon.$id

[mds]

[osd]
osd data = /data/osd$id
osd journal = /data/osd$id/osd.$id.journal
osd journal size = 1000

[mon.a]
host = testnode
mon addr = 192.168.7.10:6789
[mon.b]
host = testnode
mon addr = 192.168.7.10:6790

[osd.0]
host = testnode

[osd.1]
host = testnode

[osd.2]
host = testnode

[osd.3]
host = testnode
[mds.a]
host = testnode

--
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

#3 lore raw

maybe try

[osd.0]
host = testnode
osd data = /data/osd0
osd journal = /data/osd0/osd0journal
osd journal size = 1000

[osd.1]
host = testnode
osd data = /data/osd1
osd journal = /data/osd1/osd1journal
osd journal size = 1000
[osd.2]
host = testnode
osd data = /data/osd2
osd journal = /data/osd2/osd2journal
osd journal size = 1000
[osd.3]
host = testnode
osd data = /data/osd3
osd journal = /data/osd3/osd3journal
osd journal size = 1000

you can start osd with

/etc/init.d/ceph start osd0
/etc/init.d/ceph start osd1
/etc/init.d/ceph start osd2
/etc/init.d/ceph start osd3

----- Mail original -----

De: "chandrashekhar" <[email protected]>
À: [email protected]
Envoyé: Lundi 28 Mai 2012 11:25:36
Objet: Re: OSD per disk.

Quoted 10 lines · Alexandre DERUMIER <aderumier <at> odiso.com> writes:

Hi, just defined osds in ceph.conf, they mount each disk in correct mountpoint.

this example :
1st server :
/dev/sdb1 -> /data/osd0
/dev/sdc1 -> /data/osd1
/dev/sdd1 -> /data/osd2
....
same for journal.(you can use differents disk for journal or use another

partition on same disk)

Quoted 44 lines

ceph.conf
[osd]

osd data = /data/osd$id
osd journal = /data/osd$id/journal
osd journal size = 512

[osd.0]
host = ceph-node-1

[osd.1]
host = ceph-node-1

[osd.2]
host = ceph-node-1

[osd.3]
host = ceph-node-2

[osd.4]
host = ceph-node-2

----- Mail original -----

De: "chandrashekhar" <chandubigc <at> gmail.com>
À: ceph-devel <at> vger.kernel.org
Envoyé: Lundi 28 Mai 2012 08:19:17
Objet: OSD per disk.

Hi,

I want to setup a ceph cluster with 4 osds ( one OSD per disk), 2 mons, 1 mds. Please help me to configure this.

I have a machine with following hardware:

4 hard disks ( each 500GB).

/dev/sda - 500G ( OS )
/dev/sdb - 500G
/dev/sdc - 500G
/dev/sdd - 500G

Quoted 5 lines

OS: ubuntu 12.O4 server ( 64 bit )

Thanks,
Chandra.

Thanks Alexandre, I created four directories in /data (osd0,osd1,osd2,osd3) and mounted as below:

/dev/sdb1 -> /data/osd1
/dev/sdc1 -> /data/osd2
/dev/sdd1 -> /data/osd3

But when I start ceph its starting mons and md daemons but not osds. Please help me to get this working.

Quoted 1 line

ceph -w

2012-05-28 14:43:23.756895 pg v2: 792 pgs: 792 creating; 0 bytes data, 0 KB 
used, 0 KB / 0 KB avail 
2012-05-28 14:43:23.762160 mds e1: 0/0/1 up 
2012-05-28 14:43:23.762296 osd e1: 0 osds: 0 up, 0 in 
2012-05-28 14:43:23.762586 log 2012-05-28 14:24:15.391671 mon.0 
192.168.7.10:6789/0 4 : [INF] mon.a@0 won leader election with quorum 0,1 
2012-05-28 14:43:23.762741 mon e1: 2 mons at 

{a=192.168.7.10:6789/0,b=192.168.7.10:6790/0}

Here is my ceph.conf:
-------------------------------------------------
[global]
auth supported = cephx
keyring = /etc/ceph/keyring.admin

[mon]
mon data = /data/mon.$id

[mds]

[osd]
osd data = /data/osd$id
osd journal = /data/osd$id/osd.$id.journal
osd journal size = 1000

[mon.a]
host = testnode
mon addr = 192.168.7.10:6789
[mon.b]
host = testnode
mon addr = 192.168.7.10:6790

[osd.0]
host = testnode

[osd.1]
host = testnode

[osd.2]
host = testnode

[osd.3]
host = testnode
[mds.a]
host = testnode

Signature · 24 lines
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 



-- 

-- 




	Alexandre D erumier 
Ingénieur Système 
Fixe : 03 20 68 88 90 
Fax : 03 20 68 90 81 
45 Bvd du Général Leclerc 59100 Roubaix - France 
12 rue Marivaux 75002 Paris - France 
	
--
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
#4 lore raw
Quoted 7 lines · Alexandre DERUMIER

maybe try

[osd.0]
host = testnode
osd data = /data/osd0
osd journal = /data/osd0/osd0journal
osd journal size = 1000

That shouldn't be needed. osd.0 will happily read the [osd] section in the config file.

#5 lore raw
In reply to chandrashekhar
Quoted 10 lines · chandrashekhar

Thanks Alexandre,  I created four directories in /data  (osd0,osd1,osd2,osd3) and mounted as below:

/dev/sdb1 -> /data/osd1
/dev/sdc1 -> /data/osd2
/dev/sdd1 -> /data/osd3

But when I start ceph its starting mons and md daemons but not osds. Please help me to get this working.

How did you create the cluster? mkcephfs?

Do you see log entries in /var/log/ceph/*osd*.log ? What do they say? --
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

A message that is not in the archive (sent off-list or not yet received): CA+7V1=Ey224p64Wo0172OrTTiA0sbg9x_13aJwRvBr7VRySHbQ@mail.gmail.com

#7 lore raw

For the benefit of the mailing list; there's an assert(nlock > 0) crash in there.

---------- Forwarded message ----------
From: chandrashekhar mekala <[email protected]>
Date: Tue, May 29, 2012 at 9:51 PM
Subject: Re: OSD per disk.
To: Tommi Virtanen <[email protected]>

Yes , I am using mkcephfs to create  cluster.

osd.1.log
-------------------------

2012-05-30 10:17:58.948426 7f98b4856780 journal close /data/osd.1/osd.1.journal

./common/Mutex.h: In function 'void Mutex::Unlock()' thread 7f98b4856780 time 2012-05-30 10:17:58.948800 ./common/Mutex.h: 117: FAILED assert(nlock > 0)
 ceph version 0.41 (commit:c1345f7136a0af55d88280ffe4b58339aaf28c9d) 1: (Mutex::Unlock()+0x93) [0x4f5c73]
 2: (OSD::init()+0x459) [0x546b79]
 3: (main()+0x2496) [0x4a8bc6]
 4: (__libc_start_main()+0xed) [0x7f98b2d2676d]
 5: /usr/bin/ceph-osd() [0x4aa68d]
 ceph version 0.41 (commit:c1345f7136a0af55d88280ffe4b58339aaf28c9d) 1: (Mutex::Unlock()+0x93) [0x4f5c73]
 2: (OSD::init()+0x459) [0x546b79]
 3: (main()+0x2496) [0x4a8bc6]
 4: (__libc_start_main()+0xed) [0x7f98b2d2676d]
 5: /usr/bin/ceph-osd() [0x4aa68d]
*** Caught signal (Aborted) **
 in thread 7f98b4856780
 ceph version 0.41 (commit:c1345f7136a0af55d88280ffe4b58339aaf28c9d) 1: /usr/bin/ceph-osd() [0x5fb1d6]
 2: (()+0xfcb0) [0x7f98b3ef2cb0]
 3: (gsignal()+0x35) [0x7f98b2d3b445]
 4: (abort()+0x17b) [0x7f98b2d3ebab]
 5: (__gnu_cxx::__verbose_terminate_handler()+0x11d) [0x7f98b368969d] 6: (()+0xb5846) [0x7f98b3687846]
 7: (()+0xb5873) [0x7f98b3687873]
 8: (()+0xb596e) [0x7f98b368796e]
 9: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x200) [0x5ce010]
 10: (Mutex::Unlock()+0x93) [0x4f5c73]
 11: (OSD::init()+0x459) [0x546b79]
 12: (main()+0x2496) [0x4a8bc6]
 13: (__libc_start_main()+0xed) [0x7f98b2d2676d]
 14: /usr/bin/ceph-osd() [0x4aa68d]

Quoted 10 lines · Tommi Virtanen
Quoted 8 lines · chandrashekhar

Thanks Alexandre,  I created four directories in /data  (osd0,osd1,osd2,osd3) and mounted as below:

/dev/sdb1 -> /data/osd1
/dev/sdc1 -> /data/osd2
/dev/sdd1 -> /data/osd3

Quoted 6 lines
Quoted 2 lines

But when I start ceph its starting mons and md daemons but not osds. Please help me to get this working.

How did you create the cluster? mkcephfs?

Do you see log entries in /var/log/ceph/*osd*.log ? What do they say?

--
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

#8 lore raw

That bug was fixed in f859f25d7eaec01fb6a82b88409d005c8177fea2.

It actually appears to mean that the osd failed to authenticate. -Sam

Quoted 52 lines · Tommi Virtanen

For the benefit of the mailing list; there's an assert(nlock > 0) crash in there.

---------- Forwarded message ----------
From: chandrashekhar mekala <[email protected]>
Date: Tue, May 29, 2012 at 9:51 PM
Subject: Re: OSD per disk.
To: Tommi Virtanen <[email protected]>

Yes , I am using mkcephfs to create  cluster.

osd.1.log
-------------------------

2012-05-30 10:17:58.948426 7f98b4856780 journal close /data/osd.1/osd.1.journal

./common/Mutex.h: In function 'void Mutex::Unlock()' thread 7f98b4856780 time 2012-05-30 10:17:58.948800 ./common/Mutex.h: 117: FAILED assert(nlock > 0)
 ceph version 0.41 (commit:c1345f7136a0af55d88280ffe4b58339aaf28c9d) 1: (Mutex::Unlock()+0x93) [0x4f5c73]
 2: (OSD::init()+0x459) [0x546b79]
 3: (main()+0x2496) [0x4a8bc6]
 4: (__libc_start_main()+0xed) [0x7f98b2d2676d]
 5: /usr/bin/ceph-osd() [0x4aa68d]
 ceph version 0.41 (commit:c1345f7136a0af55d88280ffe4b58339aaf28c9d) 1: (Mutex::Unlock()+0x93) [0x4f5c73]
 2: (OSD::init()+0x459) [0x546b79]
 3: (main()+0x2496) [0x4a8bc6]
 4: (__libc_start_main()+0xed) [0x7f98b2d2676d]
 5: /usr/bin/ceph-osd() [0x4aa68d]
*** Caught signal (Aborted) **
 in thread 7f98b4856780
 ceph version 0.41 (commit:c1345f7136a0af55d88280ffe4b58339aaf28c9d) 1: /usr/bin/ceph-osd() [0x5fb1d6]
 2: (()+0xfcb0) [0x7f98b3ef2cb0]
 3: (gsignal()+0x35) [0x7f98b2d3b445]
 4: (abort()+0x17b) [0x7f98b2d3ebab]
 5: (__gnu_cxx::__verbose_terminate_handler()+0x11d) [0x7f98b368969d] 6: (()+0xb5846) [0x7f98b3687846]
 7: (()+0xb5873) [0x7f98b3687873]
 8: (()+0xb596e) [0x7f98b368796e]
 9: (ceph::__ceph_assert_fail(char const*, char const*, int, char const*)+0x200) [0x5ce010]
 10: (Mutex::Unlock()+0x93) [0x4f5c73]
 11: (OSD::init()+0x459) [0x546b79]
 12: (main()+0x2496) [0x4a8bc6]
 13: (__libc_start_main()+0xed) [0x7f98b2d2676d]
 14: /usr/bin/ceph-osd() [0x4aa68d]

Quoted 17 lines
Quoted 16 lines · Tommi Virtanen
Quoted 10 lines · chandrashekhar

Thanks Alexandre,  I created four directories in /data  (osd0,osd1,osd2,osd3) and mounted as below:

/dev/sdb1 -> /data/osd1
/dev/sdc1 -> /data/osd2
/dev/sdd1 -> /data/osd3

But when I start ceph its starting mons and md daemons but not osds. Please help me to get this working.

How did you create the cluster? mkcephfs?

Do you see log entries in /var/log/ceph/*osd*.log ? What do they say?

--
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

#9 lore raw
Quoted 1 line
Quoted 1 line

I built ceph from source ( f859f25d7eaec01fb6a82b88409d005c8177fea2 branch).

mkcephfs -a -c /etc/ceph/ceph.conf -k /etc/ceph/keyring.admin -- is working fine, but when I tried to start ceph its showing following error.

Quoted 1 line

strace ceph -a start

rt_sigprocmask(SIG_SETMASK, [PIPE], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [PIPE], [PIPE], 8) = 0
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f1cc5a49000
mprotect(0x7f1cc5a49000, 4096, PROT_NONE) = 0 clone(child_stack=0x7f1cc6248f70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM |CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f1cc62499d0, tls=0x7f1cc6249700, child_tidptr=0x7f1cc62499d0) =
21042
rt_sigprocmask(SIG_SETMASK, [PIPE], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [PIPE], [PIPE], 8) = 0
mmap(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK,
-1, 0) = 0x7f1ccaa98000
mprotect(0x7f1ccaa98000, 4096, PROT_NONE) = 0 clone(child_stack=0x7f1ccab97f70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD| CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f1ccab989d0, tls=0x7f1ccab98700, child_tidptr=0x7f1ccab989d0) = 21043
rt_sigprocmask(SIG_SETMASK, [PIPE], NULL, 8) = 0
futex(0x201b904, FUTEX_WAIT_PRIVATE, 1, NULL

#10 lore raw
Quoted 5 lines · chandrashekhar
Quoted 1 line
Quoted 1 line

I built ceph from source ( f859f25d7eaec01fb6a82b88409d005c8177fea2  branch).

mkcephfs -a -c /etc/ceph/ceph.conf  -k /etc/ceph/keyring.admin -- is working fine, but when I tried to start ceph its showing following error.

I'm sorry, perhaps part of the email got cut or something, but all I see is a snippet of strace where things succeed -- what's the error you saw?

Quoted 18 lines
Quoted 1 line

strace ceph -a start

rt_sigprocmask(SIG_SETMASK, [PIPE], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [PIPE], [PIPE], 8) = 0
mmap(NULL, 8392704, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK, -1, 0) = 0x7f1cc5a49000
mprotect(0x7f1cc5a49000, 4096, PROT_NONE) = 0 clone(child_stack=0x7f1cc6248f70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD|CLONE_SYSVSEM |CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f1cc62499d0, tls=0x7f1cc6249700, child_tidptr=0x7f1cc62499d0) =
21042
rt_sigprocmask(SIG_SETMASK, [PIPE], NULL, 8) = 0 rt_sigprocmask(SIG_BLOCK, [PIPE], [PIPE], 8) = 0
mmap(NULL, 1052672, PROT_READ|PROT_WRITE, MAP_PRIVATE|MAP_ANONYMOUS|MAP_STACK,
-1, 0) = 0x7f1ccaa98000

Quoted 8 lines

mprotect(0x7f1ccaa98000, 4096, PROT_NONE) = 0 clone(child_stack=0x7f1ccab97f70, flags=CLONE_VM|CLONE_FS|CLONE_FILES|CLONE_SIGHAND|CLONE_THREAD| CLONE_SYSVSEM|CLONE_SETTLS|CLONE_PARENT_SETTID|CLONE_CHILD_CLEARTID, parent_tidptr=0x7f1ccab989d0, tls=0x7f1ccab98700, child_tidptr=0x7f1ccab989d0) = 21043
rt_sigprocmask(SIG_SETMASK, [PIPE], NULL, 8) = 0
futex(0x201b904, FUTEX_WAIT_PRIVATE, 1, NULL

--
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

#11 lore raw
In reply to chandrashekhar
Quoted 2 lines · chandrashekhar

I want to setup a ceph cluster with 4 osds ( one OSD per disk), 2 mons, 1
mds. Please help me to configure this.

You almost certainly do not want to have 2 MON nodes in your cluster; an odd number of nodes is strongly recommended.

(Reason: a strict majority of MON odes must be up and functional to maintain quorum; increasing the number of MONs from 1 to 2 makes failures more likely but does not increase resiliency.)

Cheers,
David

Signature · 2 lines
David McBride <[email protected]>
Department of Computing, Imperial College, London