我正在尝试在我的 Ubuntu WSL 发行版上运行 (micro)K8s 上的 Ceph。
由于没有可用的支持设备,因此未创建 OSD pod(请参阅下面的日志)。
Ceph 配置为使用所有设备您可以在上面的日志中看到它正在搜索一个。
Ceph 理想情况下需要一个我在 Windows 主机上创建的未格式化的分区,但我不确定如何将其安装/dev/sd{c}
到 WSL 本身内,或者尝试创建一个新的分区?
我不知道该怎么做,也不知道这是否是正确的方法。
提前致谢。
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
答案1
除了现有的 NTFS (drvfs/9P) 磁盘外,WSL 尚不支持安装其他物理或虚拟磁盘。此功能即将推出,但仍处于预览此时。
即便如此,听起来文件系统需要已经安装在驱动器上才能挂载它。但事实并非如此声音就像我们将能够添加原始的、未格式化的分区,但也许会有一个解决方法。
答案2
我花了几天的时间来理清这个问题,但为了使它正常工作,您需要:
- 获取 Windows 10 的开发者预览版,这样你就可以
--mount
选择 WSL - 在 Windows 主机上创建 VHDX。您可以通过磁盘管理器执行此操作并在操作菜单下创建动态 VHDX。
- 按照 @NotTheDr01ds 的建议安装该 VHDX,然后就会创建 1/dev/sd{x}1。在我的用例中,这允许 Ceph 使用该磁盘创建 OSD。