
新机器新装的系统,部署 ceph 集群后查询可用磁盘是报错说 Has a FileSystem (已存在文件系统) AVAILABLE 显示为 NO 所做的操作: 查询磁盘是没有分区的 fdisk -l /dev/sdb 格式化了硬盘 mkfs.xfs /dev/sdb -f
有没有大佬遇到过类似情况,求救~
1 flyqie 2024 年 3 月 18 日 via Android mkfs.xfs 你这不就是自己创建了 xfs 吗。。 |
2 ss098 2024 年 3 月 18 日 |
3 ss098 2024 年 3 月 18 日 讲错了,需要把磁盘 wipe 掉恢复为没有 filesystem 的原始 block 设备 |
4 ansemz 2024 年 3 月 18 日 dd if=/dev/zero of=/dev/sdb bs=512k count=1 |
5 busier 2024 年 3 月 18 日 via iPhone |
6 busier 2024 年 3 月 18 日 via iPhone 如果是固态硬盘,直接来个 blkdiscard -f /dev/sdb ,直接来个全盘擦除,又快又干净,相当于全盘 Trim 还能恢复性能! |
7 kevin123456 OP |
8 wuxqing 2024 年 3 月 19 日 ceph-disk zap /dev/sdb sgdisk -Z /dev/sdb 试试看 |
9 kevin123456 OP 可以了可以了,擦除磁盘后貌似有个缓冲时间,擦除完直接去 ceph orch device ls 查看 AVAILABLE 显示为 NO 的,等待大概五分钟后,就显示为 YES 了,感谢各位大佬 |
10 ansemz 2024 年 3 月 19 日 @kevin123456 那就用 ceph 自己的工具把磁盘 zap 了。不知道新版 ceph 是否改名或者改用其他工具,但是肯定会有的。 # ceph-disk zap --help usage: ceph-disk zap [-h] DEV [DEV ...] Zap/erase/destroy a device's partition table and contents. It actually uses sgdisk and it's option --zap-all to destroy both GPT and MBR data structures so that the disk becomes suitable for repartitioning. positional arguments: DEV path to block device optional arguments: -h, --help show this help message and exit |