Unfortunately no one can be told what fun_plug is - you have to see it for yourself.
You are not logged in.
A short introduction: I have an usb relay board that can power on and off external devices. The idea is to use DNS-320 as a storage on demand without having it powered all the time. It would work this way that I power it on, it restores the power state so it boots without pressing the power button and later, if not needed I shut it down and cut the power off so the cycle can be repeated. To do this I have to halt it but not power it off. How to do this? Both halt and shutdown power it off (at least I did not discover any suitable switch).
Marcin
Offline
Not a solution to your problem, but perhaps an acceptable workaround:
Have you considered moving FFP install to usb memory stick? the system power usage with all (traditional) hard drives spun down (sleep) is not much. At least my DNS-325 feels quite cold when the drives are not in use.
Offline
Hi japa-fi, thanks for your response. No, this will be likely the last resort solution What I've been trying to do at this moment is to remount the drives in ro mode and then just cut off the power without shutting the system down (not really elegant solution) or something similar equivalent to shutdown. It may come that this is the only way to do it as I just discovered that cutting the power off during the boot will not restore the power state after the power is restored so it looks like this hardware function is modified by shutdown/reboot.
I also took a brief look inside the shutdown sources (Dlink stuff from their GPL publisher rev.A) and as much as I can tell with my rather limited C coding skills the choice to power it off or not is there implemented but looks like everything is somewhere hardwired.
So the approach I will try when I have a bit of time is either to remount all in ro if possible (I'm not sure at this runlevel) or mount everything ro at next reboot and then cut it off.
Perhaps I should also take a look at shutdown distributed with Squeeze.
Marcin
Offline
I *think* you could write a module, which just sets a pointer to a dummy (while(1){}) function to pm_power_off. In that case the main board never gets the power-off command.
Offline
Ok, I just checked I can remount the vast majority "ro" just by a simple:
mount -o remount,ro PATH
but I can not do it with "root"
Before:
%root% on / type unknown (rw)
/dev/ram0 on / type ext2 (rw)
proc on /proc type proc (rw)
squash on /usr/local/tmp type ramfs (rw,size=25m)
/usr/local/tmp/image.cfs on /usr/local/modules type squashfs (rw,loop=/dev/loop0)
/dev/mtdblock5 on /usr/local/config type jffs2 (rw)
/dev/sda4 on /mnt/HD_a4 type ext3 (rw)
/dev/sdb4 on /mnt/HD_b4 type ext3 (rw)
none on /proc/bus/usb type usbfs (rw)
/dev/md1 on /mnt/HD/HD_a2 type ext3 (rw,usrquota,grpquota)
devpts on /dev/pts type devpts (rw)
nfsd on /proc/fs/nfsd type nfsd (rw)
After:
%root% on / type unknown (rw)
/dev/ram0 on / type ext2 (rw)
proc on /proc type proc (rw)
squash on /usr/local/tmp type ramfs (rw,size=25m)
/usr/local/tmp/image.cfs on /usr/local/modules type squashfs (ro,loop=/dev/loop0)
/dev/mtdblock5 on /usr/local/config type jffs2 (ro)
/dev/sda4 on /mnt/HD_a4 type ext3 (ro)
/dev/sdb4 on /mnt/HD_b4 type ext3 (ro)
none on /proc/bus/usb type usbfs (rw)
/dev/md1 on /mnt/HD/HD_a2 type ext3 (ro,usrquota,grpquota)
nfsd on /proc/fs/nfsd type nfsd (rw)
devpts on /dev/pts type devpts (rw)
I can also kill smb/nfs related daemons. Leaving aside how elegant or not it is, how safe at this ("After") point is to cut the power off?
Offline
It should be safe. The rootfs is a ramdrive, so it doesn't hurt it isn't ro. To save some extra energy, you could put the disks asleep when the daemons are killed.
hdparm -Y /dev/sda hdparm -Y /dev/sdb
Then you are also sure the heads are parked. (Although it shouldn't matter. Modern disks automatically park when you cut the power)
Last edited by Mijzelf (2013-06-08 10:29:49)
Offline
Good idea, thank you, did it this way.
Offline