diff options
author | Patrick Simianer <p@simianer.de> | 2016-04-14 17:30:30 +0200 |
---|---|---|
committer | Patrick Simianer <p@simianer.de> | 2016-04-14 17:30:30 +0200 |
commit | 3c1b8d5c8947bf0aa3e929c21f59eaf06aba33af (patch) | |
tree | 71111c40dd00a4739c53413f5926a26bbe901ead /xfs-raid | |
parent | 2c01777eb98ac7649d24e1a60a94393892b7e7af (diff) |
more general monitor_soft_raid
Diffstat (limited to 'xfs-raid')
-rwxr-xr-x | xfs-raid | 47 |
1 files changed, 0 insertions, 47 deletions
diff --git a/xfs-raid b/xfs-raid deleted file mode 100755 index 97ee225..0000000 --- a/xfs-raid +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -BLOCKSIZE=512 # Make sure this is in bytes -CHUNKSIZE=128 # Make sure this is in KiB -NUMSPINDLES=3 -RAID_TYPE=5 -RAID_DEVICE_NAME="/dev/md0" # Specify device name for your RAID device -FSLABEL="name" # specify filesystem label for generating mkfs line here - -case "$RAID_TYPE" in -0) - RAID_DISKS=${NUMSPINDLES}; - ;; -1) - RAID_DISKS=${NUMSPINDLES}; - ;; -10) - RAID_DISKS=${NUMSPINDLES}; - ;; -5) - RAID_DISKS=`echo "${NUMSPINDLES} - 1" | bc`; - ;; -6) - RAID_DISKS=`echo "${NUMSPINDLES} - 2" | bc`; - ;; -*) - echo "Please specify RAID_TYPE as one of: 0, 1, 10, 5, or 6." - exit - ;; -esac - -SUNIT=`echo "${CHUNKSIZE} * 1024 / 512" | bc` -SWIDTH=`echo "$RAID_DISKS * ${SUNIT}" | bc` - -echo "System blocksize=${BLOCKSIZE}" -echo "Chunk Size=${CHUNKSIZE} KiB" -echo "NumSpindles=${NUMSPINDLES}" -echo "RAID Type=${RAID_TYPE}" -echo "RAID Disks (usable for data)=${RAID_DISKS}" -echo "Calculated values:" -echo "Stripe Unit=${SUNIT}" -echo -e "Stripe Width=${SWIDTH}\n" -echo "mkfs line:" -echo -e "mkfs.xfs -b size=${BLOCKSIZE} -d sunit=${SUNIT},swidth=${SWIDTH} -L ${FSLABEL} ${RAID_DEVICE_NAME}\n" -echo "mount line:" -echo -e "mount -o remount,sunit=${SUNIT},swidth=${SWIDTH}\n" -echo "Add these options to your /etc/fstab to make permanent:" -echo "sunit=${SUNIT},swidth=${SWIDTH}" |