diff --git a/README.md b/README.md index e4174ae..f778ece 100644 --- a/README.md +++ b/README.md @@ -85,7 +85,8 @@ In the above, we assume that the `MyInstanceProfileWithProperPermissions` EC2 In "ec2:ModifyInstanceAttribute", "ec2:DescribeVolumeAttribute", "ec2:CreateVolume", - "ec2:DeleteVolume" + "ec2:DeleteVolume", + "ec2:CreateTags" ], "Resource": "*" } diff --git a/bin/ebs-autoscale b/bin/ebs-autoscale index 2a632d3..b653ccd 100755 --- a/bin/ebs-autoscale +++ b/bin/ebs-autoscale @@ -122,11 +122,12 @@ add_space () { exit_status=$? if [ $exit_status -eq 0 ]; then - logthis "Adding device ${DEVICE} to logical volume ${MOUNTPOINT}" if [ "${FILE_SYSTEM}" = "btrfs" ]; then + logthis "Adding device ${DEVICE} to logical volume ${MOUNTPOINT}" btrfs device add ${DEVICE} ${MOUNTPOINT} btrfs balance start -m ${MOUNTPOINT} else + logthis "Adding device ${DEVICE} to logical volume /dev/mapper/${LVM_VG}-${LVM_LV}" vgextend ${LVM_VG} ${DEVICE} lvresize -l 100%VG /dev/mapper/${LVM_VG}-${LVM_LV} resize2fs /dev/mapper/${LVM_VG}-${LVM_LV} @@ -169,7 +170,7 @@ while true; do LOG_COUNT=LOG_INTERVAL fi if [ "${LOG_COUNT}" -ge "${LOG_INTERVAL}" ]; then - logthis "Devices ${NUM_DEVICES} : Size ${TOTAL_SIZE} : Used ${USED} : Aailable ${AVAILABLE} : Used% ${PCT_UTILIZATION}% : Threshold ${THRESHOLD}%" + logthis "Devices ${NUM_DEVICES} : Size ${TOTAL_SIZE} : Used ${USED} : Available ${AVAILABLE} : Used% ${PCT_UTILIZATION}% : Threshold ${THRESHOLD}%" LOG_COUNT=0 fi THRESHOLD=$(calc_threshold) diff --git a/config/ebs-autoscale.json b/config/ebs-autoscale.json index 3c2ef06..ca8b711 100644 --- a/config/ebs-autoscale.json +++ b/config/ebs-autoscale.json @@ -14,4 +14,4 @@ "log_file": "/var/log/ebs-autoscale.log", "log_interval": 300 } -} \ No newline at end of file +}