|
Post by peanuts on Jan 11, 2008 17:23:17 GMT 7
I have tried your modification and checked if the assemble_conf really contains the change but it still does not work. browse.dat and others are still in the old place and updated at regular intervals.
I rebootet after the modification and even cycled power. What's wrong?
|
|
|
Post by fajo on Jan 12, 2008 6:00:26 GMT 7
With quota management enabled (quotas set on any folders) HD spindown will fail too.
Every 5 minutes the script /img/bin/rc/rc.quota will update the quota information in the raid database /raidX/sys/raid.db on each RAID with quota enabled. This will cause disk access every 5 minutes.
/Falk
|
|
|
Post by grassrootz on Jan 13, 2008 11:10:38 GMT 7
I would like to add that with 2.00.04 I am also not getting spin-down with 5 WD drives model: WD7500AAKS-00RBA
Is there any working fix for this? Does anyone know if I have a mapped drive to it will that prevent spin-down? I do have a server that stays on 24/7 that does have a mapped drive to the SMB share. I wonder if I mapped using IP if it would make a difference.
|
|
|
Post by fajo on Jan 13, 2008 18:19:44 GMT 7
Before Thecus does not provide a fix for the spin-down issue (quota and smb related) it makes no sense to discuss this any further since no one can tell if this is a HD or a FW issue.
/Falk
|
|
clag
New Member
Posts: 21
|
Post by clag on Jan 22, 2008 20:25:36 GMT 7
Hi quarx and others,
I think you solve a problem which makes me headache long time, never I saw my hdds go sleep. but today I read this thread, and for an try I disable the CIFS Support in the NASbox, and what happens the hdds go sleep after 30 min !!
so I am sure you have the solution ... and I would like to do the same with my NASbox,
but the first step I don't understand and I find nothing here, how to install or use IMGDUP !? what is it ? please, is it possible for you to tell me what and how I have to do it, step be step
thanks a lot ahead
clag
|
|
|
Post by drewy on Jan 31, 2008 20:54:42 GMT 7
anyone else had any luck with this solution?
|
|
|
Post by drewy on Feb 4, 2008 18:52:18 GMT 7
I have a solution. You could (I would think) use IMGDUP and make the changes to smb.conf directly. Unfortunatley on my box IMGDUP causes the 5200pro to hang on a scheduled shutdown. Because of this I had to remove IMGDUP. But I have come up with another method of making the required changes to the smb.conf file. I now have disk spindown and power management (schedued shutdown & startup) working. Anyone interested?
|
|
|
Post by peanuts on Feb 4, 2008 19:38:54 GMT 7
Yesss!
|
|
|
Post by drewy on Feb 4, 2008 20:27:07 GMT 7
This is my solution, works for me but anyone else's milage may vary. I'd be interested if it works for others.... Switch off all quota's on all shared folders. Install the META module from the wiki. This will allow us to run a shell script on system startup. create the following file in /raid/data/module/META/system/etc/startup #!/bin/sh # pdrew 2-feb-08 #change samba parameters if an effort to get disk spindown working on thecus 5200pro #set up smb.conf how we want it! while ! ps | grep -v grep | grep smbd > /dev/null do sleep 5 done sed -e 's/local master = yes/local master = no/g' /tmp/smb.conf > /raid/smb.conf.tmp sed -e 's/lock directory = \/raid\/data\/tmp\/var/local master = \/tmpfs\/var/g' /raid/smb.conf.tmp > /tmp/smb.conf #restart samba without rebuilding smb.conf # stop samba kill -15 `ps | grep smbd | awk '{print $1}'` kill -15 `ps | grep nmbd | awk '{print $1}'` kill -15 `ps | grep winbindbd | awk '{print $1}'` sleep 2 # start samba /opt/samba/sbin/smbd /opt/samba/sbin/nmbd /opt/samba/sbin/winbindd mine is named samba_retstart.sh, but the name is not important. Make this file executable (chmod u+x samba_restart.sh) Then manually run the script or re-boot the box for it to take effect. Make sure you have set drive timeout setting in web gui...mine then spin down as set. This shell script is then run every time the 5200 is re-booted. It basically changes a couple of settings in smb.conf (turns off local master, moves temp files to /tmp/var), kills the samba processess and then restarts them without using the standard start scripts (to avoid smb.conf rebuild). This script may not be pretty (many years since I last wrote a shell script), but it does the job, atleast for me. Beware that if you make samba changes in the web gui i.e. add folders etc. this will cause a smb.conf rebuild, to replace the overridden setting you will have to either manually run the above script or re-boot the box. Feedback welcome.
|
|
|
Post by grassrootz on Feb 8, 2008 1:57:13 GMT 7
Im just curious if I SSH into my box and change the local browser to no in the smb.conf if that will fix the spind down issues? Also what happens when I reboot will smb.conf revert back to the default? Also what is smb.conf.default* ?
|
|
|
Post by drewy on Feb 8, 2008 2:41:29 GMT 7
If you simply make the change in smb.conf it will get overwritten at every re-boot (hence my script above) and everytime you make a change to folders via the web interface. As to whether just setting local browser to no will cure the spindown problem, I really don't know. It seems at best it's a case of "suck it & see"
|
|
quarx
New Member
Posts: 18
|
Post by quarx on Feb 11, 2008 2:42:14 GMT 7
Hi drewy, I like your solution using META module, but not working for me. I was perform several test and i can see the browse.dat file is not redirected to tmpfs/var/ Working around this y was made another one solution with META module.To avoid issues with the IMGDUP module (thanks to OMEGA for this piece of sw and others,make more easy the life of thecus users, your work are very appreciated ) 1- install META module. 2- Make new dir samba in: /raid/data/module/META/system/etc/startup/ 3- From img/bin/rc/ copy rc.samba and assemble_conf and rename to rc.samba2 and assble2.conf cp img/bin/rc/rc.samba /raid/data/module/META/system/etc/startup/ samba/rc.samba2 cp img/bin/rc/assemble_conf /raid/data/module/META/system/etc/ startup/samba/assemble2_conf 4- Edit the new rc.samba2 change the path on line 136 and line 163 to /raid/data/module/META/system/etc/startup/samba/assemble2_conf 4- Edit assemble2_conf line 44 change to "lock directory = /tmpfs/var" if needed change also line 50 "local master = no" (i not change this, and working very well for me ) Create the script samba_restart.sh in startup dir (/raid/data/module/META/system/etc/startup): #!/bin/sh # QuarX 10-feb-08 #Restart samba for get hdstop working sleep 15 sh /raid/data/module/META/system/etc/startup/samba/rc.samba2 restart Make this file executable chmod u+x samba_restart.sh Reset the N5200 or type sh samba_restar.sh If all be OK check tmpfs/var with the command ls -l the file browse.dat and other samba files must be located here now and is updated after several minutes. Thanks to all forum users ;D Jose A. Ciaaao
|
|
|
Post by drewy on Feb 11, 2008 22:28:39 GMT 7
quarx, Thanks for the feedback. I think (from my tests) that my script was sometimes running before samba had actaully started, and so all actions it performed were over written by the .conf rebuild. I added an extra sleep 10 after my loop waiting for samba to start...just to make sure it was WELL started before killing it It still doesn't seem to work 100% more like 85-90% of the time, I'm guessing that there are other processes that sometimes hit the disk and prevent them going to sleep. Saying that your solution does look a little more elegant.
|
|
|
Post by Georg Eschenbach on Mar 26, 2008 1:25:01 GMT 7
Hello to all of you,
I have read this thread with big interet, as I as well would like to have my hd´s spin down after a time. I have made all the changes quarx has mentioned two post before (installed meta module copied and renamed the two files, edited the files and made the changes copied and pasted the script into samba_restart.sh made sambe_restart.sh and rc.samba2 and assemble2_conf via 0755 executable) BUT the drives do NOT spin down.
As I have quota on user folders for ftp, can that be the reason?
What does happen, if I set "local master = no" (I haven´t tried it yet)
The files browse.dat and all kind of other files, ending *.tdb, .mnbd, *.smbd and *.pid can be found in /tmpfs/var. The folders raid/data/tmp/var are empty.
Can anybody give me some hints? What have I made wrong?
Thank you
George
|
|
|
Post by peterfu on Mar 26, 2008 2:32:06 GMT 7
As I have quota on user folders for ftp, can that be the reason? Seems You have not seen the post from fajo in this thread: br Peter
|
|