[smartmontools-support] smartd settings per disk type

Christian Franke Christian.Franke at t-online.de
Sun Jun 30 21:07:08 CEST 2019


Orsiris de Jong wrote:
> Hello,
>
> Is there a way to set different settings in smartd.conf, depending on the disk type (nvme, ssd, spinning) ?

Sorry, no.

> ...
>> I would like to be able to create different smartd configuration profiles
>> depending on the disk type (ie: spinning disks, ssd, nvme & removable is the
>> most common usecase).
>> So far, from what I've understood from smartd.conf(5) manual page, I can use
>> the follwing to specify different settings depending on disks:
>>
>> DEVICESCAN -d nvme [various settings for nvme disks]
>> DEVICESCAN -d removable [various settins for usb / other removable disks]

This does not work, because the 2nd DEVICESCAN has no effect:
 From smartd.conf(5):
"If a non-comment entry in the configuration file is the text string 
DEVICESCAN in capital letters, then smartd will ignore any remaining 
lines in the configuration file, and will scan for devices."


>> ...
>> # spinning disks
>> /dev/sda [various settings for spinning disks]
>> /dev/sdb [various settings for spinning disks]
>> # ssd disks
>> /dev/sdd [various settings for ssd disks]
>> # nvme disks
>> DEVICESCAN -d nvme [various settings for nvme disks]
>>
>> This solution isn't the best because it's not dynamic, ie once the smartd.conf
>> file is written, it will stay that way until the pseudo code above is executed
>> again, evzn if the disk labels change.
>>
>> Is there any better solution I may use ?

I guess no.

>> Also, I've read that the -d removable option is experimental. With which version
>> was it implemented so I don't break things with elder smartmontools releases
>> ?

-d removable itself is not experimental, but this new feature 
(smartd.conf(5)):
"[NEW EXPERIMENTAL SMARTD FEATURE] A device name is also ignored if 
another device with same identify information (vendor, model, firmware 
version, serial number, WWN) already exists."

Regards,
Christian




More information about the Smartmontools-support mailing list