[OPEN] How To Set External HDD To Always On

Post Reply
Mind_
Crewman
Posts: 80
Joined: Sun Jul 14, 2019 4:12 pm
Location: WI, USA

[OPEN] How To Set External HDD To Always On

Post by Mind_ »

I remember doing this EARLY in my Debian XFCE years, but, I can't find this anywhere. Been googling (well, duckduckgo) for hours.

I have an external HDD, via USB3, that always goes to sleep, when not in use.

Is there SOME way to set this to always on?

Because I can't find it, anywhere.

Mind_
Crewman
Posts: 80
Joined: Sun Jul 14, 2019 4:12 pm
Location: WI, USA

Re: [OPEN] How To Set External HDD To Always On

Post by Mind_ »

Been awhile... Erik....

User avatar
erikdubois
Captain
Posts: 3287
Joined: Tue Nov 07, 2017 3:45 pm
Location: Belgium
Contact:

Re: [OPEN] How To Set External HDD To Always On

Post by erikdubois »

indeed
did you find anything?
Learn, have fun and enjoy.
But first use the power of the Arch Wiki
use the tutorials on https://www.youtube.com/erikdubois
then use the power of google
then use the power of our moderators.

Mind_
Crewman
Posts: 80
Joined: Sun Jul 14, 2019 4:12 pm
Location: WI, USA

Re: [OPEN] How To Set External HDD To Always On

Post by Mind_ »

Nope, big nada. I tried looking up a Debian fix, but there's nothing about this "any more". All search answers I got were about installing XYZ on external/USB HDD.

User avatar
erikdubois
Captain
Posts: 3287
Joined: Tue Nov 07, 2017 3:45 pm
Location: Belgium
Contact:

Re: [OPEN] How To Set External HDD To Always On

Post by erikdubois »

Maybe someone will leave us a message here
Learn, have fun and enjoy.
But first use the power of the Arch Wiki
use the tutorials on https://www.youtube.com/erikdubois
then use the power of google
then use the power of our moderators.

Mind_
Crewman
Posts: 80
Joined: Sun Jul 14, 2019 4:12 pm
Location: WI, USA

Re: [OPEN] How To Set External HDD To Always On

Post by Mind_ »

Hoping :)

Mind_
Crewman
Posts: 80
Joined: Sun Jul 14, 2019 4:12 pm
Location: WI, USA

Re: [OPEN] How To Set External HDD To Always On

Post by Mind_ »

I did find this, though.

https://sourceforge.net/projects/hdparm/

It is on AUR, so I installed it. I ran just the command to get all the options. Maybe you guys can sniff this out? Of what I need to turn off sleep on SDA?

Code: Select all

[mind@mind-pc ~]$ hdparm

hdparm - get/set hard disk parameters - version v9.58, by Mark Lord.

clue=6
Usage:  hdparm  [options] [device ...]

Options:
 -a   Get/set fs readahead
 -A   Get/set the drive look-ahead flag (0/1)
 -b   Get/set bus state (0 == off, 1 == on, 2 == tristate)
 -B   Set Advanced Power Management setting (1-255)
 -c   Get/set IDE 32-bit IO setting
 -C   Check drive power mode status
 -d   Get/set using_dma flag
 -D   Enable/disable drive defect management
 -E   Set cd/dvd drive speed
 -f   Flush buffer cache for device on exit
 -F   Flush drive write cache
 -g   Display drive geometry
 -h   Display terse usage information
 -H   Read temperature from drive (Hitachi only)
 -i   Display drive identification
 -I   Detailed/current information directly from drive
 -J   Get/set Western DIgital "Idle3" timeout for a WDC "Green" drive (DANGEROUS)
 -k   Get/set keep_settings_over_reset flag (0/1)
 -K   Set drive keep_features_over_reset flag (0/1)
 -L   Set drive doorlock (0/1) (removable harddisks only)
 -m   Get/set multiple sector count
 -M   Get/set acoustic management (0-254, 128: quiet, 254: fast)
 -n   Get/set ignore-write-errors flag (0/1)
 -N   Get/set max visible number of sectors (HPA) (VERY DANGEROUS)
 -p   Set PIO mode on IDE interface chipset (0,1,2,3,4,...)
 -P   Set drive prefetch count
 -q   Change next setting quietly
 -Q   Get/set DMA queue_depth (if supported)
 -r   Get/set device readonly flag (DANGEROUS to set)
 -R   Get/set device write-read-verify flag
 -s   Set power-up in standby flag (0/1) (DANGEROUS)
 -S   Set standby (spindown) timeout
 -t   Perform device read timings
 -T   Perform cache read timings
 -u   Get/set unmaskirq flag (0/1)
 -U   Obsolete
 -v   Use defaults; same as -acdgkmur for IDE drives
 -V   Display program version and exit immediately
 -w   Perform device reset (DANGEROUS)
 -W   Get/set drive write-caching flag (0/1)
 -x   Obsolete
 -X   Set IDE xfer mode (DANGEROUS)
 -y   Put drive in standby mode
 -Y   Put drive to sleep
 -z   Re-read partition table
 -Z   Disable Seagate auto-powersaving mode
 --dco-freeze      Freeze/lock current device configuration until next power cycle
 --dco-identify    Read/dump device configuration identify data
 --dco-restore     Reset device configuration back to factory defaults
 --dco-setmax      Use DCO to set maximum addressable sectors
 --direct          Use O_DIRECT to bypass page cache for timings
 --drq-hsm-error   Crash system with a "stuck DRQ" error (VERY DANGEROUS)
 --fallocate       Create a file without writing data to disk
 --fibmap          Show device extents (and fragmentation) for a file
 --fwdownload            Download firmware file to drive (EXTREMELY DANGEROUS)
 --fwdownload-mode3      Download firmware using min-size segments (EXTREMELY DANGEROUS)
 --fwdownload-mode3-max  Download firmware using max-size segments (EXTREMELY DANGEROUS)
 --fwdownload-mode7      Download firmware using a single segment (EXTREMELY DANGEROUS)
 --fwdownload-modee      Download firmware using mode E (min-size segments) (EXTREMELY DANGEROUS)
 --fwdownload-modee-max  Download firmware using mode E (max-size segments) (EXTREMELY DANGEROUS)
 --idle-immediate  Idle drive immediately
 --idle-unload     Idle immediately and unload heads
 --Iraw filename   Write raw binary identify data to the specfied file
 --Istdin          Read identify data from stdin as ASCII hex
 --Istdout         Write identify data to stdout as ASCII hex
 --make-bad-sector Deliberately corrupt a sector directly on the media (VERY DANGEROUS)
 --offset          use with -t, to begin timings at given offset (in GiB) from start of drive
 --prefer-ata12    Use 12-byte (instead of 16-byte) SAT commands when possible
 --read-sector     Read and dump (in hex) a sector directly from the media
 --repair-sector   Alias for the --write-sector option (VERY DANGEROUS)
 --sanitize-antifreeze-lock  Block sanitize-freeze-lock command until next power cycle
 --sanitize-block-erase      Start block erase operation
 --sanitize-crypto-scramble  Change the internal encryption keys that used for used data
 --sanitize-freeze-lock      Lock drive's sanitize features until next power cycle
 --sanitize-overwrite  PATTERN  Overwrite the internal media with constant PATTERN
 --sanitize-status           Show sanitize status information
 --security-help             Display help for ATA security commands
 --set-sector-size           Change logical sector size of drive
 --trim-sector-ranges        Tell SSD firmware to discard unneeded data sectors: lba:count ..
 --trim-sector-ranges-stdin  Same as above, but reads lba:count pairs from stdin
 --verbose                   Display extra diagnostics from some commands
 --write-sector              Repair/overwrite a (possibly bad) sector directly on the media (VERY DANGEROUS)

The website, from which I looked this up, to look at -S. Is there some way you can set dis-allow SDA to sleep?

Mind_
Crewman
Posts: 80
Joined: Sun Jul 14, 2019 4:12 pm
Location: WI, USA

Re: [OPEN] How To Set External HDD To Always On

Post by Mind_ »

When I run with -S, I get this:

Code: Select all

[mind@mind-pc ~]$ hdparm -S 0 /dev/sda
/dev/sda: Permission denied

Mind_
Crewman
Posts: 80
Joined: Sun Jul 14, 2019 4:12 pm
Location: WI, USA

Re: [OPEN] How To Set External HDD To Always On

Post by Mind_ »

I forgot to add sudo, dumb me... BUT...

Code: Select all

mind@mind-pc ~]$ sudo hdparm -S 0 /dev/sda

/dev/sda:
 setting standby to 0 (off)
SG_IO: bad/missing sense data, sb[]:  70 00 01 00 00 00 00 0a 00 00 00 00 00 1d 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
I read online that the sensor, either on the HDD (unlikely) or on the USB3 controller is bad/uncontrollable.

Well, there's one idea out the window...

User avatar
sleepyeyesvince
Crewman
Posts: 12
Joined: Thu Oct 10, 2019 3:43 pm

Re: [OPEN] How To Set External HDD To Always On

Post by sleepyeyesvince »

I wonder if it's a problem of hdparm not supporting the firmware of your external HDD.

I did a bit of digging and found this thread:
https://unix.stackexchange.com/question ... m-sleeping

One of the answers mentions setting up a simple cronjob that accesses the disk every 5 mins. It seems like a bit of a workaround, but it might serve your purposes and I've read other reports that it seems to work.

Post Reply

Return to “Xfce-4”