From: Lars Melin <larsm17@gmail.com>
To: loody <miloody@gmail.com>, "Bryn M. Reeves" <bmr@redhat.com>
Cc: "linux-usb@vger.kernel.org" <linux-usb@vger.kernel.org>,
SCSI development list <linux-scsi@vger.kernel.org>
Subject: Re: dummy scsi read or scsi command periodically for external USB Hard Disk
Date: Mon, 07 Jul 2014 21:59:43 +0700 [thread overview]
Message-ID: <53BAB5DF.5090606@gmail.com> (raw)
In-Reply-To: <CANudz+uUuhLdfkVSseXXHW6ugm126Q4Taau+s7wavAP=Z9=4XA@mail.gmail.com>
On 2014-07-07 21:37, loody wrote:
> hi Bryn:
>
> 2014-07-07 17:20 GMT+08:00 Bryn M. Reeves <bmr@redhat.com>:
>> 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>
> Since my target platform arm embedded system,
> does that mean I should include sg_read in my Busybox
> or
> cross-compile sg_read from sg3_utils?
>
> appreciate your kind help,
> --
> To unsubscribe from this list: send the line "unsubscribe linux-usb" in
> the body of a message to majordomo@vger.kernel.org
> More majordomo info at http://vger.kernel.org/majordomo-info.html
sgread is not included in BusyBox but you should have "touch".
Create a dummy file on the disk and let cron touch it every 4 minutes.
next prev parent reply other threads:[~2014-07-07 14:59 UTC|newest]
Thread overview: 23+ messages / expand[flat|nested] mbox.gz Atom feed top
2014-07-05 17:18 dummy scsi read or scsi command periodically for external USB Hard Disk loody
2014-07-07 9:20 ` Bryn M. Reeves
2014-07-07 14:37 ` loody
2014-07-07 14:59 ` Lars Melin [this message]
[not found] ` <53BAB5DF.5090606-Re5JQEeQqe8AvxtiuMwx3w@public.gmane.org>
2014-07-07 15:06 ` David Laight
2014-07-07 15:39 ` loody
[not found] ` <CANudz+uOS3VVyz6FcHoui8z678R6Xc0CQrdqFRdS5NyfCB59Zw-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-07 15:51 ` Lars Melin
2014-07-07 15:52 ` Bryn M. Reeves
[not found] ` <20140707155233.GD19630-bi+AKbBUZKY6gyzm1THtWbp2dZbC/Bob@public.gmane.org>
2014-07-07 16:15 ` loody
[not found] ` <CANudz+s8R3AnxEJ229EwAOOxEk2WZUjMjoE3rwdRM1YM5ZO=og-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-07 16:25 ` Bryn M. Reeves
2014-07-09 14:15 ` loody
2014-07-07 15:54 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1407071147130.871-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-07-07 16:13 ` loody
2014-07-07 17:02 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1407071258360.871-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-07-08 14:58 ` loody
[not found] ` <CANudz+uRd3tRfPN-Fqcj5sSW-xkRSN-gERBP7HhUY_s5gEALbg-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-08 16:00 ` Alan Stern
[not found] ` <Pine.LNX.4.44L0.1407081149280.1283-100000-IYeN2dnnYyZXsRXLowluHWD2FQJk+8+b@public.gmane.org>
2014-07-08 19:04 ` loody
2014-07-08 19:26 ` Alan Stern
2014-07-09 3:17 ` loody
2014-07-09 8:37 ` David Laight
2014-07-09 13:27 ` loody
[not found] ` <CANudz+tQ4pJFmLTRsHtL=VjuCg30Af+7CpK1qRQM5TwwShoQtA-JsoAwUIsXosN+BqQ9rBEUg@public.gmane.org>
2014-07-09 14:25 ` Alan Stern
2014-07-09 14:19 ` Alan Stern
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=53BAB5DF.5090606@gmail.com \
--to=larsm17@gmail.com \
--cc=bmr@redhat.com \
--cc=linux-scsi@vger.kernel.org \
--cc=linux-usb@vger.kernel.org \
--cc=miloody@gmail.com \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox