Untuk membuat RAID5 dibutuhkan minimal 3 hardisk, beberapa alasan saya memilih menggunakan RAID 5
– hardisk hanya ada 3 ;)
– bila 1 hardisk yang rusak, masih bisa di rebuild.
– Kecepatan baca/tulis tidak terlalu berpengaruh karna digunakan untuk HTPC (Kodi/XBMC) dan backup data

Spesifikasi Komputer

CentOS 7 64 Bit
Memory 32 GB
Hardisk 1 : Kingfast 128 GB (untuk OS)
Hardisk 2 : 3x WD Green 2 TB

Partisi tiap hardisk jadi EXT4 dengan gparted
partisi kosong
klik kanan di Partition, pilih New
partisi hardisk baru

Di tampilan Create New Partition langsung klik Add
partisinya

klik Apply all partition agar perubahan dijalankan
apply all operation

Partisi selesai
proses partisi selesai

Partisi juga kedua hardisk lainnya dengan cara diatas.

Membuat RAID 5

pastikan anda memilih hardisk yang benar, untuk memastikannya cek lagi dengan fdisk -l

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: 0x0007153a
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sda1            2048  3907028991  1953513472   83  Linux
 
Disk /dev/sdd: 128.0 GB, 128035676160 bytes, 250069680 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
Disk label type: dos
Disk identifier: 0x00040512
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdd1   *        2048     1026047      512000   83  Linux
/dev/sdd2         1026048   250068991   124521472   8e  Linux LVM
 
Disk /dev/sdc: 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: 0x0000a156
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdc1            2048  3907028991  1953513472   83  Linux
 
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: 0x000bf894
 
   Device Boot      Start         End      Blocks   Id  System
/dev/sdb1            2048  3907028991  1953513472   83  Linux
 
Disk /dev/mapper/cl-root: 53.7 GB, 53687091200 bytes, 104857600 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
 
 
Disk /dev/mapper/cl-swap: 3892 MB, 3892314112 bytes, 7602176 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
 
 
Disk /dev/mapper/cl-home: 69.9 GB, 69860327424 bytes, 136445952 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

disana kelihatan hardisk yang akan dijadikan RAID5 ada di /dev/sda1 /dev/sdb1 /dev/sdc1.
buat partisi RAID 5

mdadm --create --verbose /dev/md0 --level=5 --raid-devices=3 /dev/sd[abc]1

setelah perintah diatas dijalankan, partisi RAID akan dibuat. Proses ini bisa berlangsung lama, status pembuatan RAID ini bisa dilihat dengan

cat /proc/mdstat
## output
md0 : active raid5 sdc1[3] sdb1[1] sda1[0]
      3906764800 blocks super 1.2 level 5, 512k chunk, algorithm 2 [3/2] [UU_]
      [>....................]  recovery =  1.4% (29038108/1953382400) finish=252.4min speed=127019K/sec
      bitmap: 0/15 pages [0KB], 65536KB chunk

Leave a comment

Your email address will not be published. Required fields are marked *