tuned
tuned copied to clipboard
Removable devices check in disk plugin excludes aacraid (Adaptek RAID) arrays
Hello,
Disk plugin checks for supported device types and excludes removable devices from supported list. But some hardware raid controllers (f.e. Adaptek) has removable flag hardcoded in their kernel module source code: https://github.com/torvalds/linux/blob/master/drivers/scsi/aacraid/aachba.c In this case hw raid arrays ignored by tuned profile.
Removable devices check was added in commit 148203c
After little investigation I discovered that not just adaptek (aacraid) controllers sets removable flag but ips and dpt_i2o can do the same. Example from debian bug list: https://bugs.debian.org/cgi-bin/bugreport.cgi?bug=404927
We need to workaround this issue by excluding these controllers in disk plugin or add a option to the profile configuration file (something like ignore_removable_flag=sda).
Hi,
yes, I think a per-instance option ignore_removable_flag=True|False
would make sense. You could use it as follows to ignore the flag in sda
but not in sdb
.
[disk_sda]
type=disk
devices=sda
ignore_removable_flag=True
[disk_sdb]
type=disk
devices=sdb
ignore_removable_flag=False
The default woud be ignore_removable_flag=False
to preserve the current behaviour.
I think there might be some security considerations to this feature. I think there is an expectation in Tuned that the data that Tuned reads from the system is trusted, controlled by the administrator. By allowing Tuned to handle removable devices, such as flash drives, I think we might be breaking this expectation - the HW metadata is under the control of the person who plugs in the HW.
Right now, I can't think of a case where this would be a problem, however I think it deserves some thought.