Skip to content

Add a new ControllerVM check to verify the smartctl for all the drives. #38

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
hsardana09 opened this issue Dec 18, 2020 · 0 comments

Comments

@hsardana09
Copy link
Contributor

hsardana09 commented Dec 18, 2020

If STATUS is non-zero in the below code, then the drive is bad and needs to be replaced prior to upgrading to 4.5. This check needs to be run on all ctlvms in the cluster.

Note - the 'bad' drives need to be removed regardless of whether it is already hard-blacklisted and not in use as pre-upgrade validation does the same check and will fail during pre-upgrade validation.


for D in $(/bin/lsblk -dpn -e 1,2,7,11 | awk '{ print $1 }'); do
    echo $D | grep -q nvme
    if [ $? -eq 0 ]; then
          STATUS=$(/usr/sbin/nvme smart-log $D 2> /dev/null |  \
                   awk -F': ' '/critical_warning/ { print $NF }')
    else
            /usr/sbin/smartctl -q silent -H -i $D;
            STATUS=$?
     fi
     echo "$D: $STATUS";
done
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant