Bug #2654
closed
Stale rbd volume cannot be unmaped
Added by Maciej Galkiewicz almost 12 years ago.
Updated about 11 years ago.
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
- Project changed from Ceph to rbd
- Assignee set to Alex Elder
- 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#
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
- 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* ?
- Status changed from In Progress to Need More Info
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>
- 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
Also available in: Atom
PDF