Project

General

Profile

Actions

Bug #2654

closed

Stale rbd volume cannot be unmaped

Added by Maciej Galkiewicz almost 12 years ago. Updated almost 11 years ago.

Status:
Won't Fix
Priority:
High
Assignee:
Target version:
-
% Done:

0%

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

Description

/dev/rbd0 exists in system but /dev/rbd/winnie-test/postgresql not

# rbd showmapped
id      pool    image   snap    device
0       winnie-test     postgresql      -       /dev/rbd0
# rbd unmap /dev/rbd0
/dev/rbd0 is not an rbd device
remove failed: (22) Invalid argument

Related issues 1 (0 open1 closed)

Related to rbd - Bug #4522: RBD utility "showmapped" bugCan't reproduce03/21/2013

Actions
Actions #1

Updated by Sage Weil almost 12 years ago

  • Project changed from Ceph to rbd
Actions #2

Updated by Ian Colle about 11 years ago

  • Assignee set to Alex Elder
Actions #3

Updated by Alex Elder about 11 years ago

  • Status changed from New to Resolved
  • Assignee deleted (Alex Elder)

Somewhere along the way, this got fixed.

root@plana92:/tmp/cephtest# rbd showmapped
id pool image              snap device    
1  rbd  testimage.client.0 -    /dev/rbd1 
3  rbd  imgae1             i1s1 /dev/rbd3 
root@plana92:/tmp/cephtest# rbd unmap /dev/rbd3
root@plana92:/tmp/cephtest# rbd showmapped
id pool image              snap device    
1  rbd  testimage.client.0 -    /dev/rbd1 
root@plana92:/tmp/cephtest# 
Actions #4

Updated by Leon Keijser about 11 years ago

Please consider re-opening this ticket. I am experiencing the same issue, even with the latest kernel version:

root@c2-backup ~ # mount | grep rbd
-no output-
root@c2-backup ~ # rbd showmapped
id    pool    image    snap    device
0    22-optelec    22-optelec-01    -    /dev/rbd0
root@c2-backup ~ # rbd unmap /dev/rbd0
/dev/rbd0 is not an rbd device
remove failed: (22) Invalid argument
root@c2-backup ~ # uname -a
Linux c2-backup 3.2.0-40-generic #64-Ubuntu SMP Mon Mar 25 21:22:10 UTC 2013 x86_64 x86_64 x86_64 GNU/Linux
Actions #5

Updated by Sage Weil about 11 years ago

  • Status changed from Resolved to In Progress
  • Assignee set to Sage Weil
  • Priority changed from Normal to High

Can you post results from find /sys/bus/rbd/devices -ls and ls -al /dev/rbd* ?

Actions #6

Updated by Sage Weil about 11 years ago

  • Status changed from In Progress to Need More Info
Actions #7

Updated by Leon Keijser about 11 years ago

Hi, thanks for replying. Here's the info:

root@c2-backup ~ # find /sys/bus/rbd/devices -ls 
 23077    0 drwxr-xr-x   2 root     root            0 Apr 23 14:48 /sys/bus/rbd/devices
 23119    0 lrwxrwxrwx   1 root     root            0 Apr 23 20:13 /sys/bus/rbd/devices/0 -> ../../../devices/rbd/0
root@c2-backup ~ # ls -al /dev/rbd*
brw-rw---- 1 root disk 251, 0 Apr 23 14:53 /dev/rbd0

/dev/rbd:
total 0
drwxr-xr-x  3 root root   60 Apr 25 00:58 .
drwxr-xr-x 18 root root 4460 Apr 25 00:58 ..
drwxr-xr-x  2 root root   60 Apr 23 14:53 20-kowin-b

I notice that rbd0 now points to a totally different rbd than what rbd showmapped shows.

FYI: we're using this to make backups of customer's data by doing:

  • rbd -p <pool> map <image>
  • mount -o ro /dev/rbd/<pool>/<image> /mnt/customers/<image>

and then after the backup has completed:

  • umount /mnt/customers/<image>
  • rbd unmap /dev/rbd/<pool>/<image>
Actions #8

Updated by Leon Keijser almost 11 years ago

Hi, any news on this?

Actions #9

Updated by Sage Weil almost 11 years ago

  • Status changed from Need More Info to Won't Fix

the problem here is just that you are on a 3.2 kernel. many many bugs were fixed but they were only backported as far as 3.4

Actions

Also available in: Atom PDF