PDA

View Full Version : Spin down and ftp-Problem with FW kfurge 1.0.7.8


fraho
10-05-2008, 10:27
Worked perfectly for me with kfurge's 1.0.4.6 and yes - my rc.local is located in /shares/MYVOLUME1/opt/etc:

#!/opt/bin/bash

export PATH=/opt/bin:/opt/sbin:/bin:/sbin:/usr/bin:/usr/sbin
export LD_LIBRARY_PATH=/opt/lib:/apps/lib:/apps/usr/gift-nasoc/lib
export KCSHELL=/opt/bin/bash

#############
# Get nvram variables
#############
pool=`nvram get apps_pool`
share=`nvram get apps_share`
kc_spin_down_hdd=`nvram get kc_spin_down_hdd`

#############
# Misc defines
#############
internal_hdd=/dev/ide/host2/bus0/target0/lun0/disc

#############
# These items only run once at power up
#############
if [ ! -f /tmp/rc.local.done ]; then

# Indicate we've already done this
touch /tmp/rc.local.done

# Do the necessary steps so the internal HDD will enter low power
# idle after 5 minutes and low RPM idle after 1 hour
if [ "$kc_spin_down_hdd" != "No" ]; then
mount -o remount,noatime,nodiratime /shares/${pool}
hdparm -B 164 ${internal_hdd}
hdparm -B 114 ${internal_hdd}
smartctl -dT ${internal_hdd}
fi

# Kill utelnetd and restart it only on the LAN interface
killall utelnetd
utelnetd -d -i br0

# Start dropbear ssh server
if [ -x /opt/etc/init.d/S51dropbear ]; then
/opt/etc/init.d/S51dropbear
fi

# Start MLDonkey
if [ -x /opt/etc/init.kc/start_mldonkey.sh ]; then
/opt/etc/init.kc/start_mldonkey.sh
fi

fi

###############
# Everything from here on runs whenever the configuration changes
###############

# Fix passwd and groups files
/opt/etc/init.kc/fix_passwd.sh
/opt/etc/init.kc/fix_group.sh

# Set hostname
hostname `nvram get machine_name`

# Poke holes in the firewall for certain applications
/opt/etc/init.kc/iptables_mldonkey.sh
/opt/etc/init.kc/iptables_ssh.sh

This is my old rc.local (the one that worked with 1.0.4.6) which is still located in /shares/MYVOLUME1:

cat /proc/mounts > /opt/etc/fstab

ln -s /opt/etc/shells /tmp/shells
ln -s /opt/etc/fstab /tmp/fstab

export PATH=/opt/bin:/opt/sbin:${PATH}
export LD_LIBRARY_PATH=/opt/lib:${LD_LIBRARY_PATH}
fi

# Start utelnetd on local interface only!
/apps/bin/utelnetd -i br0 &

# Sleep for a little bit to not interfere with normal system startup
# before we kill a bunch of Asus processes.
sleep 5

# The killing of watchdog is necessary
# to allow the disk to spin down (watchdog is a horribly written hack
# anyway!)
killall -q -9 watchdog

# Do the necessary steps so the internal HDD will spin down
mount -o remount,noatime,nodiratime /shares/${pool}
hdparm -S 180 ${internal_hdd}
smartctl -dT ${internal_hdd}

fi

Is it o.k. to just exchange the new one with the old one and my disk will spin down again?
btw: What do I have to add to rc.local when I want an external USB-Disk to spin down as well?


Another problem with kfurge 1.0.7.8: When I try to reach the ftp-shares via browser I get a "Website cannot be displayed" message, whereas it's still possible to access the ftp-share with an ftp program like leechftp.

I really hate myself for having changed a running system. :mad:

Any help would be greatly appreciated

fraho
10-05-2008, 18:26
Meanwhile I exchanged the new with the old rc.local and the disk spins down again :)

So what's left are the questions about what to add to rc.local for spinning down an external disk (or does that happen automatically when internal disk is mirrored?) and the no more working ftp-access via browser.

fraho
11-05-2008, 08:59
o.k., you can also forget about the ftp-question. It works when you open the ftp-share by typing in the url in this way: ftp://%username%:%password%@%hostnameofwl700g%

So the only thing that's left and probably cannot be answered by talking to myself ;) ist what I have to add to rc.local if I want to spin down an external disk as well.
I'm asking that because I intend to mirror the internal disk for reducing the risk of a data loss.
Originally I wanted to replace the WL700g with a RAID-System but I can't find a product without any fans respectively one which is capable not only to spin down the disks but also the fan(s). I just want such a system to be absolutely quiet when there's nothing to do.
What are your experiences with WL700g and an external disk as mirror?
I'm using the WL700g as a videorecorder, so are the maybe any siginifcant differences in performance when it also has to write data to a disk connected via USB?
Does it need a special type of external disk to ensure it will spin down?
At the moment I'm using a Samsung 400GB disk but I would like to upgrade to 750gb (x2 for mirroring). Maybe anyone of you uses such a configuration and can tell something about my concerns?

kfurge
18-05-2008, 01:55
So the only thing that's left and probably cannot be answered by talking to myself ;) ist what I have to add to rc.local if I want to spin down an external disk as well.


If your USB enclosure does not have the capability to spin down the drive, then I'm afraid you're out of luck. There is no standard way that I'm aware of to spin down a USB drive. I bought my Seagate ST30000U2 specifically because it spins down automatically when idle.

- K.C.