LinuxQuestions.org
Share your knowledge at the LQ Wiki.
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 07-14-2016, 06:21 AM   #1
spiri13
Member
 
Registered: Jun 2016
Posts: 57

Rep: Reputation: Disabled
External hard disk still running after turning off the machine


Hi,

My Linux is installed on an external hard disk, connected to my laptop.
Every time, when I turn off the machine, the external hard disk is still running for at least 10 to 20 minutes.

Is there a setting to immediately power off the hard disk, after I turn off the machine?

PS: I have no access to the BIOS, because the screen of my laptop is damaged.

Last edited by spiri13; 07-14-2016 at 05:33 PM.
 
Old 07-14-2016, 06:48 AM   #2
AwesomeMachine
LQ Guru
 
Registered: Jan 2005
Location: USA and Italy
Distribution: Debian testing/sid; OpenSuSE; Fedora; Mint
Posts: 5,524

Rep: Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015Reputation: 1015
Some machines power the USB ports after poweroff. The light on the external drive may stay on during this time. But just feel with your fingertips to see if the drive is actually doing anything but spinning.
 
Old 07-14-2016, 06:58 AM   #3
spiri13
Member
 
Registered: Jun 2016
Posts: 57

Original Poster
Rep: Reputation: Disabled
Ok, but which job my drive is doing the last 10 minutes after I turn off the machine?
So it is not possible to immediately power off the external hard disk without to drag out the cable?
Can I drag out the cable without damaging something?

It sucks sometimes when I go to bed and the hard disk is still running.
 
Old 07-14-2016, 08:56 AM   #4
af7567
Member
 
Registered: Nov 2012
Posts: 293

Rep: Reputation: 106Reputation: 106
Does your external hard disk get power from the USB port or does it have a separate power supply plugged in?
 
Old 07-14-2016, 09:45 AM   #5
spiri13
Member
 
Registered: Jun 2016
Posts: 57

Original Poster
Rep: Reputation: Disabled
It has an USB port for connecting it to my laptop and a power supply, too.
 
Old 07-14-2016, 10:17 AM   #6
af7567
Member
 
Registered: Nov 2012
Posts: 293

Rep: Reputation: 106Reputation: 106
It sounds like the external disk runs on its own power supply all the time and puts the spinning disk to sleep after a period of inactivity. Once your laptop is completely shut down then nothing should be accessing that disk so it is safe to turn it off. Some of those external disks have a power button at the back you can just switch off instead of unplugging cables.

You might also be able to configure the inactivity period so that the disk sleeps sooner, either with the hdparm utility or with software created by the manufacturer.
 
Old 07-14-2016, 11:17 AM   #7
spiri13
Member
 
Registered: Jun 2016
Posts: 57

Original Poster
Rep: Reputation: Disabled
Ok, thank you for all the useful information!
 
Old 07-14-2016, 12:53 PM   #8
spiri13
Member
 
Registered: Jun 2016
Posts: 57

Original Poster
Rep: Reputation: Disabled
I tried to set the advanced power management feature (am I right?) using hdparm, but it isn't working.

I tried the following code:
Code:
sudo hdparm -B 254 /dev/sda2
and the output is
Code:
 setting Advanced Power Management level to 0xfe (254)
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
 APM_level	= not supported
The man page says
Code:
[...]values 128 through 254 (which do not permit spin-down)[...]
I don't understand English very well, but I think this is what I was searching for.
Am I on the correct place in the man page?

How do I completely turn off this period of spinning using hdparm?
 
Old 07-14-2016, 01:55 PM   #9
af7567
Member
 
Registered: Nov 2012
Posts: 293

Rep: Reputation: 106Reputation: 106
I think the option you want is hdparm -S there also maybe another option to check the current setting of the standby time. I can't see the options at the moment because I am on my phone
 
Old 07-14-2016, 02:09 PM   #10
spiri13
Member
 
Registered: Jun 2016
Posts: 57

Original Poster
Rep: Reputation: Disabled
I executed the following code:

Code:
hdparm -S 0 /dev/sda{1..2}
then I powered off the machine, waited for 10 seconds, but the drive was still running.

Here is the output:
Code:
/dev/sda1:
 setting standby to 0 (off)
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00

/dev/sda2:
 setting standby to 0 (off)
SG_IO: bad/missing sense data, sb[]:  70 00 05 00 00 00 00 0a 00 00 00 00 20 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00 00
Don't know what to do now...


EDIT: I also tried the -Y option, which says

Code:
Force  an  IDE  drive to immediately enter the lowest power consumption sleep mode, causing it to shut down completely.
But I achieve the same result.

Last edited by spiri13; 07-14-2016 at 02:18 PM.
 
Old 07-14-2016, 02:23 PM   #11
af7567
Member
 
Registered: Nov 2012
Posts: 293

Rep: Reputation: 106Reputation: 106
Oh i forgot to say last time you should probably need to run the command on the whole disk so /dev/sda (not 1 or 2). It has been a long time since i used this command though so i don't know if it even works on new disks.
 
Old 07-14-2016, 02:29 PM   #12
spiri13
Member
 
Registered: Jun 2016
Posts: 57

Original Poster
Rep: Reputation: Disabled
My external hard disk is ~10 years old
But, unfortunately, this still doesn't solve my problem...
 
Old 07-14-2016, 05:28 PM   #13
af7567
Member
 
Registered: Nov 2012
Posts: 293

Rep: Reputation: 106Reputation: 106
If it is that old then it probably is just something designed to be turned off manually when you don't need it anymore If you are sure that your laptop is shutdown completely (no more lights on) then it should be safe to flick the power switch or unplug the power supply of your external disk.
 
Old 07-14-2016, 05:33 PM   #14
spiri13
Member
 
Registered: Jun 2016
Posts: 57

Original Poster
Rep: Reputation: Disabled
Ok, thank you for the reply.
 
  


Reply



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
Turning internal hard disk into external Silkeyes Linux - Software 5 04-26-2010 07:38 PM
USB external hard disk becomes read only after running for a while. itsakc Linux - Hardware 2 12-28-2009 06:13 PM
Problem running ubuntu 8.04 from external hard disk ilbozza Linux - Newbie 3 05-08-2008 03:10 AM
Can I update from another hard disk/running machine? billturnbull Linux - Newbie 1 01-09-2007 08:33 PM
How can I copy files from my linux machine to an external hard disk? hello321_1999 Linux - Newbie 3 05-08-2006 02:00 PM

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

All times are GMT -5. The time now is 08:17 PM.

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