MyBook Spindown ?
Started by: kinjikinji
On: 1191998241|%e %b %Y, %H:%M %Z|agohover
Number of posts: 101
rss icon RSS: New posts
MyBook Spindown ?
kinjikinji 1191998241|%e %b %Y, %H:%M %Z|agohover

Hi everyone,

I found on this forum on a topic, this link : [http://websupport.wdc.com/forum/topic.asp?TOPIC_ID=5595]

I followed everything, copied the smart_spindown and the start/stop script in the right directory with the right permissions x2 since this script can only monitor one disk at a time.
Everybody seem to get it working without any problems, but here I get one, I've got this error when I try to launch the start script :

/etc/init.d/smart_spindown start
bash: /etc/init.d/smart_spindown: /sbin/runscript: bad interpreter: No such file or directory

It cannot work since there is no /sbun/runscript. So how everybody does it ? Did I miss something ? Thanks for you help !

unfold MyBook Spindown ? by kinjikinji, 1191998241|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
johanfajohanfa 1192025272|%e %b %Y, %H:%M %Z|agohover

Frankly I dont know if anyone actually has gotten this to work on mybook ? I can start the script but the disk never spins down …. so .. ? Anyone with better luck ?

unfold Re: MyBook Spindown ? by johanfajohanfa, 1192025272|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kinjikinji 1192025983|%e %b %Y, %H:%M %Z|agohover

Did you update your hdparm ? You have to download the last version at sourceforge (http://sourceforge.net/projects/hdparm) and just make & install.

How did you manage it to work ? I mean, how did you install runscript ? Because there is no runscript folder in my /sbin/

unfold Re: MyBook Spindown ? by kinjikinji, 1192025983|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
johanfajohanfa 1192026362|%e %b %Y, %H:%M %Z|agohover

Yeah I have updated hdparm, and the runscript too is downloaded from the spindown-homepage if I remember it correctly. However when I run it I seem to get no function what so ever….

unfold Re: MyBook Spindown ? by johanfajohanfa, 1192026362|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kinjikinji 1192027194|%e %b %Y, %H:%M %Z|agohover

I can't find any link or any text about runscript, can you remember or find again where you get it ? So I can test by myself !

unfold Re: MyBook Spindown ? by kinjikinji, 1192027194|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
johanfajohanfa 1192027947|%e %b %Y, %H:%M %Z|agohover

http://gentoo-wiki.com/HOWTO_HDD_spindown_small_server

There are two boxes with code on this page… the first is the spindown-script, the second is the runscript….

unfold Re: MyBook Spindown ? by johanfajohanfa, 1192027947|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kinjikinji 1192028432|%e %b %Y, %H:%M %Z|agohover

Yeah I already did that, but If i try to execute the runscript all I get is that there is no runscript in /sbin/.

My question is in fact : how did you manage to install the runscript package ?

unfold Re: MyBook Spindown ? by kinjikinji, 1192028432|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
johanfajohanfa 1192029360|%e %b %Y, %H:%M %Z|agohover

You have to check the paths mentioned in the scripts…. in runscript you've got
SMART_SPINDOWN_SCRIPT=/usr/sbin/smart_spindown

then of course smart_spindown has to be placed in /usr/sbin

the runscript is supposed to be placed in /sbin … then you must have it there… or change in the script…

unfold Re: MyBook Spindown ? by johanfajohanfa, 1192029360|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kinjikinji 1192029840|%e %b %Y, %H:%M %Z|agohover

I will look tonight if i can find where runscript is located because it's not under /sbin…. I still don't understand why you have it and I don't…

unfold Re: MyBook Spindown ? by kinjikinji, 1192029840|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
ZiumZium 1192052562|%e %b %Y, %H:%M %Z|agohover

I tried the script, changed few things to match MBWE.
I'll post if it works.

unfold Re: MyBook Spindown ? by ZiumZium, 1192052562|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
ZiumZium 1192080669|%e %b %Y, %H:%M %Z|agohover

Here are few tips :
I named the script in /ect/init.d smart_spindown.sh
changed the line !/sbin/runscript to !/bin/sh
It seems to be quite fine, except ebegin eend commands (log commants only)

I changed /etc/fstab like this:

/dev/md3 /var ext3 defaults,noatime,commit=43200 0 2

(don't remove others line than /dev/md3)

It still need tune to be sure it's a good setup (i mean time to spin down, laptop_mode or not…)

unfold Re: MyBook Spindown ? by ZiumZium, 1192080669|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kyyhkynenkyyhkynen 1192094671|%e %b %Y, %H:%M %Z|agohover

Hi!

I have been using the script successfully with my MBWE II (in raid1 mode) for a few weeks now; the drives and the fan are spinning only when needed. Since I'm using my MBWE only as a music and backups storage, it is unused most of the time anyway. At the moment the average time the drives have spent sleeping seems to be a little under four hours.

I have modified the script to support two disks and made a few other tweaks to make it more MBWE-friendly. I have also created a temperature monitoring and logging script to replace the original one.
(I have also swapped the original teensy-weensy noisy fan to 2x 120mm silent fans, but thats a whole another story :)

On the other hand, I have also made other changes in order to minimize unwanted disk reads/writes, such as:
- disable mionet (I don't need it personally)
- disable klogd and syslogd (busybox version of syslogd doesn't support changing the location of syslog)
- disable wdc-fuel-gauge (displays the disk usage in the blue led ring) and wdc-heat-monitor, since they seem to spin up the disks randomly
- create a small ram disk and keep logs and samba .tdb's there

I will write a step-by-step tutorial, just need to find some free time for that.

A tip for the startup/shutdown script; name it to something like
/etc/init.d/S50smart_spindown
and make a link to it named something like
/etc/init.d/K50smart_spindown (ln -s /etc/init.d/S50smart_spindown /etc/init.d/K50smart_spindown)
then the script will be started during boot and stopped during shutdown.
(like all the other S* and K* scripts in /etc/init.d; S* scripts are run during boot and K* scripts during shutdown; the number defines the order they are executed in)

unfold Re: MyBook Spindown ? by kyyhkynenkyyhkynen, 1192094671|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
johanfajohanfa 1192098765|%e %b %Y, %H:%M %Z|agohover

Interesting … would be very nice of you to post your modified script if it also actually works on MBWE1….

unfold Re: MyBook Spindown ? by johanfajohanfa, 1192098765|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
FreshmanFreshman 1192214794|%e %b %Y, %H:%M %Z|agohover

kyyhkynen:
Hi,
could you kindly publish step-by-step how here? I have MBWE1, but I'm really newbie in Linux environment…

unfold Re: MyBook Spindown ? by FreshmanFreshman, 1192214794|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kabadikabadi 1198786467|%e %b %Y, %H:%M %Z|agohover

I have noticed that when my fan speed needs to go to the fist speed (50) it actually goes to 100 briefly. Ie. It goes 0 - 100 - 50 - 0 -100 -50 etc.

Has anyone else noticed this?

unfold Re: MyBook Spindown ? by kabadikabadi, 1198786467|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
ArTiArTi 1192116949|%e %b %Y, %H:%M %Z|agohover

i'm really interested by your script and the how to dissable blue usage led,wdc-heat-monitor, klogd etc…

i wait with impatient your how to.. good work

unfold Re: MyBook Spindown ? by ArTiArTi, 1192116949|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kinjikinji 1192123063|%e %b %Y, %H:%M %Z|agohover

I've managed to make it work too. But I'm really interested for all the thing you disable if it help the spindown script to work properly :D. I think I can manage to find how to do it will try :)

unfold Re: MyBook Spindown ? by kinjikinji, 1192123063|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kinjikinji 1192125693|%e %b %Y, %H:%M %Z|agohover

Just to know : Did someone manage to shut the fan when the disk are in standby ? Would be really nice too !

unfold Re: MyBook Spindown ? by kinjikinji, 1192125693|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
bobbywisebobbywise 1192138168|%e %b %Y, %H:%M %Z|agohover

Hi there,

I have everything installed, and I think it's running okay. However, how can we test to see that this is actually running ?

When I do a ps -A, I get the following:

[root@SAN ~]# ps -A

PID TTY TIME CMD
1 ? 00:00:00 init
2 ? 00:00:00 ksoftirqd/0
3 ? 00:00:00 events/0
4 ? 00:00:00 khelper
5 ? 00:00:00 kthread
9 ? 00:00:00 kblockd/0
36 ? 00:00:00 pdflush
37 ? 00:00:00 pdflush
38 ? 00:00:00 kswapd0
39 ? 00:00:00 aio/0
143 ? 00:00:00 ata/0
146 ? 00:00:00 sata-endQ
147 ? 00:00:00 scsi_eh_0
152 ? 00:00:00 sata-endQ
153 ? 00:00:00 scsi_eh_1
172 ? 00:00:00 kcryptd/0
173 ? 00:00:00 kcryptd/0
177 ? 00:00:00 md3_raid1
179 ? 00:00:00 md2_raid1
181 ? 00:00:00 md1_raid1
182 ? 00:00:00 kjournald
190 ? 00:00:00 kjournald
193 ? 00:00:00 kjournald
240 ? 00:00:07 sshd
496 ? 00:00:00 khubd
677 ? 00:00:00 fuel-gauge
691 ? 00:00:00 heat-monitor
697 ? 00:00:00 sleep
715 ? 00:00:00 keyring
766 ? 00:00:00 ntpd
770 ? 00:00:00 inetd
774 ? 00:00:00 mDNSResponderPo
777 ? 00:00:00 nmbd
781 ? 00:00:00 lighttpd
784 ? 00:00:10 perl
792 ? 00:00:00 php-cgi
794 ? 00:00:00 crond
796 ? 00:00:00 php-cgi
801 ? 00:00:00 php-cgi
802 ? 00:00:00 php-cgi
803 ? 00:00:00 php-cgi
804 ? 00:00:00 php-cgi
806 ? 00:00:00 php-cgi
805 ? 00:00:00 php-cgi
807 ? 00:00:00 mt-daapd
808 ? 00:00:03 mt-daapd
813 ttyS0 00:00:00 getty
814 ? 00:00:00 syslogd
815 ? 00:00:00 klogd
816 ? 00:00:00 mt-daapd
817 ? 00:00:00 mt-daapd
833 ? 00:00:00 sshd
835 pts/0 00:00:00 bash
844 pts/0 00:00:00 ps

From this list of processes, can we identify which one is the smart spindown process which has been launched by the script at boot time ?

unfold Re: MyBook Spindown ? by bobbywisebobbywise, 1192138168|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
ionoffionoff 1192152360|%e %b %Y, %H:%M %Z|agohover

Do a ps aux
If will give you more details

unfold Re: MyBook Spindown ? by ionoffionoff, 1192152360|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
bobbywisebobbywise 1192226325|%e %b %Y, %H:%M %Z|agohover

I did ps aux, and get the following:

USER PID %CPU %MEM VSZ RSS TTY STAT START TIME COMMAND
root 1 0.0 1.2 1280 372 ? Ss Oct11 0:00 init
root 2 0.0 0.0 0 0 ? SN Oct11 0:02 [ksoftirqd/0]
root 3 0.0 0.0 0 0 ? S< Oct11 0:00 [events/0]
root 4 0.0 0.0 0 0 ? S< Oct11 0:00 [khelper]
root 5 0.0 0.0 0 0 ? S< Oct11 0:00 [kthread]
root 9 0.0 0.0 0 0 ? S< Oct11 0:03 [kblockd/0]
root 36 0.0 0.0 0 0 ? S Oct11 0:00 [pdflush]
root 37 0.0 0.0 0 0 ? S Oct11 0:00 [pdflush]
root 38 0.0 0.0 0 0 ? S Oct11 0:00 [kswapd0]
root 39 0.0 0.0 0 0 ? S< Oct11 0:00 [aio/0]
root 143 0.0 0.0 0 0 ? S< Oct11 0:28 [ata/0]
root 146 0.0 0.0 0 0 ? S< Oct11 0:00 [sata-endQ]
root 147 0.0 0.0 0 0 ? S< Oct11 0:00 [scsi_eh_0]
root 152 0.0 0.0 0 0 ? S< Oct11 0:01 [sata-endQ]
root 153 0.0 0.0 0 0 ? S< Oct11 0:00 [scsi_eh_1]
root 172 0.0 0.0 0 0 ? S< Oct11 0:00 [kcryptd/0]
root 173 0.0 0.0 0 0 ? S< Oct11 0:00 [kcryptd/0]
root 177 0.0 0.0 0 0 ? S< Oct11 0:05 [md3_raid1]
root 179 0.0 0.0 0 0 ? S< Oct11 0:00 [md2_raid1]
root 181 0.0 0.0 0 0 ? S< Oct11 0:00 [md1_raid1]
root 182 0.0 0.0 0 0 ? S< Oct11 0:00 [kjournald]
root 190 0.0 0.0 0 0 ? S< Oct11 0:00 [kjournald]
root 193 0.0 0.0 0 0 ? S< Oct11 0:00 [kjournald]
root 240 0.0 2.5 2140 752 ? S Oct11 0:09 /usr/sbin/sshd
root 496 0.0 0.0 0 0 ? S< Oct11 0:00 [khubd]
root 677 0.0 2.7 1544 824 ? S Oct11 0:03 /bin/bash /usr/local/wdc/fuel-gauge
root 691 0.0 0.8 560 244 ? S Oct11 0:04 /usr/local/wdc/heat-monitor
root 715 0.0 0.6 552 188 ? S Oct11 0:00 /sbin/keyring
root 766 0.0 4.7 1520 1432 ? SL Oct11 0:00 /usr/sbin/ntpd -p /var/run/ntpd.pid
root 770 0.0 1.1 1284 332 ? S Oct11 0:00 /usr/sbin/inetd
root 774 0.0 1.1 740 336 ? S Oct11 0:00 /sbin/mDNSResponderPosix -f /etc/mDNSResponderPosix -b
root 777 0.0 2.6 1976 792 ? Ss Oct11 0:02 /usr/local/samba/sbin/nmbd -D -s/var/oxsemi/smb.conf -l/v
www-data 781 0.0 1.9 2496 596 ? S Oct11 0:00 /usr/sbin/lighttpd -f /etc/lighttpd/lighttpd.conf
www-data 784 0.0 25.9 8760 7804 ? S Oct11 0:10 perl /usr/www/lib/nasMaster.pl
www-data 792 0.0 5.6 4744 1696 ? Ss Oct11 0:00 /usr/local/bin/php-cgi
root 794 0.0 1.0 1276 324 ? S Oct11 0:00 /usr/sbin/crond -c /etc/crontabs
www-data 796 0.0 5.6 4744 1696 ? Ss Oct11 0:00 /usr/local/bin/php-cgi
www-data 801 0.0 5.6 4744 1696 ? Ss Oct11 0:00 /usr/local/bin/php-cgi
www-data 802 0.0 5.6 4744 1696 ? Ss Oct11 0:00 /usr/local/bin/php-cgi
www-data 803 0.0 3.0 4744 928 ? S Oct11 0:00 /usr/local/bin/php-cgi
www-data 804 0.0 3.0 4744 928 ? S Oct11 0:00 /usr/local/bin/php-cgi
www-data 806 0.0 3.0 4744 928 ? S Oct11 0:00 /usr/local/bin/php-cgi
www-data 805 0.0 3.0 4744 928 ? S Oct11 0:00 /usr/local/bin/php-cgi
root 807 0.0 2.0 1724 616 ? S Oct11 0:00 /usr/local/sbin/mt-daapd -c /etc/mt-daapd.conf
root 808 0.0 15.3 5440 4600 ? S Oct11 0:03 /usr/local/sbin/mt-daapd -c /etc/mt-daapd.conf
root 813 0.0 1.2 1276 364 ttyS0 Ss+ Oct11 0:00 /sbin/getty -L ttyS0 115200 vt100
root 814 0.0 1.2 1272 376 ? Ss Oct11 0:00 /sbin/syslogd -n -m 0
root 815 0.0 1.2 1272 364 ? Ss Oct11 0:00 /sbin/klogd -n
root 816 0.0 15.3 5440 4600 ? S Oct11 0:00 /usr/local/sbin/mt-daapd -c /etc/mt-daapd.conf
root 817 0.0 15.3 5440 4600 ? S Oct11 0:00 /usr/local/sbin/mt-daapd -c /etc/mt-daapd.conf
root 8285 0.0 7.0 4552 2108 ? Ss 23:42 0:00 smbd -s/var/oxsemi/smb.conf -l/var/log -d0
root 8335 0.0 0.7 564 220 ? S 23:52 0:00 sleep 300
root 8343 0.8 4.0 4744 1212 ? Ss 23:54 0:00 /usr/sbin/sshd: root@pts/0
root 8346 0.3 3.4 1604 1036 pts/0 Ss+ 23:54 0:00 -bash
root 8358 0.0 1.3 1400 412 pts/0 R+ 23:55 0:00 ps aux

It seems like my /etc/init.d/smart_spindown.sh script has not started the /usr/sbin/smart_spindown

Did people change the $DISK value in /usr/sbin/smart_spindown from hda to md3 ?

unfold Re: MyBook Spindown ? by bobbywisebobbywise, 1192226325|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
FreshmanFreshman 1192302599|%e %b %Y, %H:%M %Z|agohover

Should not $DISK be 'sda'?

unfold Re: MyBook Spindown ? by FreshmanFreshman, 1192302599|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
bobbywisebobbywise 1192310753|%e %b %Y, %H:%M %Z|agohover

yes, I had a look at the other WDA scripts, and the two disks are sda and sdb

I have created two files in /usr/sbin called smart_spindown_sda and smart_spindown_sdb, where $DISK=sda and $DISK=sdb, respectively.

Then I have created the two startup scripts in /etc/initi.d which call the two files in smart_spindown_sda and smart_spindown_sdb /usr/sbin.

However, I still see no evidence of them running as processes when I run ps aux….

unfold Re: MyBook Spindown ? by bobbywisebobbywise, 1192310753|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kinjikinji 1192174198|%e %b %Y, %H:%M %Z|agohover

@kyyhkynenkyyhkynen : I have left my mybook during night and the fan was silent and the disk didn't spinup without reason. So what make you think that the fuel-gauge and heat-monitor make them spinup from time to time ? (I'm using the same hardware configuration !)

unfold Re: MyBook Spindown ? by kinjikinji, 1192174198|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kyyhkynenkyyhkynen 1192430073|%e %b %Y, %H:%M %Z|agohover

@kinji:

If yours works fine without disabling any additional services, good for you :)
This probably depends on how you use your device; what services you run on it, how much you use ssh etc. For some people, just running smart_spindown will be enough to keep the device silent, for others additional tweaks may be needed.

Spinups mostly occur because the files accessed aren't in the read/write cache in RAM, and because the MBWE doesn't have much RAM, spinups tend to occur often when lots of services are used concurrently.

A way to monitor which programs access disk:

First disable syslogd and klogd by commenting them out in /etc/inittab ( the two lines starting ::respawn:/sbin/syslogd and ::respawn:/sbin/klogd ) and rebooting. This must be done to prevent a feedback loop.

echo 1 > /proc/sys/vm/block_dump
This causes the system to log every disk access to diagnostic messages.
The messages can then be viewed using the command dmesg.

Set block_dump to 1, leave the device running for a good while without accessing it (thus causing disk access), then see which programs have been causing reads and writes.
Remember to set block_dump to 0 afterwards by
echo 0 > /proc/sys/vm/block_dump

Remember, the above setting causes every disk access to be logged, so it may not be a good idea to read/write large amounts of data when using it :)

unfold Re: MyBook Spindown ? by kyyhkynenkyyhkynen, 1192430073|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
ZiumZium 1192655261|%e %b %Y, %H:%M %Z|agohover

Well, after i setup the script, i thought it was fine.
While checking more, it seems that the disk spin up 3 times an hour.. too much for me.

So, even if you think it never spins up, better to check again.
I used to register sound made by Mybook with my putter and watch later how was the sound, so I can see when it really spins up and down.

I'll go on and let you know (next step will be to disable klog and syslog)

unfold Re: MyBook Spindown ? by ZiumZium, 1192655261|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kyyhkynenkyyhkynen 1192695974|%e %b %Y, %H:%M %Z|agohover

Ok, I wrote a quick guide; making WD MyBook World Edition cool and quiet

The guide is written in a hurry so it might contain errors. Use with caution.
Also, if somebody with a single disk MBWE could test if the scripts actually work with it, it would be appreciated :)

Any feedback would be appreciated also.

edit: added the link also to the hacks and howto's page

last edited on 1192696273|%e %b %Y, %H:%M %Z|agohover by kyyhkynen + show more
unfold Re: MyBook Spindown ? by kyyhkynenkyyhkynen, 1192695974|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
ZiumZium 1192739339|%e %b %Y, %H:%M %Z|agohover

Thank you, i'm looking to it.
I don't see the use of /etc/init.d/S15wdc-heat-monitor on MBWEI since there's no fan in it.
Does this script do something else than fan control ?

After test, Mybook still wakes up at least once an hour.
What do you think of this ? Isn't it too many ?

I don't want to have a setup where spindown is worse than disk always up…

last edited on 1192740945|%e %b %Y, %H:%M %Z|agohover by Zium + show more
unfold Re: MyBook Spindown ? by ZiumZium, 1192739339|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
bobbywisebobbywise 1192746127|%e %b %Y, %H:%M %Z|agohover

Hi kyyhkyen,

I followed your guide, and everything seems to be working fine. However, when I followed your steps to lower the disk activity (e.g. the mods to /etc/crontabs/root , /etc/inittab, /etc/ntp.conf ) I now have a bunch of defuct (zombie) processes.

[root@SAN ~]# ps -ef | grep defunct | more
root 236 1 0 00:07 ? 00:00:00 [sshd] <defunct>
root 681 1 0 00:07 ttyS0 00:00:00 [S20wdc-fan-test] <defunct>
root 746 1 0 00:08 ? 00:00:00 [ntpd] <defunct>
root 750 1 0 00:08 ? 00:00:00 [inetd] <defunct>
root 754 1 0 00:08 ? 00:00:00 [mDNSResponderPo] <defunct>
www-data 761 1 0 00:08 ? 00:00:00 [lighttpd] <defunct>
root 775 1 0 00:08 ? 00:00:00 [crond] <defunct>
root 789 1 0 00:08 ? 00:00:00 [start-stop-daem] <defunct>
root 794 1 0 00:08 ? 00:00:00 [start-stop-daem] <defunct>
root 802 1 0 00:08 ? 00:00:00 [grep] <defunct>
root 822 1 0 00:08 ? 00:00:00 [smartctl] <defunct>
root 905 1 0 00:08 ? 00:00:00 [cat] <defunct>
root 908 1 0 00:08 ? 00:00:00 [cat] <defunct>
root 1539 858 0 00:15 pts/0 00:00:00 grep defunct

I have tried killing the parent process, but they don't go away. They also come back after boot.

What is even more strange, is that I put the files (e.g. /etc/crontabs/root , /etc/inittab, /etc/ntp.conf ) that I modded back to the way they originally were. But still the same processes are defunct after rebooting.

What is also interesting is if I move the offending start file out of /etc/init.d/ (e.g. ntp.sh), then reboot, the move it back to /etc/inti.d and then start it, it does not spawn a zombie process.

It seems that the mods to /etc/crontabs/root , /etc/inittab, /etc/ntp.conf (although now reverted back to thier original state) have done something to some processes that get started at boot time.

Any ideas …. ?

unfold Re: MyBook Spindown ? by bobbywisebobbywise, 1192746127|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kyyhkynenkyyhkynen 1192771803|%e %b %Y, %H:%M %Z|agohover

@Zium:

for MBWEI, the replacement temperature monitoring script isn't very useful… you can use it only to log your drive temperature.
Spinning up once an hour is a bit too often… you might want to figure out what's causing the spin up.
On the other hand, these drives' specs say that they should last (at least) 50000 spinups, which is, at the rate of one spin up per hour, ~5.7 years in time…:)

@bobbywise:

I have no clue whatsoever of what could be causing your zombie processes…
Which MBWE do you have? I or II?
What is your firmware version?
Have you made any other changes in your system?

unfold Re: MyBook Spindown ? by kyyhkynenkyyhkynen, 1192771803|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
ArTiArTi 1192773499|%e %b %Y, %H:%M %Z|agohover

can u post the details to make the ramdisk ?

all the log arent working without it for me cos your script log all on it

also can u give more details to build the .html graph with the log files

thanks

unfold Re: MyBook Spindown ? by ArTiArTi, 1192773499|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
bobbywisebobbywise 1193479707|%e %b %Y, %H:%M %Z|agohover

Hi Kyyhynen,

The zombie processes were due to having mediatomb starting at boot time via a file in /etc/init.d/ , so finally it was nothing to do with the mods you suggested for spindown !

I should have spotted that fact earlier !!! Now to determine how to get mediatomb started automatically without these zombie processes ….

Cheers

unfold Re: MyBook Spindown ? by bobbywisebobbywise, 1193479707|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
LumLum 1195933372|%e %b %Y, %H:%M %Z|agohover

How are you starting mediatomb? are you starting it from inittab using ::sysinit: If you are try using ::once: instead.

I ran into this exact problem earlier today (only using vsftpd), and read the manual for busybox init, apparently if you start something with sysinit, then init will wait until that program exits before continuing, wheras using once spawns the process and carries on.

Since it's ultimately the job of init to clean up those zombie processes, they will never get sorted if you don't do this.

unfold Re: MyBook Spindown ? by LumLum, 1195933372|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
nikosnikos 1193218482|%e %b %Y, %H:%M %Z|agohover

On my single drive 500gb MBWE i also had to set :

local master = no

in smb.conf cause it kept writing some netbios stuff on a log

The only thing that kept spinning the disk up now (overnight) is ntpd writing to "ntp.drift.temp".

Anyideas?

unfold Re: MyBook Spindown ? by nikosnikos, 1193218482|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
FreshmanFreshman 1194902740|%e %b %Y, %H:%M %Z|agohover

Also, if somebody with a single disk MBWE could test if the scripts actually work with it, it would be appreciated :)

I have MBWE with single disk 500 Gb and now trying your how-to - I'm ready to be your personal BETA tester :)

unfold Re: MyBook Spindown ? by FreshmanFreshman, 1194902740|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
iondyiondy 1192921571|%e %b %Y, %H:%M %Z|agohover

kyyhkynen, many thanks for the guide, very helpful. I have managed to get the script installed, disabled logs, etc to minimize writes, however I still have something running which starts the disc up almost as soon as it spins down. According to dmesg:

<7>default.script(5328): dirtied inode 16047 (resolv.conf) on md1
<7>sed(5330): dirtied inode 13 (tmp5328) on md1
<7>mv(5331): dirtied inode 14 (?) on md1

Any clues anyone? Any help is appreciated. :D

last edited on 1192924134|%e %b %Y, %H:%M %Z|agohover by iondy + show more
unfold Re: MyBook Spindown ? by iondyiondy, 1192921571|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
iondyiondy 1192961280|%e %b %Y, %H:%M %Z|agohover

I found the offending script and have stopped the lovely thing from writing to the drive. Now the only thing which writes to the drive, every half hour or so, is:

<7>smbd(14867): dirtied inode 77296 (smbd) on md3
<7>smbd(14867): dirtied inode 77297 (log.smbd) on md3
<7>smbd(14867): dirtied inode 77297 (log.smbd) on md3
<7>smbd(14867): dirtied inode 77297 (log.smbd) on md3
<7>smbd(14867): dirtied inode 30925 (smbpasswd) on md3
<7>smbd(14867): dirtied inode 30935 (registry.tdb) on md3
<7>smbd(14867): dirtied inode 30931 (connections.tdb) on md3
<7>smbd(14867): dirtied inode 30939 (ntprinters.tdb) on md3
<7>smbd(14867): dirtied inode 30927 (account_policy.tdb) on md3

I am guessing (hoping) all this can be solved by using a ram disk? kyyhkynen, I look forward to your guide on this. :)

unfold Re: MyBook Spindown ? by iondyiondy, 1192961280|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
ZiumZium 1192963645|%e %b %Y, %H:%M %Z|agohover

So what was this script ?
I've stopped trying to spindown the drive, but i may try again later :)

unfold Re: MyBook Spindown ? by ZiumZium, 1192963645|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
FreshmanFreshman 1192995620|%e %b %Y, %H:%M %Z|agohover

Hello to all,
have been almost successfully playing with kyyhkynen's script. But looks like some shit happened
during edition of /etc/fstab. So, I can't get in to MyBook not via SSH nor by web-interface.

please HELP!

unfold Re: MyBook Spindown ? by FreshmanFreshman, 1192995620|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
ZiumZium 1192996068|%e %b %Y, %H:%M %Z|agohover

Moved

last edited on 1193116428|%e %b %Y, %H:%M %Z|agohover by Zium + show more
unfold Re: MyBook Spindown ? by ZiumZium, 1192996068|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
FreshmanFreshman 1193064520|%e %b %Y, %H:%M %Z|agohover

Hi Zium,
no I can't ping mybook.
It seems that it booted, but I can't say - completely or not.
What is a problem - some of devices are not mounted properly? How did you
manage to solve this problem?

unfold Re: MyBook Spindown ? by FreshmanFreshman, 1193064520|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
ZiumZium 1193077184|%e %b %Y, %H:%M %Z|agohover

Moved

last edited on 1193116401|%e %b %Y, %H:%M %Z|agohover by Zium + show more
unfold Re: MyBook Spindown ? by ZiumZium, 1193077184|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
FreshmanFreshman 1193081291|%e %b %Y, %H:%M %Z|agohover

The reason for "bricking down" of mybook was not in unplugging the usb drive. I think that something happend when I've edited /etc/fstabt file (have used 'vi' maybe second time in my life)

After rebooting the drive I can't get in to the drive anymore.
Drive is powering down correctly by power button, which LEDs dimming.

unfold Re: MyBook Spindown ? by FreshmanFreshman, 1193081291|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
ZiumZium 1193081663|%e %b %Y, %H:%M %Z|agohover

Moved

last edited on 1193116368|%e %b %Y, %H:%M %Z|agohover by Zium + show more
unfold Re: MyBook Spindown ? by ZiumZium, 1193081663|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
FreshmanFreshman 1193083569|%e %b %Y, %H:%M %Z|agohover

Seems that my mybook is not lucky one (I have been trying to install nano from this how-to:http://www.welped.com/2007/09/03/an-easier-editor-option-for-mybook/
but got compilation problems with proto.h and browser.c)

I have Windows comp and old linux laptop (thinkpad 600e - does not look promising).
Just thinking about using Ubuntu Live CD on the desktop - hope it does support SATA drives

unfold Re: MyBook Spindown ? by FreshmanFreshman, 1193083569|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
ZiumZium 1193084172|%e %b %Y, %H:%M %Z|agohover

Moved

last edited on 1193116323|%e %b %Y, %H:%M %Z|agohover by Zium + show more
unfold Re: MyBook Spindown ? by ZiumZium, 1193084172|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
FreshmanFreshman 1193114198|%e %b %Y, %H:%M %Z|agohover

Yep, there is a new thread Recovering fstab

unfold Re: MyBook Spindown ? by FreshmanFreshman, 1193114198|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
iondyiondy 1193048139|%e %b %Y, %H:%M %Z|agohover

Zium, usr/share/udhcpc/default.script is the script which was causing many writes and it seems to write ntp server settings to /etc/ntp.conf and the nameserver to /etc/resolv.conf. I managed to find it by repeatedly doing 'ps aux |grep default.script' until I could catch it running and then it showed me where the script was…I am sure there was a better method of finding it, but hey, it worked for me. :)

Is udhcpc something which is there on all MyBook WE's? Or something which I have put on with all my faffing about which I don't remember? :)

The lines I edited/commented from the script are below:

Changed:
RESOLV_CONF="/etc/resolv.conf"

To:
RESOLV_CONF=/dev/null

Commented out the following lines:

  1. if [ -n "$ntpsrv" ] ; then
  2. sed "s/server.*\$/server $ntpsrv iburst/" < /etc/ntp.conf > tmp$$
  3. mv -f tmp$$ /etc/ntp.conf
  4. fi
unfold Re: MyBook Spindown ? by iondyiondy, 1193048139|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
ZiumZium 1193076994|%e %b %Y, %H:%M %Z|agohover

I've the same script on my mybook, I don't know if it is really running or not and from when.
Thanks for details

unfold Re: MyBook Spindown ? by ZiumZium, 1193076994|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kyyhkynenkyyhkynen 1193049030|%e %b %Y, %H:%M %Z|agohover

Hi all,

I will try to find some time to write the ramdisk guide sometime this week.

As for the default.script issue, it is a dhcp client script. I'm running my MBWE with a static ip, so I don't have it running… will add a note about it into the guide too.

unfold Re: MyBook Spindown ? by kyyhkynenkyyhkynen, 1193049030|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
iondyiondy 1193049661|%e %b %Y, %H:%M %Z|agohover

Thanks kyyhkynen, I look forward to it. Now to set mybook to static ip. :)

unfold Re: MyBook Spindown ? by iondyiondy, 1193049661|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
TalinTheLostTalinTheLost 1205879605|%e %b %Y, %H:%M %Z|agohover

G'day,

I'm reasonably new to linux - so spent a couple days trying to work out why my MBWE was spinning up every 6 hours… after following all the tutorials, etc, worked out it was the default.script… then came across this post about using a static IP (in a thread I had read numerous times before - whoops).

So my question: does anyone know how to change how often busybox will run the default.script? I've had a bit of a look around, can find heaps of information on busybox & dhcp, but nothing related to a time period (6 hours).

I've set my MBWE to a static IP at the moment, and it's fixed the issue - though i prefer to use my router to assign static IP's, rather than the devices on the network.

Cheers!

unfold Re: MyBook Spindown ? by TalinTheLostTalinTheLost, 1205879605|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
nikosnikos 1193218561|%e %b %Y, %H:%M %Z|agohover

On my single drive 500gb MBWE i also had to set :

local master = no

in smb.conf cause it kept writing some netbios stuff on a log

The only thing that kept spinning the disk up now (overnight) is ntpd writing to "ntp.drift.temp".

Any ideas?

unfold Re: MyBook Spindown ? by nikosnikos, 1193218561|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
JKruegerJKrueger 1194025726|%e %b %Y, %H:%M %Z|agohover

Hi folks,

am I the only one to get an

HDIO_DRIVE_CMD(standby) failed: Invalid argument

error when the script is trying to supsend the drive?

Any ideas ho to fix that?

And one more thing in noticed, I can not run ./configure when I downloaded hdparm since there simply is no such script.

- Jens

P.S.: And beeing a noop on linux I would really apreciate a ramdisk howto :-)

last edited on 1194025777|%e %b %Y, %H:%M %Z|agohover by JKrueger + show more
unfold Re: MyBook Spindown ? by JKruegerJKrueger, 1194025726|%e %b %Y, %H:%M %Z|agohover
MyBook Spindown - Broke MyBookWorld !
lukasclukasc 1194215790|%e %b %Y, %H:%M %Z|agohover

Hi,

I just went through the procedures, and on my last reboot, found that the system does not start up again. Ping, Web, ssh no longer work.

The procedure I followed is:
- SSH access http://martin.hinner.info/mybook/sshaccess.php
- Spin down http://kyyhkynen.net/stuff/mybook/#smartspindown
- WAITTIME=30
- followed up to steps 5. Received messages about disk being used, hence followed the disk usage reduction procedure.
- Alternative Temperature Monitoring script, done.
- Reducing Disk Usage, http://kyyhkynen.net/stuff/mybook/#reducediskusage
for this, I performed steps 1-6 (but did not reboot), then did 7, then rebooted.

After rebooting, the system does not start.
When I re-power the system, the hard-drives spin up, then there is some disk activity for about 10 seconds, then silence, and no activity. The light doesn't turn on (probably because I disabled it in one of the steps).

My switch keeps lists of DHCP requests, and the Worldbook does not appear to have asked for one.

It seems that restoring the system is not straightforward given that there is no human interface.
I also have some data there that I would like to recover.

Any ideas on how to get this running again?

I am thinking of hooking up the disk to an external hard drive enclosure to copy the data.

Any help appreciated.
thank you
Lukas

unfold MyBook Spindown - Broke MyBookWorld ! by lukasclukasc, 1194215790|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown - Broke MyBookWorld !
lukasclukasc 1194240036|%e %b %Y, %H:%M %Z|agohover

fixed!

Purchased a SATA hard drive enclosure. Booted my MacBook Pro using the System Rescue CD. Mounted Disk A using USB. Did an e2fsck -y /dev/sdb1 …. all the way to sbd4. It looked like sdb1 had some errors. Likely prevented booting.

Have spent many hours getting the spindown to work. Seems to be working for the most part… I can't believe how hot the drives were getting before!

unfold Re: MyBook Spindown - Broke MyBookWorld ! by lukasclukasc, 1194240036|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kyyhkynenkyyhkynen 1194337809|%e %b %Y, %H:%M %Z|agohover

Ok, I finally added the ram disk part to the guide.
Making a MBWE cool and quiet

unfold Re: MyBook Spindown ? by kyyhkynenkyyhkynen, 1194337809|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kinjikinji 1194344099|%e %b %Y, %H:%M %Z|agohover

Thanks a lot will try this as soon as possible. Hope my MBWE is gonna be cool & quiet :) (Actually it spin up every 1h or so, I suppose it's not a really good thing, especially since I don't use it more than 10h a week).

unfold Re: MyBook Spindown ? by kinjikinji, 1194344099|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
iondyiondy 1194377786|%e %b %Y, %H:%M %Z|agohover

Thanks kyyhkynen!!! :)

All seems to be running fine so far, just testing it to see when/if/why it decides to spin-up now. Will let you know. :)

One little thing I noticed is on the bottom line below (taken from your tutorial) it should be ntp.sh but a 'd' has slipped in the middle of it. Is fine everywhere else.

Then copy the driftfile to the RAM disk and restart ntpd:

# cp /etc/ntp.drift /mnt/ramdisk
# /etc/init.d/ntpd.sh restart

Many thanks for the tutorial, a great help!!

unfold Re: MyBook Spindown ? by iondyiondy, 1194377786|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kyyhkynenkyyhkynen 1194421705|%e %b %Y, %H:%M %Z|agohover

One little thing I noticed is on the bottom line below (taken from your tutorial) it should be ntp.sh but a 'd' has slipped in the middle of it. Is fine everywhere else.

Whoops, thanks for noting that :)
Fixed.

unfold Re: MyBook Spindown ? by kyyhkynenkyyhkynen, 1194421705|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
ArTiArTi 1194453378|%e %b %Y, %H:%M %Z|agohover

thanks for your howto lyyhkynen.

but another question for a linux beginner:
how do you enable the log temperature to make a html page like your to check the graph ?

can u make a tuto about that ?

i have try to enable myself but i'm not sure that have work:
i have edit the temperature script ( /usr/sbin/temperature_monitor )
and modify to:

  1. Logging stuff

LOG_ENABLED=true
LOG_INTERVAL=5
#LOGGER=echo
LOGGER=logger

it's right ? if yes now how i build the html ?

last edited on 1194453870|%e %b %Y, %H:%M %Z|agohover by ArTi + show more
unfold Re: MyBook Spindown ? by ArTiArTi, 1194453378|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
sforgetsforget 1200839855|%e %b %Y, %H:%M %Z|agohover

kyyhkynen: You mention that upgrading syslogd would be neccessary for logging to the ram drive.

This is not true. Just modify the line in "inittab" to read:

::respawn:/sbin/syslogd -n -m 0 -O /mnt/ramdisk/system.log

And the log will now be written to the ramdrive rather than the harddisk.

unfold Re: MyBook Spindown ? by sforgetsforget, 1200839855|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kyyhkynenkyyhkynen 1200912677|%e %b %Y, %H:%M %Z|agohover

This is not true. Just modify the line in "inittab" to read:

::respawn:/sbin/syslogd -n -m 0 -O /mnt/ramdisk/system.log

And the log will now be written to the ramdrive rather than the harddisk.

Well I'll be damned.

I just assumed that if the busybox syslogd doesn't know how to read syslog.conf, it couldn't be done. Didn't realize that it has it's own custom switch for that…

Thanks for noting, will update the guide.

unfold Re: MyBook Spindown ? by kyyhkynenkyyhkynen, 1200912677|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
FreshmanFreshman 1194902597|%e %b %Y, %H:%M %Z|agohover

2 kyyhkynen:
testing your howto (spindown , temperature and RAMdisk scripts are started automatically) - about 15 min MyBookWE seems to be suspended.

A 'freshman' question - can I see somehow how many times HDD has been spinned up and down? I want to let MyBook work for the long time

unfold Re: MyBook Spindown ? by FreshmanFreshman, 1194902597|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
thejdjthejdj 1196455924|%e %b %Y, %H:%M %Z|agohover

I'm following the steps to install on my MBWE I 500 and get stuck here. I'm probably missing something simple. Can anyone help?

[root@MyBookWorld hdparm-7.7]# [root@MyBookWorld tmp]# cd src
[root@MyBookWorld src]# wget http://download.sourceforge.net/sourceforge/hdparm/hdparm-7.7.tar.gz
Connecting to download.sourceforge.net[150.65.7.130]:80
hdparm-7.7.tar.gz 100% |*********| 62530 ::— ETA
[root@MyBookWorld src]# tar -zxvf hdparm-7.7.tar.gz
hdparm-7.7/
hdparm-7.7/LICENSE.TXT
hdparm-7.7/Changelog
hdparm-7.7/kernel_patches/
hdparm-7.7/kernel_patches/01_libata_cmd_len_check.patch
hdparm-7.7/kernel_patches/02_libata_atapi_ata16.patch
hdparm-7.7/kernel_patches/README
hdparm-7.7/kernel_patches/03_libata_standby_spinup.patch
hdparm-7.7/hdparm.c
hdparm-7.7/hdparm.8
hdparm-7.7/README.acoustic
hdparm-7.7/hdparm.lsm
hdparm-7.7/identify.c
hdparm-7.7/TODO
hdparm-7.7/contrib/
hdparm-7.7/contrib/fix_standby.c
hdparm-7.7/contrib/ultrabayd
hdparm-7.7/contrib/README
hdparm-7.7/contrib/idectl
hdparm-7.7/contrib/fix_standby
hdparm-7.7/sgio.c
hdparm-7.7/debian/
hdparm-7.7/debian/hdparm.init
hdparm-7.7/debian/hdparm.conf
hdparm-7.7/Makefile
hdparm-7.7/hdparm-sysconfig
hdparm-7.7/hdparm.h
[root@MyBookWorld src]# cd hdparm-7.7
[root@MyBookWorld hdparm-7.7]# ./configure
bash: ./configure: No such file or directory
[root@MyBookWorld hdparm-7.7]#

unfold Re: MyBook Spindown ? by thejdjthejdj, 1196455924|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
smlamontsmlamont 1198428320|%e %b %Y, %H:%M %Z|agohover

I'm getting the same error: "bash: ./configure: No such file or directory"
is this a path issue?

unfold Re: MyBook Spindown ? by smlamontsmlamont, 1198428320|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
thejdjthejdj 1198523674|%e %b %Y, %H:%M %Z|agohover

I haven't figured it out yet.

What else have you added or changed on yours?

unfold Re: MyBook Spindown ? by thejdjthejdj, 1198523674|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
sjfsjf 1198792016|%e %b %Y, %H:%M %Z|agohover

For those confused about the "./configure" error on the hdparm build — just skip that step and do the "make install" step

last edited on 1198794534|%e %b %Y, %H:%M %Z|agohover by sjf + show more
unfold Re: MyBook Spindown ? by sjfsjf, 1198792016|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
sjfsjf 1198792148|%e %b %Y, %H:%M %Z|agohover

I am curious about how to get logging to work after implementing all the mods. It seems the shutdown script is attempting to copy /mnt/ramdisk/smart_spindown.log to /var/log, but the file doesn't exist. How does one get the log messages to go to that file when starting from the startup script?

Thanks,
sjf

unfold Re: MyBook Spindown ? by sjfsjf, 1198792148|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
poopoo 1202515438|%e %b %Y, %H:%M %Z|agohover

Hi kyyhkynen

Been following most of the steps on your 'How To' on my 500GB MyBook World.

I stopped at the bit about

Note: if you plan to use the MBWE Web GUI to manipulate your users and shares after you change your samba file paths, you'll have to change the file locations in /usr/www/lib/nasCommon.pm file also. Otherwise, the Web GUI will be editing wrong files thus causing weird problems.

I don't know what to edit in nasCommon.pm. I want to keep using the Web GUI and have Samba use the RAM Disk like you suggest.

This line is already present and looks like it takes care of most of it:
"use constant smb_conf => '/var/oxsemi/smb.conf';"

The only other line I can see (I'm no Linux expert) that probably needs changing is:
"use constant smbpasswd => '/var/private/smbpasswd';" change to "use constant smbpasswd => '/mnt/ramdisk/private/smbpasswd';".

Can you tell me if that's right?

So far my drive still spins up a lot of the time. I think it's due to Samba.

Thanks

last edited on 1202649639|%e %b %Y, %H:%M %Z|agohover by poo + show more
unfold Re: MyBook Spindown ? by poopoo, 1202515438|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kyyhkynenkyyhkynen 1202669035|%e %b %Y, %H:%M %Z|agohover

The only other line I can see (I'm no Linux expert) that probably needs changing is:
"use constant smbpasswd => '/var/private/smbpasswd';" change to "use constant smbpasswd => '/mnt/ramdisk/private/smbpasswd';".

Basically, changing only this line should be enough, if you have moved the smbpasswd file to the ram disk. I didn't find any other references to the files moved to the ram disk (but of course I could have missed some).

unfold Re: MyBook Spindown ? by kyyhkynenkyyhkynen, 1202669035|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
poopoo 1202681202|%e %b %Y, %H:%M %Z|agohover

OK, done it all and so far so good.

unfold Re: MyBook Spindown ? by poopoo, 1202681202|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
mercedmerced 1205007158|%e %b %Y, %H:%M %Z|agohover

I have the MyBook WE with one 500gb disk. I have followed the guides at http://kyyhkynen.net/stuff/mybook/ to make the disk silent. The script works fine and everything seems to be working. However, the disk keeps spinning up a bit to often. The only processes that seems to be writing to the disk, according to dmesg, is pdflush, kjournal, md3_raid1 and sync.
What do these things do? Are they important processes that cannot be shut down? If not, how do I stop them from starting when booting up the disk?

Thanx!

unfold Re: MyBook Spindown ? by mercedmerced, 1205007158|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
CalathiaCalathia 1205133177|%e %b %Y, %H:%M %Z|agohover

I'm also interested of this, since same processes seem to spinup my wd also..I get ~10 spinups/day, most of them unnecessary.

unfold Re: MyBook Spindown ? by CalathiaCalathia, 1205133177|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
mercedmerced 1205183119|%e %b %Y, %H:%M %Z|agohover

I am not even close to being a linux expert, so my earlier question could be a bit off. I looked at the write log some more and it seems like the processes I mentioned always writes to the disk, regardless of what process initiated the write. Should I be looking at the processes generating lines like; "<7>tail(10976): dirtied inode 45 (temperature.log) on ram1" instead of these lines; "<7>pdflush(36): WRITE block 984 on ram1"?

If so, the processes that spins up the disk in my last monitoring of the disk is: nmdb, sshd and smbd.

sshd should not be a problem if I´m not connected with ssh.
nmdb and smbd seems to be samba-related processes. Are both needed? I still want to be able to access the disk by mounting it as a network drive on my windows-machines. I did not access the disk in any other way than by ssh when these processes spun up the disk.

Thanx.

unfold Re: MyBook Spindown ? by mercedmerced, 1205183119|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kyyhkynenkyyhkynen 1205223832|%e %b %Y, %H:%M %Z|agohover

I am not even close to being a linux expert, so my earlier question could be a bit off. I looked at the write log some more and it seems like the processes I mentioned always writes to the disk, regardless of what process initiated the write. Should I be looking at the processes generating lines like; "<7>tail(10976): dirtied inode 45 (temperature.log) on ram1" instead of these lines; "<7>pdflush(36): WRITE block 984 on ram1"?

Yes. The first line is the actual process issuing the write and the second is the cache management actually writing the stuff (issued on the first line) to disk.

Also note where the writing is done; in these lines data is written to the RAM disk (the ram1 in the end of the lines tells this) so they haven't spun the disk up. The lines you should check end with md1, md2, md3 or md4.

If you are going to mount your MBWE as a network drive, you'll need samba, which needs both of the processes smbd and nmdb running. I assume you have moved your samba logs and other files to your RAM disk.
Windows just sometimes connects to the network drives even if you're not actually accessing them in windows (like when windows starts up or when you open My Computer), thus causing the aforementioned processes to spin the disk up. In order to reduce these spin-ups, you can leave the "Reconnect at logon" checkbox unchecked when mapping the network drive in windows. By doing this, you'll have to manually connect to the drive by opening it in explorer before it can be used by other programs.

last edited on 1205226034|%e %b %Y, %H:%M %Z|agohover by kyyhkynen + show more
unfold Re: MyBook Spindown ? by kyyhkynenkyyhkynen, 1205223832|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
TriscuiTTriscuiT 1206302570|%e %b %Y, %H:%M %Z|agohover

I have the 2TB version set to RAID-1 with the latest firmware. Since the c compiler is no longer there, I used OPTWARE to install "hdparm" which gave me version 8.5-1.

Since this version is newer than the one you referrence (7.7) I thought that it would not cause any issues.

However, when I execute the script (after setting the kernel parameters as instructed) the logging shows that both disks are spun down.
Polling is set for every 30 seconds, and I copied about 100MBs from the device to make sure that there was activity, but it still shows spun down.

Is this an issue with the optware hdparm? Or have I broken something?

Thanks.

unfold Re: MyBook Spindown ? by TriscuiTTriscuiT, 1206302570|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
CalathiaCalathia 1206977200|%e %b %Y, %H:%M %Z|agohover

OK, I got tired for ~10 spinups/day, where ~8 are totally unnecessary. So I made some modifications to script, basically that when WD goes spindown it activates block dump:
echo 0 > /proc/sys/vm/block_dump
and when WD spins up, it disables dump and writes it to log file. this way I can distinguish which processes causes spinups. I also include spinup count and datetime in the log, so I can see when it has happened.

Well, the result is really weird log, where spinup count can increase from 1 to 8 !! How the hell can this even be possible? Besides, I have se wait time 3600 sec and maxtime 10000 sec, and my max spindown time seems to be around 6 hours, so 10 spinups per day should be impossible!!

Please help me find where is the problem, I have 550 spinups and my WD is 2 months old :/

Here is My log where you can see this weird activity.

Here is my Smart Spindown script.

unfold Re: MyBook Spindown ? by CalathiaCalathia, 1206977200|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
the-bunkerthe-bunker 1207764990|%e %b %Y, %H:%M %Z|agohover

First of all thanks Calathia for your script - I'm using it & getting ~1 spinup per day & that's only coz I'm looking at the smart_spindown.log

Anyway, to answer your question - as I understand it the waittime is the minimum time before spindown - which in your case is 1 hour & would explain why it can spinup more often than you expect. Easiest way to test this is to make waittime something like 5 mins & leave max time as is - then see how long before it spins down.

fyi: I also added the lighttpd log files to ramdisk & that has also helped cut down the no of spinups.

last edited on 1207765091|%e %b %Y, %H:%M %Z|agohover by the-bunker + show more
unfold Re: MyBook Spindown ? by the-bunkerthe-bunker, 1207764990|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
the-bunkerthe-bunker 1207782130|%e %b %Y, %H:%M %Z|agohover

I had a look at your log Calathia & to me it looks like lot of SAMBA & SSH activity, plus quite a bit of restarting the smart_spindown script. Try leaving things for a couple days & then look at the log to see what occurs without interaction.

One thing I have changed to your script is to switch off the OUTPUTLEVEL - both to false.

I set my WAITTIME to 600 (10 mins) & MAXTIME to 1200 (20 mins) in smart_spindown script

Have you set local master = No in SMB.conf ?

I also disabled crontab & followed all the advice in the smart spindown tutorial for reducing disk access.
Finally - as recommended here, I don't have a mapped drive - just use a shortcut on my desktop to the PUBLIC share.

Hope you get things sorted - myspinups were averaging 16 a day & these mods have made a big difference.

unfold Re: MyBook Spindown ? by the-bunkerthe-bunker, 1207782130|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
alephsmithalephsmith 1207782481|%e %b %Y, %H:%M %Z|agohover

Does any one want to comment on the usefulness of a spindown script when using the MBWE as a seed box.
I am almost constantly seeding torrents with transmission and have assumed that any attempt at spinning down would be effectively useless. Is this assumption right?

unfold Re: MyBook Spindown ? by alephsmithalephsmith, 1207782481|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
CalathiaCalathia 1207805723|%e %b %Y, %H:%M %Z|agohover

Thanks for helping guys! Indeed, SMB activity is high. This is because I have WD connected directly to LAN of my university, and university DHCP refreshes IP leasing times every ~4-5 hours. I have wlan router, but it is now conffed as switch. This is because it cannot forward IPV6 data, so I can'nt see IPTV from my computer :P

And yes it is true that mapping WD will cause unnecessary spinups sometimes (when you open my computer). But I listen often music with winamp from my WD and mapped drive is best solution for this AFAIK.

The-Bunker, I did not understand all of you advices, can you please clarify some?

- You said there is lot of smart_spindown restart activity, how can you see this from the log? In my case, smart_spindown script has been on for days, so it shouldn't be restarting anything.
- Also you adviced to put minimun time more low i.e 5mins. I have set it to 1 hour because usually when i'm listening music there is some pauses between me ghanging album or playlist or whatever, and this pause may be what ever between 1min to 1hour, so too small minimun wait time will cause spindowns.
-Is there lighttpd activity on my logs? I have not set its log to RAM, but I don't use lighttpd at all.
-what dows OUTPUTLEVEL do and what benefit is for setting it to false?
-what does local master = NO in SMB.conf?
- I have also done everything what kyyhkynen adviced in his tutorial. But havent disabled crontab. But then again, I don't use crons.

thanks in advance!

unfold Re: MyBook Spindown ? by CalathiaCalathia, 1207805723|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
the-bunkerthe-bunker 1208016969|%e %b %Y, %H:%M %Z|agohover

Hi Calathia - to answer your questions :-
- Reason I thought your smart_spindown was restarting is because of the hdparm & grep entries in your log which only appear in mine after smart_spindown has been restarted.
- I suggested setting WAITTIME to 5 mins as a test for you to see that it doesn't always wait for the MAXTIME before it spins down. Reading your description of use - ie: plumbed into a university network - then it makes sense to have a much higher wait time such as you have set.
- There are a few lighttpd entries in your log - not much, have a look at your lighttpd logs to see what is being accessed. Mine was just hackers - but they can't get in, just annoying that it spins up the drive for no useful reason.
- My understanding of OUTPUTLEVEL is to see what the smart_spindown script is doing dynamically, and that requires running it manually in SSH & watching the output on the console. I'm not sure what it does when you close SSH, but you can't see it - so why have it switched on ?
- Local master in SMB.conf is telling other computers in the local network whether or not to come to you to get a list of all the machines/shares connected. Since that involves disk activity, you want it turned off. If it's not defined then it's probably off anyway - but doesn't harm to be explicit. See these links for more info http://us4.samba.org/samba/docs/man/Samba-HOWTO-Collection/NetworkBrowsing.html
and http://www.samba.netfirms.com/PDC.htm
- Re crontab, I read somewhere on this forum that they disabled crontab in an attempt to reduce spinups. If you don't have any scheduled tasks then you can disable. Again, it's might not make any difference but it won't hurt & ensures that it is not causing spin ups.

Since your WD MyBook is hooked up on the lan at university it's not surprising you get a lot of activity - and the steps you've taken seem appropriate. If ~8 spinups per day is bothering you then set the WAITTIME & MAXTIME higher - or don't bother using smart_spindown at all - just leave it running. I'm not expecting spinning down the HD to lengthen the life of my WD MyBook, just to minimise the amount of electricity used. As long as you back it up occasionally & the drive last 5 years or so, then that seems a reasonable lifetime.

Cheers,
Paul

unfold Re: MyBook Spindown ? by the-bunkerthe-bunker, 1208016969|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
refaeyrefaey 1208724820|%e %b %Y, %H:%M %Z|agohover

Hello everyone,

I have the MyBookWorld II, the 2TB edition with two drives and it's setup as RAID0. I tied to use the procedure explained in kyyhkynen's page to spin down the drive but I got stuck at step number 4 where it says the following:

4. Then you should tinker with the settings in the beginning of the "smart_spindown" (see comments in the script for details). At this time just set the name(s) of your disk(s).

Does anyone know what to set the disk names to please? (md3 (/var) and md4 (/shares/internal)?).

Your help is much appreciated,

Best regards,
Ash

unfold Re: MyBook Spindown ? by refaeyrefaey, 1208724820|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
alephsmithalephsmith 1208730104|%e %b %Y, %H:%M %Z|agohover

Did you read the config section of the smartspindown script?

# Disk(s) to monitor.
# If you have only one disk, leave DISK2 empty
DISK1=sda
DISK2=sdb

You have two disks so sda and sdb should be fine
unfold Re: MyBook Spindown ? by alephsmithalephsmith, 1208730104|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
refaeyrefaey 1208815422|%e %b %Y, %H:%M %Z|agohover

I did read the config section but it doesn't hurt double-checking ;-)

Thanks very much for the prompt reply.

unfold Re: MyBook Spindown ? by refaeyrefaey, 1208815422|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
darkomagedarkomage 1211802696|%e %b %Y, %H:%M %Z|agohover

Hello !

As a newbie, I found this site very usefull for lots of things !

I thought I might contribute a bit with the following:
-I improved the original fuel-gauge script, so that it can be used easilly with this awesome smart_spindown script.
basically, the new "fuel-gauge" script looks if the drives are spun up before trying to check things and thus creating potentially unwanted disk activity.
I wanted to do this because imho, fuel-gauge script is useful on the 2 disks edition using RAID-1, as it checks periodically the raid array integrity, and switches the leds to "degraded" if your array is broken. That way, it remembers you to force a reconstruction (I had one of the two disks of my WDMBWII gone wrong a few weeks ago)

If anyone's interested in my so-called "work", I might post it somewhere. But as I'm a newbie here, just tell me how I should proceed, and where I should post that: I don't want to disturb this place and its rules ! ;^)

unfold Re: MyBook Spindown ? by darkomagedarkomage, 1211802696|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kassoekassoe 1214831184|%e %b %Y, %H:%M %Z|agohover

Hello,

I followed all the cool and quiet hacks succesfully. I didn't do the RAM disk as I don't know if I need it. I use a WD Mybook WE 500Gb as file repository for our Windows machines - and nothing else. Spin down does work now and then but I still have quite some activity going on. I'm completely new to Linux. Can someone help me understand what is going on and what can be stopped - and how? I can see Samba is running - but I don't know if I need it. The other stuff I don't really know what is. Activity log posted below - I think it covers around 15 minutes during which the Mybook did not spin down.

kassoe

<7>nmbd(613): dirtied inode 46395 (browse.dat.) on md3
<7>nmbd(613): dirtied inode 46394 (?) on md3
<7>kjournald(183): WRITE block 868568 on md3
<7>md3_raid1(170): WRITE block 1975808 on sda3
<7>kjournald(183): WRITE block 5408 on md3
<7>kjournald(183): WRITE block 5416 on md3
<7>kjournald(183): WRITE block 5424 on md3
<7>kjournald(183): WRITE block 5432 on md3
<7>kjournald(183): WRITE block 5440 on md3
<7>kjournald(183): WRITE block 5448 on md3
<7>kjournald(183): WRITE block 5456 on md3
<7>kjournald(183): WRITE block 5464 on md3
<7>md3_raid1(170): WRITE block 1975808 on sda3
<7>pdflush(36): WRITE block 0 on md3
<7>md3_raid1(170): WRITE block 1975808 on sda3
<7>pdflush(36): WRITE block 8 on md3
<7>pdflush(36): WRITE block 786928 on md3
<7>pdflush(36): WRITE block 786936 on md3
<7>pdflush(36): WRITE block 786944 on md3
<7>pdflush(36): WRITE block 950272 on md3
<7>kjournald(183): WRITE block 5472 on md3
<7>md3_raid1(170): WRITE block 1975808 on sda3
<7>smbd(980): dirtied inode 46375 (smbpasswd) on md3
<7>kjournald(183): WRITE block 5480 on md3
<7>md3_raid1(170): WRITE block 1975808 on sda3
<7>kjournald(183): WRITE block 5488 on md3
<7>kjournald(183): WRITE block 5496 on md3
<7>md3_raid1(170): WRITE block 1975808 on sda3
<7>pdflush(37): WRITE block 786944 on md3
<7>md3_raid1(170): WRITE block 1975808 on sda3
<7>md3_raid1(170): WRITE block 1975808 on sda3
<7>smbd(2479): dirtied inode 61840 (smbd) on md3
<7>smbd(2479): dirtied inode 61841 (log.smbd) on md3
<7>smbd(2479): dirtied inode 61841 (log.smbd) on md3
<7>smbd(2479): dirtied inode 61841 (log.smbd) on md3
<7>smbd(2479): dirtied inode 46375 (smbpasswd) on md3
<7>smbd(2479): dirtied inode 46385 (registry.tdb) on md3
<7>smbd(2479): dirtied inode 46381 (connections.tdb) on md3
<7>smbd(2479): dirtied inode 46389 (ntprinters.tdb) on md3
<7>smbd(2479): dirtied inode 46377 (account_policy.tdb) on md3
<7>kjournald(183): WRITE block 1196032 on md3
<7>md3_raid1(170): WRITE block 1975808 on sda3
<7>kjournald(183): WRITE block 5504 on md3
<7>kjournald(183): WRITE block 5512 on md3
<7>kjournald(183): WRITE block 5520 on md3
<7>kjournald(183): WRITE block 5528 on md3
<7>md3_raid1(170): WRITE block 1975808 on sda3
<7>pdflush(36): WRITE block 786944 on md3
<7>md3_raid1(170): WRITE block 1975808 on sda3
<7>pdflush(36): WRITE block 1048592 on md3
<7>pdflush(36): WRITE block 901696 on md3
<7>pdflush(36): WRITE block 901704 on md3
<7>pdflush(36): WRITE block 901712 on md3
<7>pdflush(36): WRITE block 852032 on md3
<7>pdflush(36): WRITE block 852352 on md3
<7>pdflush(36): WRITE block 901760 on md3
<7>pdflush(36): WRITE block 884808 on md3
<7>kjournald(183): WRITE block 5536 on md3
<7>md3_raid1(170): WRITE block 1975808 on sda3
<7>nmbd(613): dirtied inode 46394 (browse.dat.) on md3
<7>nmbd(613): dirtied inode 46395 (?) on md3
<7>kjournald(183): WRITE block 868560 on md3
<7>md3_raid1(170): WRITE block 1975808 on sda3
<7>kjournald(183): WRITE block 5544 on md3
<7>kjournald(183): WRITE block 5552 on md3
<7>kjournald(183): WRITE block 5560 on md3
<7>kjournald(183): WRITE block 5568 on md3
<7>kjournald(183): WRITE block 5576 on md3
<7>kjournald(183): WRITE block 5584 on md3
<7>kjournald(183): WRITE block 5592 on md3
<7>kjournald(183): WRITE block 5600 on md3
<7>md3_raid1(170): WRITE block 1975808 on sda3
<7>pdflush(37): WRITE block 0 on md3
<7>md3_raid1(170): WRITE block 1975808 on sda3
<7>pdflush(37): WRITE block 8 on md3
<7>pdflush(37): WRITE block 786928 on md3
<7>pdflush(37): WRITE block 786936 on md3
<7>pdflush(37): WRITE block 786944 on md3
<7>pdflush(37): WRITE block 950272 on md3
<7>kjournald(183): WRITE block 5608 on md3
<7>md3_raid1(170): WRITE block 1975808 on sda3

unfold Re: MyBook Spindown ? by kassoekassoe, 1214831184|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
didithewarriordidithewarrior 1215730380|%e %b %Y, %H:%M %Z|agohover

Same problem …

unfold Re: MyBook Spindown ? by didithewarriordidithewarrior, 1215730380|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
chorltonchorlton 1215763752|%e %b %Y, %H:%M %Z|agohover

If you don't implement a ramdisk then you won't get the benefits of the spindown. It's quite necessary.

Every time any process on your box creates a log message, it's forcing the disk to spin up. A ramdisk creates a small virtual disk in memory where these log files can be written to instead of spinnig up the physical harddisk.

The creation of the ramdisk is quite easy to do. The only hurdle I had at first was a problem with smbd quickly filling up the space which eventually stopped smbd from working. I could still use ssh to fix the problem though. just needed some tuning of logging levels.

unfold Re: MyBook Spindown ? by chorltonchorlton, 1215763752|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kassoekassoe 1215845055|%e %b %Y, %H:%M %Z|agohover

@chorlton: Thanks for your help. Wonder if you could be a bit more specific about "tuning of logging levels" - is that one of the tips described somewhere? I'm absolutely new to Linux but have done ok so far because of the great tutorials on this site - and I don't want to mess up having gotten this far :-)

last edited on 1215845149|%e %b %Y, %H:%M %Z|agohover by kassoe + show more
unfold Re: MyBook Spindown ? by kassoekassoe, 1215845055|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
chorltonchorlton 1216049375|%e %b %Y, %H:%M %Z|agohover

Hi kassoe.

I'll describe the problem but please be aware that this was not a problem with spindown, or with creating the ramdisk. I just filled up the ramdisk too quickly.

For example:

I had smbd configured at first to run using inetd. This means that smbd is not running by default and only starts up when a request comes in on the windows networking port. Every time smbd started, it wrote a little welcome note to the log which cannot be turned off. Then a utility on windows was polling my networked samba drive EVERY MINUTE. It's only 180bytes or so each time but this very quickly filled up my samba logs. My solution was to ensure smbd was started once at boot time (my samba.sh script in /etc/init.d starts both nmbd and smbd ONCE!). I also set my samba config to
a. log to the ramdisk
b. limit the amount of logging to a minimum
b. limit the log file size to 25kB.

My smb.conf [global] section contains the following lines

log file = /mnt/ramdisk/log/log.%m
log level = 0
max log size = 25

Once you've created your ramdisk and followed the steps in the tutorial to send common logs to it, then you can check your disk activity log and see if anything's still causing problems.

last edited on 1216049553|%e %b %Y, %H:%M %Z|agohover by chorlton + show more
unfold Re: MyBook Spindown ? by chorltonchorlton, 1216049375|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
kassoekassoe 1216059741|%e %b %Y, %H:%M %Z|agohover

Hi chorlton,

Thanks for detailing your description. I wonder if you would care also to show the lines to include in the samba.sh file - I'm not confident with this Linux stuff yet. Your additional fix seem highly relevant when using the hacked box as file server for Windows machines, maybe kyyhkynen who wrote the original guide would repeat your description or link to your post …

unfold Re: MyBook Spindown ? by kassoekassoe, 1216059741|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
chorltonchorlton 1216113269|%e %b %Y, %H:%M %Z|agohover

Sure. Note that you may already have some of this. It difficult to remember what the original state of the box was at new…

Here's the commented out netbios-ssn line from /etc/inetd.conf (i.e. turning samba of in inetd)

# netbios-ssn stream tcp nowait root /usr/local/samba/sbin/smbd smbd -s/var/oxsemi/smb.conf -l/mnt/ramdisk/log -d0

Without the # character at the start of the line the inetd process would attempt to start smbd every time a packet arrive on the windows netbios port (139).

And here's samba.sh. My change is commented in the GWL (just my initials) section. You can also see how all the -l options for smbd and nmbd direct to /mnt/ramdisk.

#!/bin/sh
#
# Start Samba
#

start() {
echo "Starting Samba"
/usr/local/samba/sbin/nmbd -D -s/var/oxsemi/smb.conf -l/mnt/ramdisk/log
# /usr/local/samba/sbin/nmbd -D -s/var/oxsemi/smb.conf -l/var/log
# GWL 20080509 Start - Just start samba on startup. Using inetd means it
# is starting up every few seconds and filling the log.
/usr/local/samba/sbin/smbd -D -s/var/oxsemi/smb.conf -l/mnt/ramdisk/log
# GWL 20080509 End
}

stop() {
echo "Stopping Samba"
killall nmbd > /dev/null 2>&1
killall smbd > /dev/null 2>&1
}
restart() {
stop
start
}

case "$1" in
start)
start
;;
stop)
stop
;;
restart)
restart
;;
cleanup)
;;
*)
echo $"Usage: $0 {start|stop|restart}"
exit 1
esac

exit $?

(apologies for the dodgy indenting, it's the wiki software)

Hope it helps.

last edited on 1216113803|%e %b %Y, %H:%M %Z|agohover by chorlton + show more
unfold Re: MyBook Spindown ? by chorltonchorlton, 1216113269|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
dlashornedlashorne 1217645165|%e %b %Y, %H:%M %Z|agohover

When i am following the instructions to set up the spindown function when i get to the point where the word is 'Make' it says :

[root@dlashorne hdparm-7.7]# make
cc -O2 -W -Wall -Wbad-function-cast -Wcast-align -Wpointer-arith -Wcast-qual -Wshadow -Wstrict-prototypes -Wmissing-prototypes -Wmissing-declarations -fkeep-inline-functions -Wwrite-strings -Waggregate-return -Wnested-externs -Wtrigraphs -c -o hdparm.o hdparm.c
make: cc: Command not found
make: *** [hdparm.o] Error 127

i am not for sure that this is the problem but i have a feeling that it is.

unfold Re: MyBook Spindown ? by dlashornedlashorne, 1217645165|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
sanslogicsanslogic 1218596711|%e %b %Y, %H:%M %Z|agohover

dlashorne,
You have the updated firmware, which does not have the gcc compiler. It's not a big deal, jut us ipkg install hdparm, this will update your hdparm. Then do a find for hdparm, and run them and maker sure all the hdparms on your system are updated. If not find the outdated, rm it, then ln -s source dest. Then continue with the spindown instructions.

unfold Re: MyBook Spindown ? by sanslogicsanslogic, 1218596711|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
dlashornedlashorne 1219193443|%e %b %Y, %H:%M %Z|agohover

What do i do for tis output? sorry for all the dumb questions, i am really new at programing computers i just am really interested because i am a programmer for routers

[root@dlashorne src]# /usr/sbin/smart_spindown
Monitoring spindown opportunities for disks sda and sdb.
/dev/sdb: No such device or address
Both drives are currently spun down.
/dev/sdb: No such device or address
spindowns: 1, time up/down: 0/30, backoff 100, down for -1 (avg 30).

unfold Re: MyBook Spindown ? by dlashornedlashorne, 1219193443|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
guileguile 1220184038|%e %b %Y, %H:%M %Z|agohover

I have a MyBookWorld I 750GB with fully-enabled smart-spindown (ramdisk, disabled lightpd, etc.)
The mybook is connected to my router which has port-forwarding (of only one port) to the mybook enabled (so I can connect via SSH-tunnel from everywhere on the net), but not with typical port 22, but port 2222 (to prevent unintentional ssh-connections).

Despite this, sometimes my mybook spins up, without any of my computers being on, and sometimes it does not shut down correct, but starts blinking and doesn't respons until I turn it off manually.

I enabled syslog again, but it doesn't have any crucial information in it (just that I logged in or something).

Is there any way to log what the mybook is really doing, what is triggering the spinup and what just happens before a crash?

unfold Re: MyBook Spindown ? by guileguile, 1220184038|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
MBWE123MBWE123 1220939877|%e %b %Y, %H:%M %Z|agohover

Hello and thank everyone for information! I have MBWEII 2Tb. Linux is totally new for me.
I downgraded it to RAID1 2x120Gb Seagate succesfully. Disabled some unused network services.
Installed Smart spindown, created a RAM disk and …. Alternative temperature monitor with modification in script because smartctl -d ata -A spinup disks… I use smartctl -d ata -A only when hdd not sleep.
So, now MyBook stay in spindown for very long time… i don't know how long, but more than 24 hours. Tested with lighttpd and syslog enabled.

unfold Re: MyBook Spindown ? by MBWE123MBWE123, 1220939877|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
TJ-DKTJ-DK 1236095384|%e %b %Y, %H:%M %Z|agohover

Hi all

I've followed kyyhkynen's guides and end up with disk-spinup each hour. I've modified the spindown script so it clears dmesg and spinup script so it dumps the dmesg to a file with timestamp. Please help me disable whatever is causing the disk access. The logs are very similar to theese two:

<7>ntpd(780): dirtied inode 12 (?) on ram1
<7>ntpd(780): dirtied inode 2 (/) on ram1
<7>ntpd(780): dirtied inode 2 (/) on ram1
<7>ntpd(780): dirtied inode 33 (ntp.drift) on ram1
<7>sh(7415): dirtied inode 46380 (now) on md3
<7>kjournald(183): WRITE block 901128 on md3
<7>md3_raid1(170): WRITE block 1975808 on sda3
<7>kjournald(183): WRITE block 5520 on md3
<7>kjournald(183): WRITE block 5528 on md3
<7>kjournald(183): WRITE block 5536 on md3
<7>kjournald(183): WRITE block 5544 on md3
<7>kjournald(183): WRITE block 5552 on md3
<7>kjournald(183): WRITE block 5560 on md3
<7>md3_raid1(170): WRITE block 1975808 on sda3
<7>cp(7420): dirtied inode 19923 (ntp.drift) on md1
<7>S13ramdisk(7419): dirtied inode 30 (locks) on ram1
<7>cp(7421): dirtied inode 92743 (account_policy.tdb) on md3
<7>cp(7421): dirtied inode 31 (account_policy.tdb) on ram1
<7>cp(7421): dirtied inode 92747 (brlock.tdb) on md3
<7>cp(7421): dirtied inode 32 (brlock.tdb) on ram1
<7>cp(7421): dirtied inode 92742 (browse.dat) on md3
<7>cp(7421): dirtied inode 56 (browse.dat) on ram1
<7>cp(7421): dirtied inode 92746 (connections.tdb) on md3
<7>cp(7421): dirtied inode 34 (connections.tdb) on ram1
<7>cp(7421): dirtied inode 92749 (gencache.tdb) on md3
<7>cp(7421): dirtied inode 35 (gencache.tdb) on ram1
<7>cp(7421): dirtied inode 92744 (group_mapping.tdb) on md3
<7>cp(7421): dirtied inode 36 (group_mapping.tdb) on ram1
<7>cp(7421): dirtied inode 92748 (locking.tdb) on md3
<7>cp(7421): dirtied inode 37 (locking.tdb) on ram1
<7>cp(7421): dirtied inode 92741 (messages.tdb) on md3
<7>cp(7421): dirtied inode 38 (messages.tdb) on ram1
<7>cp(7421): dirtied inode 92740 (nmbd.pid) on md3
<7>cp(7421): dirtied inode 39 (nmbd.pid) on ram1
<7>cp(7421): dirtied inode 92753 (ntdrivers.tdb) on md3
<7>cp(7421): dirtied inode 40 (ntdrivers.tdb) on ram1
<7>cp(7421): dirtied inode 92755 (ntforms.tdb) on md3
<7>cp(7421): dirtied inode 41 (ntforms.tdb) on ram1
<7>cp(7421): dirtied inode 92754 (ntprinters.tdb) on md3
<7>cp(7421): dirtied inode 42 (ntprinters.tdb) on ram1
<7>cp(7421): dirtied inode 92750 (registry.tdb) on md3
<7>cp(7421): dirtied inode 43 (registry.tdb) on ram1
<7>cp(7421): dirtied inode 92745 (sessionid.tdb) on md3
<7>cp(7421): dirtied inode 44 (sessionid.tdb) on ram1
<7>cp(7421): dirtied inode 92756 (share_info.tdb) on md3
<7>cp(7421): dirtied inode 45 (share_info.tdb) on ram1
<7>cp(7421): dirtied inode 92758 (smbd.pid) on md3
<7>cp(7421): dirtied inode 46 (smbd.pid) on ram1
<7>cp(7421): dirtied inode 92757 (unexpected.tdb) on md3
<7>cp(7421): dirtied inode 47 (unexpected.tdb) on ram1
<7>cp(7422): dirtied inode 30945 (log.0.0.0.0) on md3
<7>cp(7422): dirtied inode 13 (log.0.0.0.0) on ram1
<7>cp(7422): dirtied inode 30942 (log.045bd-acc15x520) on md3
<7>cp(7422): dirtied inode 14 (log.045bd-acc15x520) on ram1
<7>cp(7422): dirtied inode 30943 (log.192.168.1.100) on md3
<7>cp(7422): dirtied inode 15 (log.192.168.1.100) on ram1
<7>cp(7422): dirtied inode 30947 (log.192.168.1.102) on md3
<7>cp(7422): dirtied inode 16 (log.192.168.1.102) on ram1
<7>cp(7422): dirtied inode 30946 (log.192.168.1.106) on md3
<7>cp(7422): dirtied inode 17 (log.192.168.1.106) on ram1
<7>cp(7422): dirtied inode 30941 (log.gert-inspiron-6) on md3
<7>cp(7422): dirtied inode 18 (log.gert-inspiron-6) on ram1
<7>cp(7422): dirtied inode 30925 (log.home-e65103366e) on md3
<7>cp(7422): dirtied inode 19 (log.home-e65103366e) on ram1
<7>cp(7422): dirtied inode 30930 (log.jacob-pc) on md3
<7>cp(7422): dirtied inode 20 (log.jacob-pc) on ram1
<7>cp(7422): dirtied inode 30932 (log.mac001b6337d39b) on md3
<7>cp(7422): dirtied inode 21 (log.mac001b6337d39b) on ram1
<7>cp(7422): dirtied inode 30919 (log.nmbd) on md3
<7>cp(7422): dirtied inode 22 (log.nmbd) on ram1
<7>cp(7422): dirtied inode 30929 (log.smbd) on md3
<7>cp(7422): dirtied inode 23 (log.smbd) on ram1
<7>cp(7422): dirtied inode 30924 (log.smbd.old) on md3
<7>cp(7422): dirtied inode 24 (log.smbd.old) on ram1
<7>cp(7422): dirtied inode 30940 (log.stuen) on md3
<7>cp(7422): dirtied inode 25 (log.stuen) on ram1
<7>cp(7422): dirtied inode 30926 (log.thomas-pc) on md3
<7>cp(7422): dirtied inode 26 (log.thomas-pc) on ram1
<7>cp(7422): dirtied inode 30928 (log.thomas-pc.old) on md3
<7>cp(7422): dirtied inode 27 (log.thomas-pc.old) on ram1
<7>cp(7422): dirtied inode 30927 (log.tj-dell) on md3
<7>cp(7422): dirtied inode 28 (log.tj-dell) on ram1
<7>cp(7422): dirtied inode 30944 (log.tj-dell.old) on md3
<7>cp(7422): dirtied inode 29 (log.tj-dell.old) on ram1
<7>S13ramdisk(7419): dirtied inode 48 (private) on ram1
<7>cp(7423): dirtied inode 61829 (lighttpd.htdigest.user) on md3
<7>cp(7423): dirtied inode 49 (lighttpd.htdigest.user) on ram1
<7>cp(7423): dirtied inode 61836 (secrets.tdb) on md3
<7>cp(7423): dirtied inode 50 (secrets.tdb) on ram1
<7>cp(7423): dirtied inode 61833 (smbpasswd) on md3
<7>cp(7423): dirtied inode 51 (smbpasswd) on ram1
SPINUP


<7>sh(22396): dirtied inode 46380 (now) on md3
<7>kjournald(183): WRITE block 983040 on md3
<7>md3_raid1(170): WRITE block 1975808 on sda3
<7>kjournald(183): WRITE block 7256 on md3
<7>kjournald(183): WRITE block 7264 on md3
<7>kjournald(183): WRITE block 7272 on md3
<7>kjournald(183): WRITE block 7280 on md3
<7>kjournald(183): WRITE block 7288 on md3
<7>kjournald(183): WRITE block 7296 on md3
<7>md3_raid1(170): WRITE block 1975808 on sda3
<7>cp(22401): dirtied inode 19923 (ntp.drift) on md1
<7>cp(22401): dirtied inode 12 (ntp.drift) on ram1
<7>S13ramdisk(22400): dirtied inode 30 (locks) on ram1
<7>cp(22402): dirtied inode 92743 (account_policy.tdb) on md3
<7>cp(22402): dirtied inode 31 (account_policy.tdb) on ram1
<7>cp(22402): dirtied inode 92747 (brlock.tdb) on md3
<7>cp(22402): dirtied inode 32 (brlock.tdb) on ram1
<7>cp(22402): dirtied inode 92742 (browse.dat) on md3
<7>cp(22402): dirtied inode 56 (browse.dat) on ram1
<7>cp(22402): dirtied inode 92746 (connections.tdb) on md3
<7>cp(22402): dirtied inode 34 (connections.tdb) on ram1
<7>cp(22402): dirtied inode 92749 (gencache.tdb) on md3
<7>cp(22402): dirtied inode 35 (gencache.tdb) on ram1
<7>cp(22402): dirtied inode 92744 (group_mapping.tdb) on md3
<7>cp(22402): dirtied inode 36 (group_mapping.tdb) on ram1
<7>cp(22402): dirtied inode 92748 (locking.tdb) on md3
<7>cp(22402): dirtied inode 37 (locking.tdb) on ram1
<7>cp(22402): dirtied inode 92741 (messages.tdb) on md3
<7>cp(22402): dirtied inode 38 (messages.tdb) on ram1
<7>cp(22402): dirtied inode 92740 (nmbd.pid) on md3
<7>cp(22402): dirtied inode 39 (nmbd.pid) on ram1
<7>cp(22402): dirtied inode 92753 (ntdrivers.tdb) on md3
<7>cp(22402): dirtied inode 40 (ntdrivers.tdb) on ram1
<7>cp(22402): dirtied inode 92755 (ntforms.tdb) on md3
<7>cp(22402): dirtied inode 41 (ntforms.tdb) on ram1
<7>cp(22402): dirtied inode 92754 (ntprinters.tdb) on md3
<7>cp(22402): dirtied inode 42 (ntprinters.tdb) on ram1
<7>cp(22402): dirtied inode 92750 (registry.tdb) on md3
<7>cp(22402): dirtied inode 43 (registry.tdb) on ram1
<7>cp(22402): dirtied inode 92745 (sessionid.tdb) on md3
<7>cp(22402): dirtied inode 44 (sessionid.tdb) on ram1
<7>cp(22402): dirtied inode 92756 (share_info.tdb) on md3
<7>cp(22402): dirtied inode 45 (share_info.tdb) on ram1
<7>cp(22402): dirtied inode 92758 (smbd.pid) on md3
<7>cp(22402): dirtied inode 46 (smbd.pid) on ram1
<7>cp(22402): dirtied inode 92757 (unexpected.tdb) on md3
<7>cp(22402): dirtied inode 47 (unexpected.tdb) on ram1
<7>S13ramdisk(22400): dirtied inode 2 (/) on ram1
<7>cp(22403): dirtied inode 30945 (log.0.0.0.0) on md3
<7>cp(22403): dirtied inode 13 (log.0.0.0.0) on ram1
<7>cp(22403): dirtied inode 30942 (log.045bd-acc15x520) on md3
<7>cp(22403): dirtied inode 14 (log.045bd-acc15x520) on ram1
<7>cp(22403): dirtied inode 30943 (log.192.168.1.100) on md3
<7>cp(22403): dirtied inode 15 (log.192.168.1.100) on ram1
<7>cp(22403): dirtied inode 30947 (log.192.168.1.102) on md3
<7>cp(22403): dirtied inode 16 (log.192.168.1.102) on ram1
<7>cp(22403): dirtied inode 30946 (log.192.168.1.106) on md3
<7>cp(22403): dirtied inode 17 (log.192.168.1.106) on ram1
<7>cp(22403): dirtied inode 30941 (log.gert-inspiron-6) on md3
<7>cp(22403): dirtied inode 18 (log.gert-inspiron-6) on ram1
<7>cp(22403): dirtied inode 30925 (log.home-e65103366e) on md3
<7>cp(22403): dirtied inode 19 (log.home-e65103366e) on ram1
<7>cp(22403): dirtied inode 30930 (log.jacob-pc) on md3
<7>cp(22403): dirtied inode 20 (log.jacob-pc) on ram1
<7>cp(22403): dirtied inode 30932 (log.mac001b6337d39b) on md3
<7>cp(22403): dirtied inode 21 (log.mac001b6337d39b) on ram1
<7>cp(22403): dirtied inode 30919 (log.nmbd) on md3
<7>cp(22403): dirtied inode 22 (log.nmbd) on ram1
<7>cp(22403): dirtied inode 30929 (log.smbd) on md3
<7>cp(22403): dirtied inode 23 (log.smbd) on ram1
<7>cp(22403): dirtied inode 30924 (log.smbd.old) on md3
<7>cp(22403): dirtied inode 24 (log.smbd.old) on ram1
<7>cp(22403): dirtied inode 30940 (log.stuen) on md3
<7>cp(22403): dirtied inode 25 (log.stuen) on ram1
<7>cp(22403): dirtied inode 30926 (log.thomas-pc) on md3
<7>cp(22403): dirtied inode 26 (log.thomas-pc) on ram1
<7>cp(22403): dirtied inode 30928 (log.thomas-pc.old) on md3
<7>cp(22403): dirtied inode 27 (log.thomas-pc.old) on ram1
<7>cp(22403): dirtied inode 30927 (log.tj-dell) on md3
<7>cp(22403): dirtied inode 28 (log.tj-dell) on ram1
<7>cp(22403): dirtied inode 30944 (log.tj-dell.old) on md3
<7>cp(22403): dirtied inode 29 (log.tj-dell.old) on ram1
<7>S13ramdisk(22400): dirtied inode 48 (private) on ram1
<7>cp(22404): dirtied inode 61829 (lighttpd.htdigest.user) on md3
<7>cp(22404): dirtied inode 49 (lighttpd.htdigest.user) on ram1
<7>cp(22404): dirtied inode 61836 (secrets.tdb) on md3
<7>cp(22404): dirtied inode 50 (secrets.tdb) on ram1
<7>cp(22404): dirtied inode 61833 (smbpasswd) on md3
<7>cp(22404): dirtied inode 51 (smbpasswd) on ram1
SPINUP

Please help ;)

unfold Re: MyBook Spindown ? by TJ-DKTJ-DK, 1236095384|%e %b %Y, %H:%M %Z|agohover
Re: MyBook Spindown ?
troelssptroelssp 1240173440|%e %b %Y, %H:%M %Z|agohover

i got alot activity from these:

<7>kjournald(183): WRITE block 11648 on md3
<7>kjournald(183): WRITE block 11656 on md3
<7>kjournald(183): WRITE block 11664 on md3
<7>kjournald(183): WRITE block 11672 on md3
<7>pdflush(36): WRITE block 0 on md3
<7>pdflush(36): WRITE block 8 on md3
<7>pdflush(36): WRITE block 1572864 on md3
<7>pdflush(36): WRITE block 1572872 on md3
<7>pdflush(36): WRITE block 1572880 on md3
<7>pdflush(36): WRITE block 1576744 on md3
<7>md1_raid1(174): WRITE block 5879552 on sda1
<7>md3_raid1(170): WRITE block 1975808 on sda3
<7>kjournald(175): WRITE block 147504 on md1
<7>md1_raid1(174): WRITE block 5879552 on sda1
<7>kjournald(175): WRITE block 10048 on md1
<7>kjournald(175): WRITE block 10056 on md1
<7>kjournald(175): WRITE block 10064 on md1
<7>md1_raid1(174): WRITE block 5879552 on sda1
<7>pdflush(37): WRITE block 1464 on md1
<7>md1_raid1(174): WRITE block 5879552 on sda1
<7>pdflush(36): WRITE block 1474560 on md3
<7>md3_raid1(170): WRITE block 1975808 on sda3
<7>pdflush(36): WRITE block 1474568 on md3
<7>pdflush(36): WRITE block 1474576 on md3
<7>pdflush(36): WRITE block 1474584 on md3

how can i stop them so my MBW dont spin up and down 3 times an hour, the MBW often only spin down for 2 minutes and then it spin ud again, i have tried alot, but i dosent work

What can i do ? plz help im a bit noob on linux

unfold Re: MyBook Spindown ? by troelssptroelssp, 1240173440|%e %b %Y, %H:%M %Z|agohover
New post
Unless otherwise stated, the content of this page is licensed under Creative Commons Attribution-ShareAlike 3.0 License