分区 Centos | Raid

分区 Centos | Raid

我有4个硬盘,系统安装在/dev/sda2上

# df -h
Filesystem            Size  Used Avail Use% Mounted on
/dev/sda2             884G  2.1G  836G   1% /
/dev/sda3             2.0G  159M  1.7G   9% /tmp
/dev/sda1              99M   18M   77M  19% /boot
tmpfs                 7.9G     0  7.9G   0% /dev/shm


 fdisk -l

Disk /dev/sda: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sda1   *           1          13      104391   83  Linux
/dev/sda2              14      119040   956084377+  83  Linux
/dev/sda3          119041      119301     2096482+  83  Linux
/dev/sda4          119302      121601    18474750    5  Extended
/dev/sda5          119302      121601    18474718+  82  Linux swap / Solaris

Disk /dev/sdb: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1               1      121601   976760001   83  Linux

Disk /dev/sdc: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1               1      121601   976760001   83  Linux

Disk /dev/sdd: 1000.2 GB, 1000204886016 bytes
255 heads, 63 sectors/track, 121601 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes

   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1               1      121601   976760001   83  Linux

我想要对所有 4 个 HDD 进行 Raid 0:

mdadm -C /dev/md0 --level=raid0 --raid-devices=4 /dev/sda2 /dev/sdb1 /dev/sdc1 /dev/sdd1
mdadm: Cannot open /dev/sda2: Device or resource busy
mdadm: create aborted

答案1

  1. 您已将 /dev/sda2 安装为根分区,它忙碌的。
  2. 将其作为条带集 (RAID0) 的一部分将会破坏其上当前的所有数据。
  3. 制作 4 个磁盘带区组将使丢失数据的可能性增加约 4 倍。

    我怀疑你是否想做你正在尝试做的事情......

相关内容