LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware
User Name
Password
Linux - Hardware This forum is for Hardware issues.
Having trouble installing a piece of hardware? Want to know if that peripheral is compatible with Linux?

Notices


Reply
  Search this Thread
Old 09-23-2013, 09:12 AM   #1
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
USB disk "disconnect" during very long processing


How do I prevent "timeout" or similar that causes a rotating USB drive to "disconnect" in the middle of a long process? I'm sure that something thinks the workstation is idle because there are no keystrokes or mouse droppings or similar but I'm dashed if I can find the cause of the spin-down.

A typical "long process" might be a workstation backup run, catalog of drive contents, scan drive for duplicate files, and such. These are the sort of jobs one starts at 10pm and leaves to run overnight. I often find a job failure because the drive went "not available" in the middle of the night.

I have a mountain of external drives that connect by USB. Most are "archival" -- documents, photos, etc that I want to keep for a long time. Some are "failsafe" -- backup copies of workstation drives held against catastrophe recovery.

Linux Mint-12 on a Thinkpad notebook.
~~~ 0;-Dan
 
Old 09-24-2013, 08:40 PM   #2
unSpawn
Moderator
 
Registered: May 2001
Posts: 29,415
Blog Entries: 55

Rep: Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600Reputation: 3600
Are there any BIOS ACPI or other "sleep" / "wake" settings involved?
Does this happen with each and every external USB casing (wrt chipsets)?
Have you tried USB kernel module debug mode to find more clues? (Watch log size!!!)
 
1 members found this post helpful.
Old 09-25-2013, 09:08 AM   #3
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
Quote:
Originally Posted by unSpawn View Post
Are there any BIOS ACPI or other "sleep" / "wake" settings involved?
I have all of the desktop settings turned off when on AC power.
Quote:
Originally Posted by unSpawn View Post
Does this happen with each and every external USB casing (wrt chipsets)? Have you tried USB kernel module debug mode to find more clues? (Watch log size!!!)
I have not knowledge or experience with this debug mode, but I'm willing to try it. Can you steer me toward HOWTO?

Thanks,
~~~ 0;-Dan
 
Old 09-25-2013, 09:24 AM   #4
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
Could be the drive itself going into standby mode. Seagate's drives have / had an auto spindown mode that was problematic with linux. Take a look at the output of the sdparm command.

sdparm -a /dev/sdx (Of course change x for your USB drive)
 
1 members found this post helpful.
Old 09-25-2013, 12:33 PM   #5
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
Quote:
Originally Posted by michaelk View Post
Could be the drive itself going into standby mode. Seagate's drives have / had an auto spindown mode that was problematic with linux. Take a look at the output of the sdparm command.

sdparm -a /dev/sdx (Of course change x for your USB drive)
I tried this:
Code:
prompt$ sudo sdparm --all /dev/sdb
/dev/sdb: Seagate   FreeAgent GoFlex   214
That was not very helpful. I then tried:
(Make sure that you scroll right)
Code:
prompt$ sudo sdparm --all --long --verbose /dev/sdb
>>> about to open device name: /dev/sdb

    /dev/sdb: Seagate   FreeAgent GoFlex   214
    Direct access device specific parameters: WP=0  DPOFUA=0

>> Read write error recovery [rw] mode page [0x1] not found
>> Disconnect-reconnect (SPC + transports) [dr] mode page [0x2] not found
>> Format (SBC) [fo] mode page [0x3] not found
>> Rigid disk (SBC) [rd] mode page [0x4] not found
>> Verify error recovery (SBC) [ve] mode page [0x7] not found
>> Caching (SBC) [ca] mode page [0x8] not found
>> Control [co] mode page [0xa] not found
>> Control extension [coe] mode subpage [0xa,0x1] not found
>> Application tag (SBC) [atag] mode subpage [0xa,0xf0] failed
>> SAT pATA control [pat] mode subpage [0xa,0xf1] not found
>> Power condition - old version [poo] mode page [0xd] not found
>> XOR control (SBC) [xo] mode page [0x10] not found
>> Protocol specific logical unit [pl] mode page [0x18] not found
>> Protocol specific port [pp] mode page [0x19] not found
>> Power condition [po] mode page [0x1a] not found
>> SAT ATA Power condition [apo] mode subpage [0x1a,0xf1] not found
>> Informational exceptions control [ie] mode page [0x1c] not found
>> Background control (SBC) [bc] mode subpage [0x1c,0x1] not found
>> Logical block provisioning (SBC) [lbp] mode subpage [0x1c,0x2] failed
Ahhh!! Much more detail.

I have no idea what this is trying to tell me.
~~~ 8d;-/ Dan

Last edited by SaintDanBert; 09-25-2013 at 12:35 PM.
 
Old 09-25-2013, 01:02 PM   #6
michaelk
Moderator
 
Registered: Aug 2002
Posts: 25,702

Rep: Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896Reputation: 5896
It would be the data contained in the power condition mode page according to some old information from a web search.

Last edited by michaelk; 09-26-2013 at 06:36 AM.
 
Old 09-30-2013, 10:26 AM   #7
SaintDanBert
Senior Member
 
Registered: Jan 2009
Location: "North Shore" Louisiana USA
Distribution: Mint-20.1 with Cinnamon
Posts: 1,771

Original Poster
Blog Entries: 3

Rep: Reputation: 108Reputation: 108
Quote:
Originally Posted by michaelk View Post
It would be the data contained in the power condition mode page according to some old information from a web search.
I parse your tokens, but sadly have no idea what they mean...
How might I expose the "power condition mode page"?
How do I make sense out of whatever "data" I find there?
How would I detect that there was a drive setting or condition that causes it to disconnect as I described?

Thanks,
~~~ 0;-Dan
 
  


Reply

Tags
disconnect, timeout, usb drive



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
GNOME USB / CUPS conflict - printing halts at "processing" kirbybrown Linux - Newbie 0 08-14-2009 11:40 AM
Long wait for Grub Menu and Blue Tooth USB error code "-100" jim5930 Linux - Newbie 1 05-04-2009 07:33 PM
How to convert "unsigned long long" to "char pointer"? novicehacker Linux - Kernel 1 11-20-2006 12:57 AM
iPod mini - Mandriva - "USB disconnect" errors Grasshopper Linux - Hardware 1 08-19-2005 12:34 PM
Lost DHCP Lease when putting computer in "Standby" mode for a "long" time pnellesen Linux - Networking 1 01-06-2005 11:44 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Hardware

All times are GMT -5. The time now is 06:03 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration