Создать RAID0 на 8tb

Для начала получаем информация по дискам:

[root@dbserver38 ~]# 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      121601   976760001   83  Linux

Disk /dev/sdb: 4000.7 GB, 4000787030016 bytes
255 heads, 63 sectors/track, 486401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sdb doesn't contain a valid partition table

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

Disk /dev/sde: 4000.7 GB, 4000787030016 bytes
255 heads, 63 sectors/track, 486401 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/sde doesn't contain a valid partition table

Disk /dev/sdf: 160.0 GB, 160000000000 bytes
18 heads, 4 sectors/track, 4340277 cylinders
Units = cylinders of 72 * 512 = 36864 bytes
Device Boot      Start         End      Blocks   Id  System
/dev/sdf1   *           1        2844      102382   83  Linux
/dev/sdf2            2845     4340277   156147588   8e  Linux LVM

Disk /dev/dm-0: 140.9 GB, 140995723264 bytes
255 heads, 63 sectors/track, 17141 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/dm-0 doesn't contain a valid partition table

Disk /dev/dm-1: 18.8 GB, 18891145216 bytes
255 heads, 63 sectors/track, 2296 cylinders
Units = cylinders of 16065 * 512 = 8225280 bytes
Disk /dev/dm-1 doesn't contain a valid partition table

Disk /dev/md0: 3000.6 GB, 3000606523392 bytes
2 heads, 4 sectors/track, 732569952 cylinders
Units = cylinders of 8 * 512 = 4096 bytes
Disk /dev/md0 doesn't contain a valid partition table


Далее 2 диска по 4 ТБ из которых будет собираться raid0:

[root@dbserver38 ~]# hdparm -i /dev/sdb | grep SerialNo

Model=WDC WD40EFRX-68N32N0 , FwRev=82.00A82, SerialNo= WD-WCC7K6VP84PP

[root@dbserver38 ~]# hdparm -i /dev/sde | grep SerialNo
Model=WDC WD40EFRX-68N32N0 , FwRev=82.00A82, SerialNo= WD-WCC7K3ARK3YN


Создаем разделы:
fdisk /dev/sdb
sdb1
sdb2

fdisk /dev/sde
sde1
sde2


Создаем raid:
mdadm --create --verbose /dev/md1 --level=raid0 --raid-devices=4 /dev/sdb1 /dev/sdb2 /dev/sde1 /dev/sde2

Смотрим инфу по созданному raid:
mdadm --detail /dev/md1

Форматируем ФС:
mkfs.ext4 /dev/md1

Смотрим инфу по имеющимся raid:
watch cat /proc/mdstat

Добавляем инфу по raid в файл mdadm.conf
mdadm --detail --scan --verbose | awk '/ARRAY/ {print}' >> /etc/mdadm.conf

Создаем точку монтирования:
mkdir /mnt/disk8tb

Добавляем запись в файл /etc/fstab:
/dev/md1 /mnt/disk8tb ext4 defaults 0 0

Перезапускаем сервер

Проверяем raid:
[root@dbserver38 ~]# mdadm --detail /dev/md1
/dev/md1:
        Version : 0.90
  Creation Time : Wed Feb 10 10:54:23 2021
     Raid Level : raid0
     Array Size : 7814031616 (7452.04 GiB 8001.57 GB)
   Raid Devices : 4
  Total Devices : 4
Preferred Minor : 1
    Persistence : Superblock is persistent

    Update Time : Wed Feb 10 10:54:23 2021
          State : clean
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

     Chunk Size : 64K

           UUID : 839ef06e:e09bc31e:89de9a30:190aa7b8
         Events : 0.1

    Number   Major   Minor   RaidDevice State
       0       8       17        0      active sync   /dev/sdb1
       1       8       18        1      active sync   /dev/sdb2
       2       8       65        2      active sync   /dev/sde1
       3       8       66        3      active sync   /dev/sde2
[root@dbserver38 ~]#

Комментарии

Популярные сообщения из этого блога

ЭС с ЦБ РФ. РЕКВИЗИТНЫЙ СОСТАВ ЭС

ТФФ 35.0. Полный перечень документов альбома ТФФ (Таблица 2)

Linux (РедОС). Сброс пароля

ТФФ 34.0. Полный перечень документов альбома ТФФ (Таблица 2)

ТФФ 32.0. Полный перечень документов альбома ТФФ (Таблица 2)