LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Software (https://www.linuxquestions.org/questions/linux-software-2/)
-   -   How to control hdd by ioctl excusivly preventing system from any communication? (https://www.linuxquestions.org/questions/linux-software-2/how-to-control-hdd-by-ioctl-excusivly-preventing-system-from-any-communication-4175439148/)

froff 11-28-2012 09:37 AM

How to control hdd by ioctl excusivly preventing system from any communication?
 
hello
I would like to talk with sata or sas hdd by ioctl intreface with full exclusiveness.
It means, that I would like to make system to ignore device when hot-plugged - no initialisation, no start, no keep-alive requests - anything.
Is it possible in any way?

sundialsvcs 11-28-2012 10:36 AM

IIRC, the hotplug system is script-driven to the extent that you can specify what is done when a hotplug event is recognized ... and, I think, you will need for certain events to occur in order for your authorized program (how authorized?) to be able to exert influence on it. Are you really asking for the check for and mounting of file systems not to happen?

froff 11-28-2012 05:58 PM

Quote:

Originally Posted by sundialsvcs (Post 4838862)
IIRC, the hotplug system is script-driven to the extent that you can specify what is done when a hotplug event is recognized ... and, I think, you will need for certain events to occur in order for your authorized program (how authorized?) to be able to exert influence on it. Are you really asking for the check for and mounting of file systems not to happen?

Thanks for answer.
Yes I want to avoid mounting (with exception to main system hdd of course) but not only. I don't know what special sata/scsi commands are sent to device by system. Maybe some keep-alive checks from time to time. I would like to block them all and make system unable to normally use of a drive.
By hot-plugging I mean not a external usb drives - I would like to connect and disconnect regular SATA and SCSI drives on the fly (it doesn't matter that it can be dangerous for hardware :)
Unfortunately there are no /etc/hotplug directory in ubuntu. Do they handle it in different way?


All times are GMT -5. The time now is 04:17 PM.