
This repository is meant to build a custom Docker image from the original Ceph Docker image, focused on giving support to run Ceph on Raspberry Pi.
Note
This project has been archived because creating a custom image to address the USB disk issue is an overkill solution. For a simpler alternative, refer to Allow USB devices with udev rules.
This patch allows the use of USB devices as OSDs.
As commented on rook/rook#14699, USB disks are ignored by Ceph because of id_bus
.
Since ceph/ceph#49954, Ceph does not allow USB devices to be used as OSDs. This patch reverts the changes made in that PR.
For more information, check the patch.
You can use udev rules to treat USB devices as SCSI disks, allowing a standard Ceph instance to utilize your USB disks as OSDs.
To do this, create a file at /etc/udev/rules.d/99-usb-to-scsi.rules
with the following content:
ACTION=="add", ENV{ID_TYPE}=="disk", ENV{ID_BUS}=="usb", ENV{ID_BUS}="scsi"
ACTION=="change", ENV{ID_TYPE}=="disk", ENV{ID_BUS}=="usb", ENV{ID_BUS}="scsi"
ACTION=="online", ENV{ID_TYPE}=="disk", ENV{ID_BUS}=="usb", ENV{ID_BUS}="scsi"
Next, reload the udev rules with the following command:
udevadm control --reload-rules && udevadm trigger
Finally, verify that the change has been applied by running:
# before
udevadm info --query=property /dev/sda | grep -i id_bus
ID_BUS=usb
# after
udevadm info --query=property /dev/sda | grep -i id_bus
ID_BUS=scsi