Default and user-defined validation of a vulnerable disk

IBM Storage Scale Erasure Code Edition validates state of a disk before adding the disk into a recovery group. Also, if the default callback script cannot validate the disk, you can add user-defined callback script.

For upgrading from a previous version to IBM Storage Scale Erasure Code Edition 5.2.1, which has this validation feature, run the following command to enable the disk validation:
# mmvdisk server configure --update --nc nc_1 --recycle one

The default callback script for the disk validation

The default callback script is stored in the /usr/lpp/mmfs/samples/vdisk/SampleDeviceHealthCheck.sh directory. The gpfs.gnr.support rpm installs the default callback script on an IBM Storage Scale Erasure Code Edition server. To prevent data corruption, this script checks whether a disk, which is being added a into recovery group, has any potential vulnerability.
Important: Add new disks into a recovery group instead of old disks because worn-out disks could be damaged.
If the default callback script found a vulnerable disk, the following message appears when you create an RG, scale out RG, scale up RG, or replace the disk:
mmvdisk: pid: 543708 Available callbacks:
 mmvdisk: 1. {'/usr/lpp/mmfs/samples/vdisk/SampleDeviceHealthCheck.sh': '0:ALL'}
 mmvdisk: pid: 543708 : Callback: /usr/lpp/mmfs/samples/vdisk/SampleDeviceHealthCheck.sh failed: 
[E] Callback: err 5: /usr/lpp/mmfs/bin/SampleDeviceHealthCheck Drive is too old. Power-on minutes: 2393404 for /dev/sdh > 10000.

This error message informs that the disk is not new and is being used for more than 10000 minutes. The error message suggests to replace the disk with a new disk to complete the default script check successfully.

You use can one of the following method to resolve this error, if the disk is safe to be used in the recovery group:
  • Edit the SampleDeviceHealthCheck.sh script to have tighter or loosen criteria.
  • Remove the callback script.
    # mmvdisk nodeclass change --node-class nc1 --delete-prepare-pdisk-userexit /usr/lpp/mmfs/samples/vdisk/SampleDeviceHealthCheck.sh

A user-defined callback script for the disk validation

If the default callback cannot meet your requirements, you can also define a user validation script by issuing the following command:
# mmvdisk nodeclass change --node-class nc1 --set-prepare-pdisk-userexit /you/directory/of/script/DeviceCheck.sh:
Important: Copy the user-defined callback script to each IBM Storage Scale Erasure Code Edition server under the same directory.