我知道建议提供一个新的干净硬盘来创建一个 osd。但我只是在做一个调查,我真的不想为它提供硬盘。我只想将我的系统盘 /dev/vda2 用于 osd。我不知道“ceph-deploy create”是否会清理我的 /dev/vda2。
顺便说一句,如果这个命令真的会格式化我给的磁盘,我怎么能在不提供新磁盘的情况下创建一个 osd,只使用我的旧磁盘并保留旧数据?
我尝试为 osd 使用正常路径,我得到了这个:
ceph-deploy osd create node1 --data /var/local/osd1
......
[node1][WARNIN] stderr: lsblk: /var/local/osd1: not a block device
[node1][WARNIN] stderr: Unknown device, --name=, --path=, or absolute path in /dev/ or /sys expected.
[node1][WARNIN] Running command: /bin/ceph-authtool --gen-print-key
[node1][WARNIN] Running command: /bin/ceph --cluster ceph --name client.bootstrap-osd --keyring /var/lib/ceph/bootstrap-osd/ceph.keyring -i - osd new a1ad5676-615a-4209-8f82-cd6aa4f81f43
[node1][WARNIN] stderr: lsblk: /var/local/osd1: not a block device
[node1][WARNIN] stderr: lsblk: /var/local/osd1: not a block device
[node1][WARNIN] --> Was unable to complete a new OSD, will rollback changes
[node1][WARNIN] --> OSD will be fully purged from the cluster, because the ID was generated
[node1][WARNIN] Running command: ceph osd purge osd.1 --yes-i-really-mean-it
[node1][WARNIN] stderr: 2021-12-15 00:37:36.110628 7f4cef82c700 -1 auth: unable to find a keyring on /etc/ceph/ceph.client.admin.keyring,/etc/ceph/ceph.keyring,/etc/ceph/keyring,/etc/ceph/keyring.bin,: (2) No such file or directory
[node1][WARNIN] 2021-12-15 00:37:36.110643 7f4cef82c700 -1 monclient: ERROR: missing keyring, cannot use cephx for authentication
[node1][WARNIN] 2021-12-15 00:37:36.110644 7f4cef82c700 0 librados: client.admin initialization error (2) No such file or directory
[node1][WARNIN] stderr: [errno 2] error connecting to the cluster
[node1][WARNIN] --> RuntimeError: command returned non-zero exit status: 1
[node1][ERROR ] RuntimeError: command returned non-zero exit status: 1
[ceph_deploy.osd][ERROR ] Failed to execute command: /usr/sbin/ceph-volume --cluster ceph lvm create --bluestore --data /var/local/osd1
[ceph_deploy][ERROR ] GenericError: Failed to create 1 OSDs