Skip to content
This repository was archived by the owner on Jan 27, 2025. It is now read-only.
/ docker-ceph Public archive

This repository patches Ceph to allow USB devices

License

Notifications You must be signed in to change notification settings

cdalvaro/docker-ceph

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

6 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ceph v18.2.4

Ceph logo

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.

Patches

Allow USB devices

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.

Available Physical Disks

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.

Allow USB devices with udev rules

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

About

This repository patches Ceph to allow USB devices

Resources

License

Code of conduct

Stars

Watchers

Forks

Releases

No releases published

Packages