我在 ubuntu linux 18.04.2 服务器上使用 MDADM 建立了一个 15 驱动器 raid6 阵列。我又安装了 5 个驱动器并将它们添加到 raid 阵列中,然后它开始重塑。但是,之后我注意到其中三个驱动器上有 Windows 分区。我搞砸了吗?接下来 30 小时的重建时间会发生什么?
它看起来是这样的:
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 465.8G 0 disk
└─sda1 8:1 0 465.8G 0 part /
sdb 8:16 0 1.8T 0 disk
└─md0 9:0 0 23.7T 0 raid6 /srv/patellae
sdc 8:32 0 1.8T 0 disk
└─md0 9:0 0 23.7T 0 raid6 /srv/patellae
sdd 8:48 0 1.8T 0 disk
└─md0 9:0 0 23.7T 0 raid6 /srv/patellae
sde 8:64 0 1.8T 0 disk
└─md0 9:0 0 23.7T 0 raid6 /srv/patellae
sdf 8:80 0 1.8T 0 disk
└─md0 9:0 0 23.7T 0 raid6 /srv/patellae
sdg 8:96 0 1.8T 0 disk
└─md0 9:0 0 23.7T 0 raid6 /srv/patellae
sdh 8:112 1 1.8T 0 disk
└─md0 9:0 0 23.7T 0 raid6 /srv/patellae
sdi 8:128 1 1.8T 0 disk
└─md0 9:0 0 23.7T 0 raid6 /srv/patellae
sdj 8:144 1 1.8T 0 disk
└─md0 9:0 0 23.7T 0 raid6 /srv/patellae
sdk 8:160 1 1.8T 0 disk
└─md0 9:0 0 23.7T 0 raid6 /srv/patellae
sdl 8:176 1 1.8T 0 disk
└─md0 9:0 0 23.7T 0 raid6 /srv/patellae
sdm 8:192 0 1.8T 0 disk
└─md0 9:0 0 23.7T 0 raid6 /srv/patellae
sdn 8:208 0 1.8T 0 disk
└─md0 9:0 0 23.7T 0 raid6 /srv/patellae
sdo 8:224 0 1.8T 0 disk
└─md0 9:0 0 23.7T 0 raid6 /srv/patellae
sdp 8:240 0 1.8T 0 disk
└─md0 9:0 0 23.7T 0 raid6 /srv/patellae
sdq 65:0 1 1.8T 0 disk
└─md0 9:0 0 23.7T 0 raid6 /srv/patellae
sdr 65:16 1 1.8T 0 disk
├─md0 9:0 0 23.7T 0 raid6 /srv/patellae
└─sdr1 65:17 1 1.8T 0 part
sds 65:32 1 1.8T 0 disk
└─md0 9:0 0 23.7T 0 raid6 /srv/patellae
sdt 65:48 0 1.8T 0 disk
├─md0 9:0 0 23.7T 0 raid6 /srv/patellae
└─sdt1 65:49 0 1.8T 0 part
sdu 65:64 0 1.8T 0 disk
├─md0 9:0 0 23.7T 0 raid6 /srv/patellae
└─sdu1 65:65 0 1.8T 0 part
/dev/sdr、/dev/sdt 和 /dev/sdu 上有其他分区。当我使用 fdisk 检查它们时,结果如下所示:
sudo fdisk -l /dev/sdr
Disk /dev/sdr: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disklabel type: dos
Disk identifier: 0x00000000
Device Boot Start End Sectors Size Id Type
/dev/sdr1 63 3906220814 3906220752 1.8T 83 Linux
sudo fdisk -l /dev/sdt
Disk /dev/sdt: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0x6745d7bd
Device Boot Start End Sectors Size Id Type
/dev/sdt1 2048 3907026943 3907024896 1.8T 7 HPFS/NTFS/exFAT
sudo fdisk -l /dev/sdu
Disk /dev/sdu: 1.8 TiB, 2000398934016 bytes, 3907029168 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: dos
Disk identifier: 0xf05f7577
Device Boot Start End Sectors Size Id Type
/dev/sdu1 2048 3907026943 3907024896 1.8T 7 HPFS/NTFS/exFAT
重建时间仍需要一段时间:
cat /proc/mdstat
Personalities : [linear] [multipath] [raid0] [raid1] [raid6] [raid5] [raid4] [raid10]
md0 : active raid6 sdu[21] sdt[20] sds[19] sdr[18] sdq[17] sdn[16] sdj[1] sdm[14] sdl[3] sdk[2] sdp[5] sdo[13] sdf[11] sdb[12] sde[6] sdg[7] sdi[4] sdd[15] sdc[10] sdh[0]
25393984512 blocks super 1.2 level 6, 512k chunk, algorithm 2 [20/20] [UUUUUUUUUUUUUUUUUUUU]
[=>...................] reshape = 8.2% (160558080/1953383424) finish=1847.6min speed=16171K/sec
bitmap: 1/15 pages [4KB], 65536KB chunk
unused devices: <none>
这些驱动器上有两个 exFAT 分区!我的数据会被损坏吗?我是否必须一次移除一个驱动器,然后在每次移除后重建?
我应该先格式化它们。
答案1
那些 Windows 分区将会消失。
话虽如此,在我看来,你的设置在两个方面都不太好 -
您确实应该使用分区(标记为 FD)而不是原始驱动器来进行软件 RAID,并且您的 RAID 6 卷太大,无法提供高度保护,因为驱动器数量太多,而且重建期间超过 2 个驱动器发生故障的可能性比您想象的要高。我会考虑使用 RAID 10,或者更好的 ZFS 或多个 RAID 1 集,并可能使用 LVM 来降低风险。