本帖最后由 infplus 于 2022-1-30 12:00 编辑
不需要IPMI,有4块相同硬盘的杜甫就能制作,制作过程数据可能会丢失,请备份数据。 制作过程是由:软raid1转换为软raid10
- 可以看到
- [email protected]:~# cat /proc/mdstat
- Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
- md2 : active raid1 sda2[0] sdc2[1] sdd2[3] sdb2[2]
- 511868928 blocks super 1.2 [4/4] [UUUU]
- bitmap: 2/4 pages [8KB], 65536KB chunk
复制代码
制作raid10需要将raid1转换为raid0 再转换为raid10
- raid1转换为raid0:mdadm –grow /dev/md2 –level=0 –backup-file=/home/backup-md0
复制代码
- 查看是否转换完成:cat /proc/mdstat
复制代码
- 输出:Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
- md2 : active raid10 sdc2[4] sdb2[3](S) sda2[2](S) sdd2[1]
- 3889583104 blocks super 1.2 2 near-copies [2/2] [UU]
复制代码
- 查看挂载点:mdadm –misc –detail /dev/md1
复制代码
- 可以看到:/dev/md2:
- Version : 1.2
- Creation Time : Sat Jan 29 17:33:29 2022
- Raid Level : raid0
- Array Size : 249664 (243.85 MiB 255.66 MB)
- Raid Devices : 1
- Total Devices : 1
- Persistence : Superblock is persistent
-
- Update Time : Sun Jan 30 03:19:46 2022
- State : clean
- Active Devices : 1
- Working Devices : 1
- Failed Devices : 0
- Spare Devices : 0
-
- Chunk Size : 64K
-
- Name : jupiter:1 (local to host jupiter)
- UUID : b95b33c4:26ad8f39:950e870c:03a3e87c
- Events : 68
-
- Number Major Minor RaidDevice State
- 1 8 34 0 active sync /dev/sdd2
复制代码
可以看到只有一个挂载点/dev/sdd2 需要将其他的挂载点加入阵列
- mdadm –grow /dev/md2 –level=10 –backup-file=/home/backup-md0 –raid-devices=4 –add /dev/sda2 /dev/sdb2 /dev/sdc2
复制代码
查询阵列
- Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
- md2 : active raid10 sdd2[5] sdc2[4](S) sda2[3](S) sdb2[2]
- 511868928 blocks super 1.2 2 near-copies [2/1] [U_]
- [>………………..] recovery = 0.5% (2835392/511868928) finish=50.8min speed=166787K/sec
-
- unused devices: <none>
复制代码
耐心等待 制作完成后会有两个备用硬盘,也需要加入阵列中,否则这个只是换了一个名称的raid1。
- mdadm –grow /dev/md2 –raid-devices=4
复制代码
- 输出:Personalities : [raid1] [linear] [multipath] [raid0] [raid6] [raid5] [raid4] [raid10]
- md2 : active raid10 sdc2[4] sdb2[3] sda2[2] sdd2[1]
- 3889583104 blocks super 1.2 64K chunks 2 near-copies [4/4] [UUUU]
- [>………………..] reshape = 1.1% (45550720/3889583104) finish=430.7min speed=148740K/sec
复制代码
等待完成即可。 |