Re: When should we use "hdparm" ?

Ran Shalit <[email protected]> Fri, 13 Jul 2018 07:48:30 +0000
Newsgroups org.kernel.vger.linux-hotplug
Message-ID <CAJ2oMhLOvDVDuyYFCUhFWtt5Ca+XnXXtBpo8h=iQANsZBw1VZg@mail.gmail.com>
On Fri, Jul 13, 2018 at 10:25 AM, Greg KH <[email protected]> wrote:
> On Fri, Jul 13, 2018 at 09:29:50AM +0300, Ran Shalit wrote:
>> Hello,
>>
>> We have some old system (2.4 kernel) which use hot swap with sata
>> (IDE) , but using commands such as:
>> hdparm -U 0
>> hdparm -R 0 0x1f0 ...
>>
>> But in newer system HW&SW we never use these commands when removing
>> and inserting sata.
>
> What do you do instead?
>
I just mount and unmount partition.
In the old system, we manually power the the storage device after
instert and (poweroff on remove) , and then used the hdparm
register/unregister comands.
Without the hdparm commands the device doesn't exist in /dev , i.e. we
must do this register/unregister in the old HW &old kernel.


>> Why was it used once and why is it not used in newer system ?
>
> In the 2.4 kernel there was not kernel support for hot-swap devices like
> this, so you had to "manually" do it with these types of commands.
>
>> Is it that newer system do this somehow automatically ? Where ?is it
>> done, in SW or HW ?
>
> How exactly are you swapping your ide drives today?
>

With newer HW&SW  don't do now any hot swapping, just mount/unmount.
Seems that insert/remove id done under power (?),
I just try to understand why the newer system (HW&SW) don't need to
use these commands any more (hdparm).

> And the 2.4 kernel was over a decade ago, hopefully you have upgraded
> your hardware since then :)
>
> thanks,
>
> greg k-h