Actions
Bug #19226
closedceph-disk: cannot deactivate a directory-based osd
% Done:
0%
Source:
Community (user)
Tags:
Backport:
jewel
Regression:
No
Severity:
3 - minor
Reviewed:
Description
Hi,
We cannot deactivate a path-based OSD.
Creating the OSD:
# mkdir -p /data/a # chown ceph:ceph /data/a # ceph-disk prepare /data/a # ceph-disk activate /data/a got monmap epoch 30 added key for osd.104 Created symlink from /run/systemd/system/ceph-osd.target.wants/ceph-osd@104.service to /usr/lib/systemd/system/ceph-osd@.service.
Now the OSD is running:
# ps -ef | grep 104 ceph 16444 1 2 14:27 ? 00:00:16 /usr/bin/ceph-osd -f --cluster ceph --id 104 --setuser ceph --setgroup ceph
Now trying to deactivate it (also tried deactivating by ID):
# ceph-disk deactivate /data/a ceph-disk: Error: Cannot find any match device!! # ceph-disk deactivate --deactivate-by-id 104 ceph-disk: Error: Cannot find any match device!!
Here is the verbose mode:
# ceph-disk --verbose deactivate /data/a get_dm_uuid: get_dm_uuid /dev/vda uuid path is /sys/dev/block/253:0/dm/uuid command: Running command: /usr/sbin/blkid -o udev -p /dev/vda1 command: Running command: /usr/sbin/blkid -o udev -p /dev/vda1 list_devices: main_list: /dev/vda1 ptype = 0x83 uuid = None list_devices: main_list: {'vda': ['vda1']}, uuid_map = {}, space_map = {} get_dm_uuid: get_dm_uuid /dev/vda1 uuid path is /sys/dev/block/253:1/dm/uuid command: Running command: /usr/sbin/blkid -o udev -p /dev/vda1 command: Running command: /usr/sbin/blkid -o udev -p /dev/vda1 list_dev: list_dev(dev = /dev/vda1, ptype = 0x83) command: Running command: /usr/sbin/blkid -s TYPE /dev/vda1 list_devices: list_devices: [{'path': '/dev/vda', 'partitions': [{'dmcrypt': {}, 'uuid': None, 'mount': u'/', 'ptype': u'0x83', 'is_partition': True, 'fs_type': u'xfs', 'path': '/dev/vda1', 'type': 'other'}]}] Traceback (most recent call last): File "/usr/sbin/ceph-disk", line 9, in <module> load_entry_point('ceph-disk==1.0.0', 'console_scripts', 'ceph-disk')() File "/usr/lib/python2.7/site-packages/ceph_disk/main.py", line 5047, in run main(sys.argv[1:]) File "/usr/lib/python2.7/site-packages/ceph_disk/main.py", line 4998, in main args.func(args) File "/usr/lib/python2.7/site-packages/ceph_disk/main.py", line 3491, in main_deactivate main_deactivate_locked(args) File "/usr/lib/python2.7/site-packages/ceph_disk/main.py", line 3514, in main_deactivate_locked raise Error('Cannot find any match device!!') ceph_disk.main.Error: Error: Cannot find any match device!!
Actions