Give execute permission to your script:
chmod +x /path/to/yourscript.sh
And to run your script:
Since . refers to the current directory: if yourscript.sh is in the current directory, you can simplify this to:
My AWS EC2’s EBS volume was full yesterday.
Step 1: Resize the EBS Volume.
This can be done in the web-based console.
Step 2: Extend a Linux File System after resizing the Volume
Modifying volume size has no practical effect until you also extend the volume’s file system to make sure of the new storage capacity.
AWS Article: Extending a Linux File System after Resizing the Volume.
A very likely reason is your server doesn’t have enough resources: either memory or disk space.
Try to upgrade your service. It will most likely solve the problem.
There is no way to directly check AWS EBS (Elastic Block Store) usage directly from the console for security reasons. However, you can check the disk usage using the following command:
Ths command reports back the existing disk space usage on the file system.
Here are the commands to update Ubuntu system:
# Fetches the list of available updates
sudo apt-get update
# Strictly upgrades the current packages
sudo apt-get upgrade
# Installs updates (new ones)
sudo apt-get dist-upgrade