If you want to monitor or analyze the health of the hard drive or check details for your ec2 hard drive, I would recommend installing smartctl
command. Let’s see how to install smartctl on Amazon Linux 2.
Prerequisites
- Amazon Linux 2
- sudo privileges
Install smartctl on Amazon Linux 2
Step 1. Update the yum
packages.
sudo yum update
Step 2. Install smartctl.
sudo yum install smartmontools
Step 3. To start the service, run:
systemctl start smartd
systemctl enable smartd
Step 4. Verify the installation.
smartctl --version
Output:
smartctl 7.0 2018-12-30 r4883 [aarch64-linux-5.10.124-linuxkit] (local build)
Copyright (C) 2002-18, Bruce Allen, Christian Franke, www.smartmontools.org
Conclusion
Feel free to leave a comment below and if you find this tutorial useful, follow our official channel on Telegram.