Why?


Search This Blog

Sunday, March 27, 2016

Centos 7 create mdadm raid0 with mount and nsf share

Centos 7 create mdadm raid0 with mount and nsf share

Install mdadm

# yum -y install mdadm*

Get list of disk to be used in array

# fdisk -l

Remove partitions if needed

# fdisk /dev/sdb
p
d
p
w
#

Repeat for all other drives if needed

Now create the array. I am using Raid0 with 3 devices

# mdadm -C /dev/md0 --level=raid0 --raid-devices=3 /dev/sdb /dev/sdc /dev/sdd 

Format it

# mkfs.ext4 /dev/md0

Inspect your work

# mdadm --detail /dev/md0

Create mount point and mount

# mkdir /raid0
# mount /dev/md0 /raid0

See if mounted and what space we have now

# df -h

Set this for auto mount at boot

# vi /etc/fstab
/dev/md0        /raid0  ext4    defaults        0 0

No comments:

Post a Comment