从昨天开始,我的服务器发送这样的邮件:
A DegradedArray event had been detected on md device /dev/md2
P.S. The /proc/mdstat file currently contains the following:
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4] [multipath] [faulty]
md1 : active raid1 sdb1[1] sda1[2](F)
20478912 blocks
最近我的一个驱动器在我的RAID中坏了,我正在用一个新的驱动器替换。我使用这个答案来镜像旧驱动器上的分区以进行重新同步。但我担心的是输出。我的驱动器是4k扇区,我第一次做错什么了吗?
Checking that no-one is using this disk right now ...
OK
Warning: partition 1 does not end at a cylinder boundary
Warning: partition 2 does not start at a cylinder boundary
Warning: partition 2 does not end a
当我尝试格式化dev/sdb1时,我会得到这个错误:
$ mkfs.ext4 -L data /dev/sdb1
mke2fs 1.42.13 (17-May-2015)
/dev/sdb1 is apparently in use by the system; will not make a filesystem here!
其中/dev/sdb有一个分区,我用echo 'type=83' | sudo sfdisk /dev/sdb创建了该分区:
$ fsdisk -l
Disk /dev/sdb: 1.8 TiB, 2000398934016 bytes,
我的Ubuntu12.04LTS上有一个RAID1数组,我的/sda硬盘几天前就被替换了。我使用这些命令替换:
# go to superuser
sudo bash
# see RAID state
mdadm -Q -D /dev/md0
# State should be "clean, degraded"
# remove broken disk from RAID
mdadm /dev/md0 --fail /dev/sda1
mdadm /dev/md0 --remove /dev/sda1
# see partitions
fdisk -l
# shutdown