Project

General

Profile

Actions

Bug #20580

closed

rbd map should warn when creating duplicate devices for the same image

Added by Jason Dillaman almost 7 years ago. Updated over 6 years ago.

Status:
Resolved
Priority:
Normal
Assignee:
-
Target version:
-
% Done:

0%

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

Description

[ubuntu@magna079 ~]$ sudo rbd create test0 --image-format 2  --size 4096 --pool rbd
[ubuntu@magna079 ~]$ sudo rbd map test0 --pool rbd 
/dev/rbd0
[ubuntu@magna079 ~]$ sudo rbd map test0 --pool rbd 
/dev/rbd1
[ubuntu@magna079 ~]$ sudo rbd map test0 --pool rbd 
/dev/rbd2
[ubuntu@magna079 ~]$ sudo rbd map test0 --pool rbd 
/dev/rbd3

Related issues 1 (0 open1 closed)

Copied to rbd - Backport #21268: luminous: rbd map should warn when creating duplicate devices for the same imageRejectedNathan CutlerActions
Actions #1

Updated by Yanhu Cao almost 7 years ago

I think the same image should not be mapped more than once. I modified the kernel code(drivers/block/rbd.c), then rbd maps the same image and displays the warning message as shown below.

[root@ceph83 ceph-client]# rbd map disk01
/dev/rbd0
[root@ceph83 ceph-client]# rbd map disk01@snap02
/dev/rbd1
[root@ceph83 ceph-client]# rbd map disk01
rbd: sysfs write failed
In some cases useful info is found in syslog - try "dmesg | tail".
rbd: map failed: (5) Input/output error
[root@ceph83 ceph-client]# rbd map disk01@snap02
rbd: sysfs write failed
In some cases useful info is found in syslog - try "dmesg | tail".
rbd: map failed: (5) Input/output error
[root@ceph83 ceph-client]# dmesg | tail
[ 1873.304577] rbd: rbd0: capacity 10737418240 features 0x1
[ 1876.055049] rbd: rbd0: 'rbd/disk01@-' already mapped
[ 1891.184957] rbd: rbd1: capacity 10737418240 features 0x1
[ 1894.303466] rbd: rbd1: 'rbd/disk01@snap02' already mapped

Any suggestions?

Actions #3

Updated by Jos Collin almost 7 years ago

  • Status changed from New to In Progress
Actions #4

Updated by Jason Dillaman over 6 years ago

  • Status changed from In Progress to Resolved
Actions #5

Updated by Nathan Cutler over 6 years ago

  • Status changed from Resolved to Pending Backport
  • Backport set to luminous
Actions #6

Updated by Nathan Cutler over 6 years ago

  • Copied to Backport #21268: luminous: rbd map should warn when creating duplicate devices for the same image added
Actions #7

Updated by Jason Dillaman over 6 years ago

  • Status changed from Pending Backport to Resolved
  • Backport deleted (luminous)

Not required for backport

Actions

Also available in: Atom PDF