Posted on

mdadm软RAID的删除方法和注意事项

删除整个RAID:


mdadm/dev/md0–fail/dev/sdb–remove/dev/sdb
mdadm/dev/md0–fail/dev/sdc–remove/dev/sdc
mdadm/dev/md0–fail/dev/sdc–remove/dev/sdd
mdadm/dev/md0–fail/dev/sde–remove/dev/sde
mdadm/dev/md0–fail/dev/sdf–remove/dev/sdf


mdadm–stop/dev/md0
mdadm–remove/dev/md0


mdadm–misc–zero-superblock/dev/sdb
mdadm–misc–zero-superblock/dev/sdc
mdadm–misc–zero-superblock/dev/sdd
mdadm–misc–zero-superblock/dev/sde
mdadm–misc–zero-superblock/dev/sdf


即:先删除RAID中的所有设备,然后停止该RAID即可

为了防止系统启动时候启动raid
rm-f/etc/mdadm.conf
rm-f/etc/raidtab

检查系统启动文件中是否还有其他mdad启动方式
vi/etc/rc.sysinit+/raid\c