我们有一个服务器(HP ProLiant ML10 Gen 9)附带两个相同硬盘。假设服务器支持硬件 RAID 1(镜像),并且CentOS-7安装了。但后来我们得知,该服务器不支持硬件 RAID1,而且软件 RAID1 也配置不正确。
[root@himalaya ~]# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 1.8T 0 disk
└─md126 9:126 0 1.8T 0 raid1
├─md126p1 259:0 0 200M 0 md
├─md126p2 259:1 0 1G 0 md
└─md126p3 259:2 0 1.8T 0 md
├─cl_himalaya-root 253:0 0 50G 0 lvm /
├─cl_himalaya-swap 253:1 0 7.8G 0 lvm [SWAP]
└─cl_himalaya-home 253:2 0 1.8T 0 lvm /home
sdb 8:16 0 1.8T 0 disk
├─sdb1 8:17 0 200M 0 part /boot/efi
├─sdb2 8:18 0 1G 0 part /boot
└─sdb3 8:19 0 1.8T 0 part
sr0 11:0 1 4.1G 0 rom
[root@himalaya ~]# cat /proc/mdstat
Personalities : [raid1]
md126 : active raid1 sda[0]
1953511424 blocks super external:/md127/0 [2/1] [U_]
md127 : inactive sda[0](S)
3160 blocks super external:imsm
unused devices: <none>
正如你在上图中所看到的,启动分区位于驱动器中安全数据库而根 (/) 分区和其他文件位于驱动器中星展银行。不幸的是,硬盘分区不相同。现在我想创建一个软件 RAID1无需从驱动器中删除我的内容星展银行。因此,我恳请有人帮助我如何从驱动器中移动启动分区安全数据库驾车星展银行。(驱动器安全数据库将启动分区移至 sda 后即可格式化)。然后如何创建相同的分区并配置RAID1大批。
请注意:该驱动器安全数据库似乎失败了。/boot 分区位于此驱动器中安全数据库。但在更换硬盘之前我想找到一种方法来解决这个问题。
[root@himalaya ~]# fdisk -l
Disk /dev/sdb: 2000.4 GB, 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
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sdb1 1 3907022847 1953511423+ ee GPT
Partition 1 does not start on physical sector boundary.
Disk /dev/sda: 2000.4 GB, 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
Disk label type: dos
Disk identifier: 0x00000000
Device Boot Start End Blocks Id System
/dev/sda1 1 3907022847 1953511423+ ee GPT
Partition 1 does not start on physical sector boundary.
WARNING: fdisk GPT support is currently new, and therefore in an experimental ph ase. Use at your own discretion.
Disk /dev/md126: 2000.4 GB, 2000395698176 bytes, 3907022848 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
Disk label type: gpt
Disk identifier: 4C553ADE-504A-495C-9195-7B11C068ED27
# Start End Size Type Name
1 2048 411647 200M EFI System EFI System Partition
2 411648 2508799 1G Microsoft basic
3 2508800 3907020799 1.8T Linux LVM
Disk /dev/mapper/cl_himalaya-root: 53.7 GB, 53687091200 bytes, 104857600 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
Disk /dev/mapper/cl_himalaya-swap: 8321 MB, 8321499136 bytes, 16252928 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
Disk /dev/mapper/cl_himalaya-home: 1937.1 GB, 1937093165056 bytes, 3783385088 se ctors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
提前致谢。