Re: dummy scsi read or scsi command periodically for external USB Hard Disk

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Sun, Jul 06, 2014 at 01:18:03AM +0800, loody wrote:
> hi all:
>     we met a USB Hard Disk that will go to suspend if host stop
> sending scsi command over 5mins.
>     To save the IO, kernel will keep the file in page cache as much as
> he can and under this circumstances, the scsi command may disappear
> for a while longer enough to cause the device suspend.
> 
>     is there any kernel config or module parameter can do the dummy
> read or scsi command periodically?

No but you could set up a simple cron job to call an sg3_utils command.

E.g. issue an sg_read for one sector to the device every 4m:

  */4 * * * * sg_read count=1 if=/dev/<disk>

You'll probably want to disable mail notification for the job or have
it dropped or it'll get a bit noisy running that frequently.

Regards,
Bryn.

--
To unsubscribe from this list: send the line "unsubscribe linux-scsi" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html




[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Index of Archives]     [SCSI Target Devel]     [Linux SCSI Target Infrastructure]     [Kernel Newbies]     [IDE]     [Security]     [Git]     [Netfilter]     [Bugtraq]     [Yosemite News]     [MIPS Linux]     [ARM Linux]     [Linux Security]     [Linux RAID]     [Linux ATA RAID]     [Linux IIO]     [Samba]     [Device Mapper]
  Powered by Linux