High performance SCST iSCSI Target on Linux software Raid
This is a WIP
Introduction
This HOW-TO is focusing on performance. This is why I made some decisions targeted on performance instead of security (like you are used in Alpine Linux). This means we are not using grsec and not using a firewall. I presume you will take security actions on another level.
Content
- Vanilla Kernel with SCST patches (linux-scst)
- SCST modules and SCST ISCSI modules (linux-scst)
- Linux software raid and raid level (mdadm)
- Volume Management (LVM2)
- SCST administration (scstadmin)
- Linux raid monitoring
Linux software raid
In my personal setup i have 4 pieces of WD RE4 1TB drives which i want to use in the best performance raid level with redundancy. According to many mailing lists and opinion of the Linux raid author raid 10 seems to preform best while still having redundancy. You will loose 50% of your data storage but you will almost the same performance of RAID0 and redundancy of raid1.
For most up-to-date information regarding Linux software raid: https://raid.wiki.kernel.org/index.php/Overview
Raid10 level has multiple layout types. f(far)2 in tests seem to preform the best. Please see above link for references.
mdadm -v --create /dev/md0 --level=raid10 --layout=f2 --raid-devices=4 /dev/sda /dev/sdb /dev/sdc /dev/sdd
I am not using partitions on my disks, although there are reasons to use partitions, see here:
https://raid.wiki.kernel.org/index.php/Partition_Types
You can now monitor your raid (re)building: cat /proc/mdstat
Default the rebuild speed will be set and can be checked and changed here:
cat /proc/sys/dev/raid/speed_limit_max cat /proc/sys/dev/raid/speed_limit_min