DSM-G600, DNS-3xx and NSA-220 Hack Forum

Unfortunately no one can be told what fun_plug is - you have to see it for yourself.

You are not logged in.

Announcement

#26 2010-12-18 04:10:07

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: Hibernation isn't working - I guess is the Network

My disks go to sleep mode and transmission is running 24/7 on my systems.

As I mentioned, I moved all of the transmission directories to USB (except complete and incomplete)and ensured the stats files and log were also on USB. When d/ling or seeding obviously the disk is in use, but during idle times (I don't seed), the disks spin down.

It would be trivial to write a script to actually shut transmission down completely if there were no active torrents. In conjunction with Automatic, transmission could be restarted prior to adding a torrent for d/l.


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

#27 2010-12-18 17:08:28

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: Hibernation isn't working - I guess is the Network

FunFiler wrote:

My disks go to sleep mode and transmission is running 24/7 on my systems.

As I mentioned, I moved all of the transmission directories to USB (except complete and incomplete)and ensured the stats files and log were also on USB. When d/ling or seeding obviously the disk is in use, but during idle times (I don't seed), the disks spin down.

It would be trivial to write a script to actually shut transmission down completely if there were no active torrents. In conjunction with Automatic, transmission could be restarted prior to adding a torrent for d/l.

OK, good.  I realized a few hours after I posted that the disks should not spin up just because a long-running process has library files loaded from the hard disk.  The sshd is a good example of such a process.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#28 2010-12-18 17:17:26

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: Hibernation isn't working - I guess is the Network

surfing10 wrote:

FunFiler wrote:

Install in the default location (or use your existing install) and then just move the directory to appropriate places. Keep in mind that the "incomplete" and "complete" directories should be configured to HDD space not USB stick as these could contain large files. (unless you have a really big USB stick)

Moving the rest of the directories is easy enough with the mv command.

The link provided by bjby moves all of ffp to a usb stick. This is of course an option, but not required.

Is that simple? Just move the program files?
Because I've saw a file (transmission.sh) in the ffp/start that points to Transmission Home= mnt/HD_a2/.transmission-deamon.
I need to update this path? What other paths do I need to move?

I'll try first to move only Transmission and if it's not work I'll try to move all the ffp.

Edit: Since Transmission uses libs in HD_a2 probably I'll need to move ffp to the usb.

FunFlier got it to work that way.

So yeah, you'll have to move the transmission files to the USB disk.  Then you'll have to modify the ffp/start/transmission.sh to be aware of the new location AND make sure that the log, stats, state files, etc get created on the USB drive and NOT the hard disk.  Because it is these log, stats, and state files that are keeping the disks from spinning down.  They are probably getting accessed frequently.

If it were me, I'd first try to modify transmission.sh to move "Transmission Home" to the USB disk, or even the root file system on ram disk.  That is,

Transmission Home = <path to USB>
or
Transmission Home = /home/root   (provided that you didn't hack the DNS to move the root home dir to the hard disk)

If that works, you're done and you don't need the USB stick.

Otherwise, you'll have to move the transmission package to the USB stick.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#29 2010-12-18 23:42:42

surfing10
Member
Registered: 2010-08-24
Posts: 22

Re: Hibernation isn't working - I guess is the Network

This option to move Transmission for the /home/root seems the best option but we have space on the RAM disk for this? I didn't move root home to hard disk so this could be an option.

So I just need to move the installation folder to the /home/root and update the transmission.sh? I'll try that. Let's see what happend.

Offline

 

#30 2010-12-20 23:03:21

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: Hibernation isn't working - I guess is the Network

surfing10 wrote:

This option to move Transmission for the /home/root seems the best option but we have space on the RAM disk for this? I didn't move root home to hard disk so this could be an option.

So I just need to move the installation folder to the /home/root and update the transmission.sh? I'll try that. Let's see what happend.

Good Question.

My ~/.config/transmission folder takes up 240K and I've got about 1.5M left free on the rootfs.  212K of that 240K were "resume" files, which I presume could be cleaned up periodically.  So, it should be OK.

I don't think you would move the installation folder.  By installation folder, I mean the folder where all the transmission binaries are kept.  Don't they get installed in /ffp/bin anyway?

The goal here is to make sure that the directories the transmission program USES are in the right place.

This means that the transmission DATA files are on the hard disk. The data files are probably the .torrent files and all the files that are being or have been downloaded.   You need to keep these on the hard disk and you probably already have that configured correctly.

You want the transmission stats, log, state files, etc to be on the ramdisk, so the disks do not spin up when transmission is idle.   All these files are apparently kept in the "Transmission Home"  folder.

You would modify the script file in ffp/start (transmission.sh) to change the "Transmission Home" to the root folder.

You said you saw in that transmission.sh file:

Transmission Home= mnt/HD_a2/.transmission-deamon

Try changing it to:

Transmission Home = /home/root/.transmission-daemon

Then reboot (or kill the running transmission and restart it again with the script you just changed)

Check to see if /home/root/.transmission-daemon gets populated with more directories or files.  If so, check their sizes after awhile and/or after you start up a torrent.  Make sure that the folder doesn't get too big.

Use "du -sh /home/root/.transmission-daemon" to check.  Also do a "df -h" to make sure your rootfs is not filling up.

Finally, leave it run long enough to determine if your disk spins down.

I can't be sure that this will work, but since it is so easy to try (one line in a file), it is worth trying.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#31 2010-12-20 23:18:06

bound4h
Member
Registered: 2010-04-12
Posts: 209

Re: Hibernation isn't working - I guess is the Network

Why not just do the first option and move .transmission-daemon (the /mnt/HD_a2/.transmission-daemon) to your USB (cp -a /mnt/HD_a2/.transmission-daemon /mnt/usb)?  Are you worried your USB stick will fill up?  Assuming you don't have incomplete, complete or torrent files in there, MY transmission-daemon folder is only 28K.  I've moved it to /mnt/usb and changed transmission.sh to reflect this and it's working no problem.

That way you don't even have to worry about filling up ~

Offline

 

#32 2010-12-21 00:52:09

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: Hibernation isn't working - I guess is the Network

bound4h wrote:

Why not just do the first option and move .transmission-daemon (the /mnt/HD_a2/.transmission-daemon) to your USB (cp -a /mnt/HD_a2/.transmission-daemon /mnt/usb)?  Are you worried your USB stick will fill up?  Assuming you don't have incomplete, complete or torrent files in there, MY transmission-daemon folder is only 28K.  I've moved it to /mnt/usb and changed transmission.sh to reflect this and it's working no problem.

That way you don't even have to worry about filling up ~

The point is to avoid using the USB stick.  If it can be moved to the ramdisk, then no USB stick is needed.

So if you got it working that way with no problem, then I'm pretty sure it will work with the transmission-daemon folder in the rootfs.


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#33 2010-12-21 17:02:50

bound4h
Member
Registered: 2010-04-12
Posts: 209

Re: Hibernation isn't working - I guess is the Network

karlrado wrote:

The point is to avoid using the USB stick.  If it can be moved to the ramdisk, then no USB stick is needed.

So if you got it working that way with no problem, then I'm pretty sure it will work with the transmission-daemon folder in the rootfs.

Agree.  Should work no problem if I'm having no issues with it on USB stick.  Again, size was only 28k.

Offline

 

#34 2010-12-22 02:57:42

surfing10
Member
Registered: 2010-08-24
Posts: 22

Re: Hibernation isn't working - I guess is the Network

OK, I have moved all the .transmission-daemon content to /home/root directory and changed the transmission.sh on the /ffp/start and everything worked fine until I reset the DNS-323.
Transmission was working but when I reset the DNS-323 (just to see what will happen) the .transmission-daemon was deleted from the /home/root folder sad I don't know why.
The free space that I have now in the /home/root is 2.9M and was fine with Transmission folder. Why it was deleted automatically? Any command that I need to execute?

Now I'll move to the USB drive until I figure it out (with you guys help) what happen with the folder inside /home/root.

UPDATE: Error from the USB drive.
After executing /ffp/start/transmission.sh start I got:

/mnt/HD_a2 # /ffp/start/transmission.sh start
Starting transmission-daemon
cannot create /mnt/HD_a2/usb_drive/.transmission-daemon/transmission-daemon.log:
Permission denied


Anyone?

Last edited by surfing10 (2010-12-22 03:02:19)

Offline

 

#35 2010-12-22 03:24:49

surfing10
Member
Registered: 2010-08-24
Posts: 22

Re: Hibernation isn't working - I guess is the Network

Ohh and one more thing: I can create and write files using telnet or Windows SMB.
My USB is formatted as FAT32.

Offline

 

#36 2010-12-22 11:58:40

bjby
Member
Registered: 2009-02-22
Posts: 265

Re: Hibernation isn't working - I guess is the Network

/home/root reside on RAM memory. When you reset it forgets, always and forever.

If you want something to stick you need to copy it there on bootup.

Offline

 

#37 2010-12-22 13:23:55

surfing10
Member
Registered: 2010-08-24
Posts: 22

Re: Hibernation isn't working - I guess is the Network

bjby wrote:

/home/root reside on RAM memory. When you reset it forgets, always and forever.

If you want something to stick you need to copy it there on bootup.

Where is the bootup?

Offline

 

#38 2010-12-22 20:37:11

karlrado
Member
Registered: 2009-12-07
Posts: 229

Re: Hibernation isn't working - I guess is the Network

Part of the discussion needs to be how important it is to keep the files in /home/root/.transmission-daemon.

As far as I know, the dir contains things like state and log files.  If the machine reboots only very infrequently, I wouldn't worry about it.  You might have some problems with restarting partially completed torrents, etc.  But again, if that's the exception case, no big deal.

I think that if you specify all the options you want in the transmission.sh script, you don't have to worry about keeping the state file that records your options; they all get reset anyway in the transmission.sh script.

So I would suggest not worrying about it and let the /home/root/.transmission-daemon information disappear on a reboot, letting it get recreated on a restart.

The alternative is to periodically save this dir to hard disk, so it can be copied back on reboot.  But you might as well leave the dir on the hard disk if you resort to that.

Does transmission recreate the /home/root/.transmission-daemon folder by itself when you start it with transmission.sh?


DNS-323 FW 1.07 : 2 1TB WD Caviar Green SATA : fun_plug: utelnet + optware (no ffp)

Offline

 

#39 2010-12-22 22:14:42

bound4h
Member
Registered: 2010-04-12
Posts: 209

Re: Hibernation isn't working - I guess is the Network

surfing10 wrote:

OK, I have moved all the .transmission-daemon content to /home/root directory and changed the transmission.sh on the /ffp/start and everything worked fine until I reset the DNS-323.
Transmission was working but when I reset the DNS-323 (just to see what will happen) the .transmission-daemon was deleted from the /home/root folder sad I don't know why.
The free space that I have now in the /home/root is 2.9M and was fine with Transmission folder. Why it was deleted automatically? Any command that I need to execute?

Now I'll move to the USB drive until I figure it out (with you guys help) what happen with the folder inside /home/root.

UPDATE: Error from the USB drive.
After executing /ffp/start/transmission.sh start I got:

/mnt/HD_a2 # /ffp/start/transmission.sh start
Starting transmission-daemon
cannot create /mnt/HD_a2/usb_drive/.transmission-daemon/transmission-daemon.log:
Permission denied


Anyone?

Unless you move the /home/root (using one of those USBROOTPART variables in puterboy's setup.sh script and having the kernel load from the USB) to the USB, it's going to wipe it on each reboot.  You could have a script that copies it to ramdisk on reboot like this (this is smb.conf script I use in case I want to edit smb.conf to survive reboot):

if [ -e /mnt/HD_a2/smb.conf ]; then
                cp /mnt/HD_a2/smb.conf /etc/samba/smb.conf
                smb restart
        else
                cp /etc/samba/smb.conf /mnt/HD_a2/smb.conf
fi

But then, as karlrado said, you might as well just leave it on the drive.  As for the permission error, do `ls -al /mnt/HD_a2/usb_drive/` and make sure .transmission-daemon folder is writable at the global level.  drwxrwxrwx.  chmod 777 -R /mnt/HD_a2/usb_drive/.transmission-daemon would do it.

I think you're creating so much work when buying a 2GB USB stick would just solve all of this (since limited space on the 1GB USB stick is the issue) hmm

Last edited by bound4h (2010-12-22 22:16:06)

Offline

 

#40 2010-12-23 00:52:18

bjby
Member
Registered: 2009-02-22
Posts: 265

Re: Hibernation isn't working - I guess is the Network

Where is the bootup?

Simplified, it can be said to be the 'fun_plug' script (at /mnt/HD_a2/ ).

Advice:
I sense you need a good step by step guide. Surly you have a USB flash memory. Just follow the guide I linked earlier.

Offline

 

#41 2010-12-23 03:37:10

FunFiler
Member
Registered: 2010-05-23
Posts: 577

Re: Hibernation isn't working - I guess is the Network

I picked up a  number of 4GB thumb drives for $7.  Popped them into the back of the DNS323's that I have. Great for running programs, storing state files, logs, full ffp rsync every 4 hours, etc. Probably only needed a 1-2GB one, but for $7 I wasn't going to complain.


3 * (DNS-323 with 2 * 2TB) = 12TB Running FW v1.08 & FFP v0.5
Useful Links: Transmission, Transmission Remote, Automatic

Offline

 

#42 2010-12-23 04:15:20

surfing10
Member
Registered: 2010-08-24
Posts: 22

Re: Hibernation isn't working - I guess is the Network

bound4h wrote:

....
But then, as karlrado said, you might as well just leave it on the drive.  As for the permission error, do `ls -al /mnt/HD_a2/usb_drive/` and make sure .transmission-daemon folder is writable at the global level.  drwxrwxrwx.  chmod 777 -R /mnt/HD_a2/usb_drive/.transmission-daemon would do it.

I think you're creating so much work when buying a 2GB USB stick would just solve all of this (since limited space on the 1GB USB stick is the issue) hmm

Thankss bound4h !!!! That do the trick on the USB drive.
Now I have Transmission running on the USB stick.

Thanks everyone with all the help! I'll let the Transmission running on the USB stick or place in the home/root file copying the folder every time I boot the NAS-323.

Best regards and Merry Xmas to everyone!

Offline

 

#43 2010-12-23 20:59:07

thatdude
Member
Registered: 2010-12-09
Posts: 5

Re: Hibernation isn't working - I guess is the Network

Hello everyone! I been having similar problem with hibernation. The only thing I am currently running is Mediatomb and transmission. I have a DNS-321, moving the .transmission-daemon folder to a USB was not an option but I did move it to /home/root so that is working fine. The culprit in this situation is MediaTomb waking up the hardrive from hibernation, tested the network with Wireshark.

"Scan Mode" is set to none in Mediatomb web interface, so a bit dumbfounded in why it keeps waking up the harddrive from hibernation.

Any ideas in how I should go about configuring Mediatomb in web interface or shell? I was thinking in setting up "Scan Mode" to timed and have the Scan Interval (in seconds) to 86400 (24 hours). Will post back if any changes, if anyone have a better idea please share. Happy Holidays!

Last edited by thatdude (2010-12-23 22:50:37)

Offline

 

Board footer

Powered by PunBB
© Copyright 2002–2010 PunBB