Create a new /dev/sd{b,c,d} on WSL for Ceph

3/1/2021

I'm trying to run Ceph on (micro)K8s which running on my Ubuntu WSL distory.

OSD pods are not being created because there is no supported device is available (see logs below).

Ceph is configured to UseAllDevices which you can see it searching for one in the log above.

Ceph ideally wants an unformatted partition which I created on my windows host but I'm unsure how I mount that to /dev/sd{c} or do try to create a new partition within WSL itself?

I don't know how to do either or if that is even the right approach.

Thanks in advance.

2021-03-01 17:09:17.090302 W | inventory: skipping device "loop0". unsupported diskType loop
2021-03-01 17:09:17.112037 W | inventory: skipping device "loop1". unsupported diskType loop
2021-03-01 17:09:17.150605 W | inventory: skipping device "loop2". unsupported diskType loop
2021-03-01 17:09:17.173562 W | inventory: skipping device "loop3". unsupported diskType loop
2021-03-01 17:09:17.185464 W | inventory: skipping device "loop4". unsupported diskType loop
2021-03-01 17:09:17.209067 W | inventory: skipping device "loop5". unsupported diskType loop
2021-03-01 17:09:17.224485 W | inventory: skipping device "loop6". unsupported diskType loop
2021-03-01 17:09:17.246726 W | inventory: skipping device "loop7". unsupported diskType loop
2021-03-01 17:09:17.257490 W | inventory: skipping device "loop8". unsupported diskType loop
2021-03-01 17:09:17.272513 W | inventory: skipping device "loop9". unsupported diskType loop
2021-03-01 17:09:17.292126 W | inventory: skipping device "loop10". unsupported diskType loop
2021-03-01 17:09:17.301785 W | inventory: skipping device "loop11". unsupported diskType loop
2021-03-01 17:09:17.323591 W | inventory: skipping device "loop12". unsupported diskType loop
2021-03-01 17:09:17.327819 W | inventory: skipping device "loop13". diskType is empty
2021-03-01 17:09:20.140453 I | cephosd: skipping device "ram0": ["Insufficient space (<5GB)"].
2021-03-01 17:09:21.762693 I | cephosd: skipping device "ram1": ["Insufficient space (<5GB)"].
2021-03-01 17:09:23.759026 I | cephosd: skipping device "ram2": ["Insufficient space (<5GB)"].
2021-03-01 17:09:25.396302 I | cephosd: skipping device "ram3": ["Insufficient space (<5GB)"].
2021-03-01 17:09:26.512274 I | cephosd: skipping device "ram4": ["Insufficient space (<5GB)"].
2021-03-01 17:09:27.664515 I | cephosd: skipping device "ram5": ["Insufficient space (<5GB)"].
2021-03-01 17:09:28.854953 I | cephosd: skipping device "ram6": ["Insufficient space (<5GB)"].
2021-03-01 17:09:30.080786 I | cephosd: skipping device "ram7": ["Insufficient space (<5GB)"].
2021-03-01 17:09:31.407741 I | cephosd: skipping device "ram8": ["Insufficient space (<5GB)"].
2021-03-01 17:09:32.646524 I | cephosd: skipping device "ram9": ["Insufficient space (<5GB)"].
2021-03-01 17:09:33.856632 I | cephosd: skipping device "ram10": ["Insufficient space (<5GB)"].
2021-03-01 17:09:35.568848 I | cephosd: skipping device "ram11": ["Insufficient space (<5GB)"].
2021-03-01 17:09:36.766882 I | cephosd: skipping device "ram12": ["Insufficient space (<5GB)"].
2021-03-01 17:09:37.800115 I | cephosd: skipping device "ram13": ["Insufficient space (<5GB)"].
2021-03-01 17:09:38.895007 I | cephosd: skipping device "ram14": ["Insufficient space (<5GB)"].
2021-03-01 17:09:40.013397 I | cephosd: skipping device "ram15": ["Insufficient space (<5GB)"].
2021-03-01 17:09:40.013498 I | cephosd: skipping device "sda" because it contains a filesystem "ext4"
2021-03-01 17:09:40.013513 I | cephosd: skipping device "sdb" because it contains a filesystem "ext4"
2021-03-01 17:09:41.237145 W | cephosd: skipping OSD configuration as no devices matched the storage settings for this node

Original: https://superuser.com/questions/1630022/create-a-new-dev-sdb-c-d-on-wsl-for-ceph

-- Adgezaza
ceph
kubernetes
microk8s
windows-subsystem-for-linux

1 Answer

3/11/2021

Took me a couple days to sort out but, to get this working you need to:

  • Get the developer preview of Windows 10 so you have the --mount option for WSL
  • Create a VHDX on your Windows Host. You can do this through your Disk Manager and creating a dynamic VHDX under the actions menu.
  • Mount that VHDX and, voila the 1/dev/sd{x}1 will be created. In my use-case this allowed Ceph to create the OSDs using that disk.
-- Adgezaza
Source: StackOverflow