Project

General

Profile

Actions

Bug #1016

closed

ceph 0.26,crushmap change,mount fail.

Added by changping Wu about 13 years ago. Updated almost 7 years ago.

Status:
Closed
Priority:
Normal
Assignee:
-
Category:
-
Target version:
-
% Done:

0%

Source:
Tags:
Backport:
Regression:
No
Severity:
3 - minor
Reviewed:
Affected Versions:
ceph-qa-suite:
Component(RADOS):
Pull request ID:
Crash signature (v1):
Crash signature (v2):

Description

Hi ,

ceph 0.26 ,change crushmap,then at a client ,mount ceph ,but fail.ceph.conf/crush.new.txt/crush.origin.txt/ attached.

It could take the following steps to reproduce this issue:

$mkcephfs -c /etc/ceph/ceph.conf -a -v -k /etc/ceph/adminkeyring
$init-ceph -c /etc/ceph/ceph.conf -a -v start
waiting for mds stat chage to "mds e5: 1/1/1 up {0=up:active}, 1 up:standby"
then:

$crushtool -c crush.new.txt -o crush.new
$ceph osd setcrushmap -i crush.new

root@ubuntu-mon0:/etc/ceph/crushmap# ceph -s
2011-04-19 13:13:09.012541 pg v55: 1584 pgs: 1584 active+clean; 22 KB data, 27720 KB used, 1200 GB / 1200 GB avail
2011-04-19 13:13:09.014376 mds e5: 1/1/1 up {0=up:active}, 1 up:standby
2011-04-19 13:13:09.014404 osd e11: 6 osds: 6 up, 6 in
2011-04-19 13:13:09.014449 log 2011-04-19 22:12:25.099880 osd3 172.16.35.76:6803/18151 8 : [INF] 0.19 scrub ok
2011-04-19 13:13:09.014502 mon e1: 3 mons at {0=172.16.35.10:6789/0,1=172.16.35.10:6790/0,2=172.16.35.10:6791/0}

at a client ,
loaded libceph.ko ceph.ko
type :
$ sudo mount -t ceph 172.16.35.10:6789:/ /mnt/ceph/ -o mount_timeout=5
but printk:
mount error 5 = Input/output error

Jeff ,Wu


Files

ceph.conf (3.61 KB) ceph.conf changping Wu, 04/19/2011 12:12 AM
crush.origin.txt (982 Bytes) crush.origin.txt changping Wu, 04/19/2011 12:12 AM
crush.new.txt (1.42 KB) crush.new.txt changping Wu, 04/19/2011 12:12 AM
Actions #1

Updated by changping Wu about 13 years ago

Hi ,
ceph 0.27 ,
i take the following steps, this issue doesn't exit.
1).
root@ubuntu-mon0:/etc/ceph/crushmap# crushtool --num_osds 6 -o file --build host straw 2 root straw 0
2011-04-27 10:12:16.855925 7f62ff3df720 layer 1 host bucket type straw 2
2011-04-27 10:12:16.855983 7f62ff3df720 lower_items [0,1,2,3,4,5]
2011-04-27 10:12:16.855989 7f62ff3df720 lower_weights [65536,65536,65536,65536,65536,65536]
2011-04-27 10:12:16.855993 7f62ff3df720 item 0 weight 65536
2011-04-27 10:12:16.855997 7f62ff3df720 item 1 weight 65536
2011-04-27 10:12:16.856008 7f62ff3df720 in bucket -1 'host0' size 2 weight 131072
2011-04-27 10:12:16.856013 7f62ff3df720 item 2 weight 65536
2011-04-27 10:12:16.856017 7f62ff3df720 item 3 weight 65536
2011-04-27 10:12:16.856023 7f62ff3df720 in bucket -2 'host1' size 2 weight 131072
2011-04-27 10:12:16.856028 7f62ff3df720 item 4 weight 65536
2011-04-27 10:12:16.856032 7f62ff3df720 item 5 weight 65536
2011-04-27 10:12:16.856038 7f62ff3df720 in bucket -3 'host2' size 2 weight 131072
2011-04-27 10:12:16.856043 7f62ff3df720 layer 2 root bucket type straw 0
2011-04-27 10:12:16.856048 7f62ff3df720 lower_items [-1,-2,-3]
2011-04-27 10:12:16.856053 7f62ff3df720 lower_weights [131072,131072,131072]
2011-04-27 10:12:16.856057 7f62ff3df720 item -1 weight 131072
2011-04-27 10:12:16.856061 7f62ff3df720 item -2 weight 131072
2011-04-27 10:12:16.856065 7f62ff3df720 item -3 weight 131072
2011-04-27 10:12:16.856072 7f62ff3df720 in bucket -4 'root' size 3 weight 393216
2011-04-27 10:12:16.856080 7f62ff3df720 crush max_devices 6
root@ubuntu-mon0:/etc/ceph/crushmap# ls

2).
root@ubuntu-mon0:/etc/ceph/crushmap# crushtool -d file
  1. begin crush map
  1. devices
    device 0 device0
    device 1 device1
    device 2 device2
    device 3 device3
    device 4 device4
    device 5 device5
  1. types
    type 0 device
    type 1 host
    type 2 root
  1. buckets
    host host0 {
    id -1 # do not change unnecessarily
    alg straw
    hash 0 # rjenkins1
    item device0 weight 1.000
    item device1 weight 1.000
    }
    host host1 {
    id -2 # do not change unnecessarily
    alg straw
    hash 0 # rjenkins1
    item device2 weight 1.000
    item device3 weight 1.000
    }
    host host2 {
    id -3 # do not change unnecessarily
    alg straw
    hash 0 # rjenkins1
    item device4 weight 1.000
    item device5 weight 1.000
    }
    root root {
    id -4 # do not change unnecessarily
    alg straw
    hash 0 # rjenkins1
    item host0 weight 2.000
    item host1 weight 2.000
    item host2 weight 2.000
    }
  1. rules
    rule data {
    ruleset 1
    type replicated
    min_size 2
    max_size 2
    step take root
    step chooseleaf firstn 0 type host
    step emit
    }
  1. end crush map

3).
root@ubuntu-mon0:/etc/ceph/crushmap# ceph osd setcrushmap i file
2011-04-27 10:13:12.721257 7f1fb67cb720 read 367 bytes from file
2011-04-27 10:13:12.721867 mon <
[osd,setcrushmap]
2011-04-27 10:13:13.135842 mon2 -> 'set crush map' (0)
root@ubuntu-mon0:/etc/ceph/crushmap# ceph -w
2011-04-27 10:13:15.752631 pg v693: 1584 pgs: 1584 active+clean; 25 KB data, 11360 KB used, 600 GB / 600 GB avail
2011-04-27 10:13:15.754463 mds e5: 1/1/1 up {0=up:active}, 1 up:standby
2011-04-27 10:13:15.754485 osd e16: 6 osds: 6 up, 6 in
2011-04-27 10:13:15.754582 log 2011-04-27 18:32:54.116746 osd0 172.16.35.75:6800/4471 266 : [INF] 3.1p0 scrub ok
2011-04-27 10:13:15.754633 mon e1: 3 mons at {0=172.16.35.10:6789/0,1=172.16.35.10:6790/0,2=172.16.35.10:6791/0}
2011-04-27 10:13:16.127746 osd e17: 6 osds: 6 up, 6 in
2011-04-27 10:13:16.438369 pg v694: 1584 pgs: 1584 active+clean; 25 KB data, 11360 KB used, 600 GB / 600 GB avail
2011-04-27 10:13:17.544392 pg v695: 1584 pgs: 3 active, 1580 active+clean, 1 active+degraded; 25 KB data, 12884 KB used, 600 GB / 600 GB avail; 5/42 degraded (11.905%)
2011-04-27 10:13:17.719504 osd e18: 6 osds: 6 up, 6 in
2011-04-27 10:13:18.077831 pg v696: 1584 pgs: 3 active, 1580 active+clean, 1 active+degraded; 25 KB data, 12884 KB used, 600 GB / 600 GB avail; 5/42 degraded (11.905%)
2011-04-27 10:13:18.744515 osd e19: 6 osds: 6 up, 6 in
2011-04-27 10:13:19.061734 pg v697: 1584 pgs: 11 active, 1572 active+clean, 1 active+degraded; 26 KB data, 19420 KB used, 600 GB / 600 GB avail; 18/42 degraded (42.857%)
2011-04-27 10:13:20.131327 pg v698: 1584 pgs: 14 active, 1569 active+clean, 1 active+degraded; 26 KB data, 21196 KB used, 600 GB / 600 GB avail; 22/42 degraded (52.381%)
2011-04-27 10:13:23.744939 pg v699: 1584 pgs: 14 active, 1569 active+clean, 1 active+degraded; 26 KB data, 22492 KB used, 600 GB / 600 GB avail; 22/42 degraded (52.381%)
2011-04-27 10:13:24.769874 pg v700: 1584 pgs: 15 active, 1569 active+clean; 26 KB data, 26372 KB used, 600 GB / 600 GB avail; 22/42 degraded (52.381%)
2011-04-27 10:13:33.720317 pg v701: 1584 pgs: 13 active, 1571 active+clean; 26 KB data, 27780 KB used, 600 GB / 600 GB avail; 20/42 degraded (47.619%)
2011-04-27 10:13:34.920313 pg v702: 1584 pgs: 4 active, 1580 active+clean; 26 KB data, 25248 KB used, 600 GB / 600 GB avail; 5/42 degraded (11.905%)
2011-04-27 10:13:39.478901 pg v703: 1584 pgs: 1584 active+clean; 26 KB data, 23332 KB used, 600 GB / 600 GB avail
2011-04-27 10:13:53.640596 pg v704: 1584 pgs: 1584 active+clean; 26 KB data, 23036 KB used, 600 GB / 600 GB avail
2011-04-27 10:13:54.737991 pg v705: 1584 pgs: 1584 active+clean; 26 KB data, 22236 KB used, 600 GB / 600 GB avail
^C
root@ubuntu-mon0:/etc/ceph/crushmap# ls

4). client:
mount -t ceph 172.10.35.10:6789:/ /mnt/ceph -o mount_timeout=10 ,
is successful.

Actions #2

Updated by Sage Weil almost 13 years ago

  • Status changed from New to Closed

Looks like you need 'chooseleaf' instead of 'choose' in the crush rules.

Actions #3

Updated by Greg Farnum almost 7 years ago

  • Project changed from Ceph to RADOS
  • Category deleted (10)
Actions

Also available in: Atom PDF