#!/bin/bash
# 检查nvme盘的容量

_install() {
    return 0
}

_check() {
    _check="PASS"

    for device in $(lsblk -p -d -o NAME -n|grep 'nvme');
    do
        size=$(smartctl -i $device |grep "Namespace 1 Formatted LBA Size:"|awk '{print $NF}')
        if [[ $size -ne 512 ]];then
            _check="FAIL"
            PRINT_ERR "[ERROR] NVME Disk $device Formatted LBA Size not 512"
        fi

    done

}
