LinuxQuestions.org
Visit Jeremy's Blog.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Software
User Name
Password
Linux - Software This forum is for Software issues.
Having a problem installing a new program? Want to know which application is best for the job? Post your question in this forum.

Notices


Reply
  Search this Thread
Old 12-14-2004, 09:44 AM   #1
mfeat
Member
 
Registered: Aug 2003
Location: Akron, OH
Distribution: Fedora Core 3
Posts: 185

Rep: Reputation: 30
How to turn off disk drive?


i have a second disk drive in my pc that i want to turn off but keep the ability to turn back on when needed. i unmounted all the filesystems on the drive and commented them out in fstab. i suspended the drive with hdparm -Y and when the drive kept waking back up eventually figured out to take it out of the smartdrive monitor (commented out the appropriate line in /etc/smartd.conf). at that point the drive stayed off until i tried to reboot at which point things went very badly. the machine hung on the shutdown and i had to do a hard reset (power off/on). after an ugly 20-minute reboot where all the filesystems had to be checked the thing came back up with all of the filesystems on the second drive online. so it actually modified fstab where i had commented them out. what does it take to turn off a disk drive?
 
Old 12-14-2004, 12:07 PM   #2
320mb
Senior Member
 
Registered: Nov 2002
Location: pikes peak
Distribution: Slackware, LFS
Posts: 2,577

Rep: Reputation: 48
well DUH............
Code:
 
 -Y     Force  an	 IDE  drive to immediately enter the lowest power con-
	      sumption sleep mode, causing it to shut down completely.	A hard
	      or soft reset is required before the drive can be accessed again
	      (the Linux IDE driver will automatically handle issuing a	 reset
	      if/when  needed).	  The current power mode status can be checked
	      using the -C flag.
it says right in the man page what will happen when you use the -Y flag....did you NOT read all of it..................??

Last edited by 320mb; 12-14-2004 at 12:08 PM.
 
Old 12-14-2004, 12:11 PM   #3
TMH
Member
 
Registered: Nov 2004
Location: UK
Distribution: Gentoo
Posts: 61

Rep: Reputation: 15
Perhaps you got confused with the lowercase y, which will turn the hard drive off until it's next accessed.
 
Old 12-14-2004, 12:14 PM   #4
PMorph
Member
 
Registered: Sep 2003
Distribution: Debian
Posts: 213

Rep: Reputation: 31
Why not use something like:

hdparm -S 60 /dev/hdb

A timeout value comes handy if you need to do rebooting in series for some testing reasons or so.

Last edited by PMorph; 12-14-2004 at 12:20 PM.
 
Old 12-14-2004, 01:37 PM   #5
mfeat
Member
 
Registered: Aug 2003
Location: Akron, OH
Distribution: Fedora Core 3
Posts: 185

Original Poster
Rep: Reputation: 30
perhaps i didn't make myself clear. i want the drive to STAY OFF. i don't want it to be necessary for the drive to be running for the machine to shutdown and i don't want the drive coming back up on reboot.
 
Old 12-14-2004, 02:08 PM   #6
PMorph
Member
 
Registered: Sep 2003
Distribution: Debian
Posts: 213

Rep: Reputation: 31
It will stay OFF through shutdown if you haven't mounted any partitions on it.
Reboot is a tricky one.. I think it will start up in any case (I'd worry if it didn't :-)
 
Old 12-14-2004, 02:33 PM   #7
mfeat
Member
 
Registered: Aug 2003
Location: Akron, OH
Distribution: Fedora Core 3
Posts: 185

Original Poster
Rep: Reputation: 30
i believe the drive being suspended is what caused the last shutdown to hang despite having unmounted the filesystems and commented out the fstab entries. i suppose i'll have to disconnect the drive if that's what it takes to turn it off completely. the only reason i'm keeping it around is because that's my ms-windows install. my goal is to not ever have to use it, but there's still a few things that can only be done in windows (unfortunately).
 
Old 12-14-2004, 03:49 PM   #8
mfeat
Member
 
Registered: Aug 2003
Location: Akron, OH
Distribution: Fedora Core 3
Posts: 185

Original Poster
Rep: Reputation: 30
i tested the shutdown again (twice) with the drive suspended and this time it behaved a little better. it wakes the drive up after a timeout and then proceeds with the shutdown. it reboots ok and brings up both drives. so i'm going to atttribute the original case that hung to a fluke.

so the procedure is to suspend the drive after reboot and wake prior to shutdown. if i forget to wake the drive prior to shutdown it should still work (as the last two tests have shown) but for the fluke chance that it hangs, i've taken an additional measure to avoid the long annoying process of doing fsck on all the filesystems which is that i converted them to ext3 (i believe the journaling eliminates the fsck on reboot after a crash). so this should resolve the problem for the most part.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
can't turn DMA on my hard drive slzckboy Linux - General 6 09-24-2005 01:26 PM
How to start, stop, turn on, and turn off deamons BuckRogers01 Debian 3 08-16-2005 09:39 AM
Can Linux turn my ancient PC into a networked NTFS drive? NginUS Linux - Newbie 4 03-26-2005 04:28 AM
How to turn off Xserver in the gui and turn it off in the command line geminiviper Linux - Newbie 8 08-20-2004 08:05 AM
what is drive disk? iflorea Linux - Newbie 2 08-05-2003 08:01 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Software

All times are GMT -5. The time now is 07:07 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