Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
I have set up passwordless ssh login to the DNS 323, and would like to be able to execute the following commands from my laptop when I'd like to shutdown or reboot the DNS 323:
ssh root@my-dns-device "/sbin/poweroff"
ssh root@my-dns-device "/sbin/reboot"
However, I wanted to ask whether it's safe to call these commands directly like this, or can it result in data corruption or other problems? (I use 2 standard volumes, no RAID. Though I may use any type of RAID in the future in this device.) Am I better off using a script to call the Shutdown and Restart commands from the web GUI? I've got something like this currently, but would like to call /sbin/poweroff and /sbin/reboot instead (if they're safe to call) because it's just cleaner and simpler.
Offline
You can use them, but it will work like from the webinterface. Using cleanboot should work "cleaner".
See http://dns323.kood.org/howto:cleanboot
On my dns-323 with cleanboot /sbin/poweroff it is still a softlink to busybox.
halt/reboot/shutdown point to a new program from the cleanboot package: /usr/bin/do_reboot
Offline
Thanks for pointing me to cleanboot, I followed the instructions and enabled it. What is the difference between halt and shutdown? Searching about this for Linux in general says that it's better to call shutdown rather than halt... Is this the case for the DNS 323? As my shutdown command should I run:
ssh root@my-dns-device "/sbin/halt"
or
ssh root@my-dns-device "/sbin/shutdown"
Offline
Not sure. On some unix systems one of the commands could just stop all without shutting everything down cleanly.
The other command shutsdown everything cleanly (like all executable scripts in /ffp/start/ are run with the stop argument).
With cleanboot it migth not matter. It might just do a clean shutdown.
Probably the shutdown is the best option...
Offline
Whether I do a halt, shutdown, or reboot, it actually takes about 4-5 minutes to actually execute this request, with no feedback that it's working (e.g. flashing lights). How long does it take before cleanboot initiates the reboot or shutdown from the time you send the command? I realize it's doing things 'cleanly' but that amount of time seems excessive.
If i disable cleanboot and use a script to shutdown the DNS 323 by accessing the web GUI, it takes just a few seconds. And I'm sure that wouldn't be corrupting the drives because it's a built in feature for shutting down and rebooting. So why the difference here, is it just my system?
Offline
There are some sleep statements in the script cleanboot runs (/ffp/share/cleanboot/cleanboot.sh).
However is amount to just half a minute.
This script does stop all ffp programs via the executable scripts in /ffp/start/.
I just saw, that the script does not use reverse rcorder to execute them in the correct order.
Do all the programs in the /ffp/start dir, take al lot of time shutting down?
The firmware halt/poweroff do not take into account that that there might be programs running like /ffp.
I haven't stopped my dns cleanly lately. It have only be switch off lately by complete power loss (daughters and switches are a bad combination. ), but your poweroff time do seem large...
Offline
The scripts in /ffp/start don't seem to take too long to shut down. Something else must be going wrong and I can't tell what it might be.
I'm thinking I may need to reset my DNS 323 if nothing else works and reconfigure everything, maybe I screwed something up along the way. Now when I'm ssh'ed into the DNS 323 and I enter a simple 'reboot' or 'shutdown', literally nothing happens AT ALL... And then several minutes later my DNS 323 might or might not just shut down as though the request just went through. Has anyone dealt with anything like this and might know what might be going wrong here?
Offline
Add a bunch of echo statements to the scripts and/or setup a detailed log file with time stamps. That way you can see exactly what is going on and which statements take longer than others. Some processes take longer than others to "kill".
I had a nightly cleanup/check routine on one of my servers that would take over 20 minutes to run. After detailed logging, I was able to refine the process and now it takes less than 2 minutes.
Last edited by FunFiler (2011-10-22 05:03:59)
Offline
FunFiler,
This script is made so the disks in the system can be umount-ed cleanly.
Echo-ing all kind of info to a logfile on the disk is just something you do not want. Contraproductive. To a logfile in /tmp/ is also not usable.
This is cleaned or complety renewed at boot time.
Not sure how you could debug/trace in this case though.
Offline
USB stick?
Offline
If you use /mnt/USB, this also gets umount-ed.
Offline
So then what options do I have for logging the script so I can see where it's taking its time? FunFiler, did you find a way to do this?
The 'reboot' command immediately shuts off all telnet and ssh connectivity and I can no longer connect to the drive I had mounted over cifs. But then after that moment passes I have no idea why it's taking it's time. All the lights on the device remain on (not even flashing) and it just sits that way...
Offline