[RESOLVED] auto turn off hard drive

This forum is for Marvell Kirkwood devices such as the GoFlex Home/Net, PogoPlug v1/v2, SheevaPlug, and ZyXEL devices.

Re: [RESOLVED] auto turn off hard drive

Postby moonman » Fri Mar 30, 2012 5:58 pm

laptom-mode-tools can use sdparm if you configure it properly. Look through the config file, specifically change this
$this->bbcode_second_pass_code('', '#
# If this is enabled, laptop mode tools will assume that SCSI drives are
# really SATA drives that only _look_ like SCSI drives, and will use hdparm
# to control them. Set this to 0 if you have /dev/sd devices and you want
# laptop mode tools to use the "sdparm" command to control them.
#
ASSUME_SCSI_IS_SATA=1
')

to

$this->bbcode_second_pass_code('', 'ASSUME_SCSI_IS_SATA=0')

and

$this->bbcode_second_pass_code('', 'ENABLE_LAPTOP_MODE_ON_AC=0')

to

$this->bbcode_second_pass_code('', 'ENABLE_LAPTOP_MODE_ON_AC=1')

Only use this if hdparm doesn't work. It didn't for me, so I used sdparm.
Try
$this->bbcode_second_pass_code('', 'hdparm -y /dev/sda')
Does your hdd spin down immediately?
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: [RESOLVED] auto turn off hard drive

Postby ldi9999 » Fri Mar 30, 2012 8:23 pm

I kept everything in laptop-mode.conf default except turning on it on both AC & battery. I assume that means it uses HDPARM to spin down hard drive. I'll try to use SDPARM as you suggested to see if there will be any difference. I had no problem to spin down the drive. Just the drive would be spinned up by itself very quick.
ldi9999
 
Posts: 59
Joined: Mon Mar 05, 2012 10:31 pm

Re: [RESOLVED] auto turn off hard drive

Postby moonman » Fri Mar 30, 2012 9:17 pm

i suppose you put laptop-tools in daemons in rc.conf and rebooted?
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: [RESOLVED] auto turn off hard drive

Postby ldi9999 » Fri Mar 30, 2012 9:38 pm

Yes I did. Otherwise the drive would not be spin down. Like a said, there is no problem on spin down drive as scheduled. Just the drive spins up by itself after a few seconds.
ldi9999
 
Posts: 59
Joined: Mon Mar 05, 2012 10:31 pm

Re: [RESOLVED] auto turn off hard drive

Postby moonman » Sat Mar 31, 2012 6:44 am

I suppose the only way out for you would putting some system components or the whole system onto a USB low power device
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: [RESOLVED] auto turn off hard drive

Postby ldi9999 » Sun Apr 01, 2012 6:43 am

$this->bbcode_second_pass_quote('moonman', 'I') suppose the only way out for you would putting some system components or the whole system onto a USB low power device


I've been thinking of putting system on USB. The problem is the hard drive I'd like to share is attached to internal SATA port, which has the best performance. Since it's attached to SATA, it has higher priority than USB drive. The unit won't boot with the SATA drive attached since it's not system drive. I've no idea on how to force system boot from USB drive instead of SATA.
ldi9999
 
Posts: 59
Joined: Mon Mar 05, 2012 10:31 pm

Re: [RESOLVED] auto turn off hard drive

Postby moonman » Sun Apr 01, 2012 7:03 am

Are you sure it won't boot from USB? I think all you have to do is label the boot partition `rootfs`. Label the sata (old) boot partition something else. Devs, correct me if I am wrong, but I think it is the way it works.
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3388
Joined: Sat Jan 15, 2011 3:36 am

Re: [RESOLVED] auto turn off hard drive

Postby ronson » Wed Apr 18, 2012 7:47 pm

Hi there!

For me it is working!
I have the System installed on a USB Flash Drive and I have also a Sata Drive hooked to the left SATA Port. I have even a partition called "rootfs" on the SATA Drive with no content in it and the GoFlex Net is booting propperly!

I am using this solution to be able to mirror the system from the Flash-Drive onto the rootfs-partition of the SATA Drive so in case of System Failure I am able to boot the mirrored system directly from the SATA Drive.
ronson
 
Posts: 11
Joined: Mon Apr 09, 2012 2:21 pm

Re: [RESOLVED] auto turn off hard drive

Postby bz31 » Tue Jun 19, 2012 10:37 am

$this->bbcode_second_pass_quote('ldi9999', '')$this->bbcode_second_pass_quote('moonman', 'I') suppose the only way out for you would putting some system components or the whole system onto a USB low power device


I've been thinking of putting system on USB. The problem is the hard drive I'd like to share is attached to internal SATA port, which has the best performance. Since it's attached to SATA, it has higher priority than USB drive. The unit won't boot with the SATA drive attached since it's not system drive. I've no idea on how to force system boot from USB drive instead of SATA.


Remove hard disk. Boot from usb. Hotplug Hard disk. It works for me (GoFlex Home 1 TB).
bz31
 
Posts: 36
Joined: Mon Jun 18, 2012 8:35 am
Location: France
Top

Re: [RESOLVED] auto turn off hard drive

Postby bz31 » Wed Jun 20, 2012 8:32 am

$this->bbcode_second_pass_quote('ldi9999', 'Y')es I did. Otherwise the drive would not be spin down. Like a said, there is no problem on spin down drive as scheduled. Just the drive spins up by itself after a few seconds.

I think I found the solution (boot with the sata driver).
archlinux uses syslog-ng. It writes a line "-- MARK --" in /var/log/ every 20 minutes.
To disable it, add an option
mark_freq (0)
in /etc/syslog-ng.conf (and restart the daemon syslog-ng).

Edit : check /var/log/*.
- Found another who run every hour and writes log: anacron (see /etc/cron.d/0hourly). Disable it.
- If you allow ssh connections from the Internet. Each connection attempt causes a log in /var/log/auth.log To avoid this, I use a nonstandard port between 49152 and 65535 for sshd.
bz31
 
Posts: 36
Joined: Mon Jun 18, 2012 8:35 am
Location: France
Top

PreviousNext

Return to Marvell Kirkwood

Who is online

Users browsing this forum: No registered users and 6 guests