Bug #57767
ceph-volume should check if device is locked prior to zapping it
% Done:
0%
Source:
Tags:
Backport:
quincy,pacific
Regression:
No
Severity:
3 - minor
Reviewed:
Description
ceph-volume allows zapping a device although its related `ceph-osd` process is running
[ceph: root@quick-test1-1 /]# ceph orch daemon add osd quick-test1-1:/dev/vdb --method=raw
Created osd(s) 0 on host 'quick-test1-1'
[ceph: root@quick-test1-1 /]# ceph orch ps
NAME HOST PORTS STATUS REFRESHED AGE MEM USE MEM LIM VERSION IMAGE ID CONTAINER ID
crash.quick-test1-1 quick-test1-1 running (28m) 53s ago 28m 9.76M - 18.0.0-253-gb8131834 269e6666f944 327186f56f76
mgr.quick-test1-1.jgxfad quick-test1-1 *:9283,8765 running (29m) 53s ago 29m 454M - 18.0.0-253-gb8131834 269e6666f944 09da853c5fd1
mgr.quick-test1-1.xmbrgp quick-test1-1 running (28m) 53s ago 28m 427M - 18.0.0-253-gb8131834 269e6666f944 208dea7cc5be
mon.quick-test1-1 quick-test1-1 running (29m) 53s ago 29m 44.4M 2048M 18.0.0-253-gb8131834 269e6666f944 2cbbfc6ba133
osd.0 quick-test1-1 running (54s) 53s ago 54s 16.2M 4096M 18.0.0-253-gb8131834 269e6666f944 aab877aa974e
[ceph: root@quick-test1-1 /]# ceph-volume lvm zap --destroy /dev/vdb
--> Zapping: /dev/vdb
Running command: /usr/bin/dd if=/dev/zero of=/dev/vdb bs=1M count=10 conv=fsync
stderr: 10+0 records in
10+0 records out
stderr: 10485760 bytes (10 MB, 10 MiB) copied, 0.0212535 s, 493 MB/s
--> Zapping successful for: <Raw Device: /dev/vdb>
History
#1 Updated by Guillaume Abrioux over 1 year ago
- Pull request ID set to 48383
#2 Updated by Eugen Block over 1 year ago
A recent thread [1] addresses this issue again. A simple test with Nautilus shows that in previous versions ceph-volume prevented zapping a used device. In Pacific the zapping aborts too late, I don't have an Octopus cluster at hand to test the behavior.
[1] https://lists.ceph.io/hyperkitty/list/ceph-users@ceph.io/message/FL5JODHQMJC4CWO267OD4GOXK3OIWYBQ/