]> git.proxmox.com Git - pve-manager.git/commit
fix #4631: ceph: osd: create: add osds-per-device
authorAaron Lauterer <a.lauterer@proxmox.com>
Wed, 23 Aug 2023 09:44:27 +0000 (11:44 +0200)
committerThomas Lamprecht <t.lamprecht@proxmox.com>
Mon, 6 Nov 2023 17:23:28 +0000 (18:23 +0100)
commitad1677d221b87b68d01c1504efd81e4fde4b5459
treec7556743c62cc0489f18d17ac805a0d7424427ec
parente07191a0819339982a790bc7faf29d177b5beb02
fix #4631: ceph: osd: create: add osds-per-device

Allows to automatically create multiple OSDs per physical device. The
main use case are fast NVME drives that would be bottlenecked by a
single OSD service.

By using the 'ceph-volume lvm batch' command instead of the 'ceph-volume
lvm create' for multiple OSDs / device, we don't have to deal with the
split of the drive ourselves.

But this means that the parameters to specify a DB or WAL device won't
work as the 'batch' command doesn't use them. Dedicated DB and WAL
devices don't make much sense anyway if we place the OSDs on fast NVME
drives.

Some other changes to how the command is built were needed as well, as
the 'batch' command needs the path to the disk as a positional argument,
not as '--data /dev/sdX'.
We drop the '--cluster-fsid' parameter because the 'batch' command
doesn't accept it. The 'create' will fall back to reading it from the
ceph.conf file.

Removal of OSDs works as expected without any code changes. As long as
there are other OSDs on a disk, the VG & PV won't be removed, even if
'cleanup' is enabled.

The '--no-auto' parameter is used to avoid the following deprecation
warning:
```
--> DEPRECATION NOTICE
--> You are using the legacy automatic disk sorting behavior
--> The Pacific release will change the default to --no-auto
--> passed data devices: 1 physical, 0 LVM
--> relative data size: 0.3333333333333333
```

Signed-off-by: Aaron Lauterer <a.lauterer@proxmox.com>
PVE/API2/Ceph/OSD.pm