This is just a bunch of notes that I had in a txt file that I wanted to document. Some cool commands to be familiar with.
iostat Monitor Hard Disk I/O
vmstat Monitor CPU Utilization
sensors Monitor CPU / System Temps
hddtemp Monitor HDD Temps
fuser <file> Shows all processes accessing <file>
du -ah <folder> Shows size of all files in a folder -human readable
cat /proc/mdstat Check Raid Status
hdparm /dev/sda Check Drive parameters on /dev/sda
### Raid 5 Commands ###
yum install xfs xfsprogs xfstools kmod-xfs
## Create Initial Raid
fdisk /dev/sdd
(delete all previous partitions)
n New Partition
p Primary
1 Partition #1
1 Starting Block
<enter> Max size of drive
t Type of partition
fd (or df - Linux raid autodetect)
w Write-out changes and exit
## Repeat for all drives in raid
## Create Raid 5
mdadm --create --verbose /dev/md2 --level=5 --auto=yes --raid-devices=3 /dev/sd[jid]1
## Wait for it to finish
watch cat /proc/mdstat
##Format the new device
mkfs.xfs -f /dev/md2
##Mount new device
mount /dev/md2 /media/raid5