====== ソフトウェアRaid削除 ======
# mdadm --detail /dev/md0
/dev/md0:
Version : 1.2
Creation Time : Wed Sep 9 20:26:10 2020
Raid Level : raid0
Array Size : 1953260544 (1862.77 GiB 2000.14 GB)
Raid Devices : 2
Total Devices : 2
Persistence : Superblock is persistent
Update Time : Wed Sep 9 20:26:10 2020
State : clean
Active Devices : 2
Working Devices : 2
Failed Devices : 0
Spare Devices : 0
Chunk Size : 512K
Consistency Policy : none
Name : cephdev001:0 (local to host cephdev001)
UUID : 38561b34:739e61e4:ef8f037b:93e581e9
Events : 0
Number Major Minor RaidDevice State
0 259 1 0 active sync /dev/nvme1n1
1 259 2 1 active sync /dev/nvme2n1
===== 削除できない =====
普通にremoveしようとしてもremove もfailもできない。。。
# mdadm --remove /dev/md0 /dev/nvme1n1
mdadm: hot remove failed for /dev/nvme1n1: Device or resource busy
# mdadm --fail /dev/md0 /dev/nvme1n1
mdadm: set device faulty failed for /dev/nvme1n1: Device or resource busy
===== 対応 =====
mdを停止してから、superblockを消してあげればOK
# mdadm --misc --stop /dev/md0
mdadm: stopped /dev/md0
# mdadm --misc --zero-superblock /dev/nvme1n1
# mdadm --misc --zero-superblock /dev/nvme2n1
{{tag>mdadm ソフトウェアRaid}}