Check Hard Disk Life Span in CentOS

Objective

Utilize Smartctl to check the information of the hard disk’s life span.

Prerequisites

Linux machine running CentOS.

Steps

Step 1: Install Smartmontools

Install SmartMonTools by using the following command.

In CentOS:

yum install -y smartmontools

Step 2: Install StorCLI

Then, install StorCLI by using the following command.

wget http://www.netonboard.com/download/StorCLI.zip -O StorCLI.zip

Then, install the unzip package.

yum install -y unzip

Then, unzip the StorCLI.zip file using the following command

unzip StorCLI.zip

Next, navigate to the directory containing the RPM package and install the corresponding RPM.

cd <storcli_unzipped_directory>/Linux/
rpm -Uvh <storcli_install.rpm_file>

Step 3: View All Available Physical Disks

To view all available disks controlled by the RAID card, use the following command: –

/opt/MegaRAID/storcli/storcli64 /c0 /eall /sall show

Example Output:

Take note of the Disk IDs (DID) of each disk.

Step 4: Check the Hard Disk Life Span

To check the hard disk life span, run the following command.

smartctl -x -d megaraid, <disk_id> /dev/sda

Then, look for these keywords:
– Wearout
– Life
– Used

Updated on February 4, 2021

Was this article helpful?

Related Articles

Need Help?
Submit a ticket to us and let our professional team assists you

Support Billing Sales
Support
Billing
Sales