QNAP NAS NO STANDBY

Discussion about hard drive spin down (standby) feature of NAS.
Post Reply
Peers
New here
Posts: 2
Joined: Sat May 05, 2012 10:43 pm

Re: QNAP NAS NO STANDBY

Post by Peers »

Hello to all,
after reading all of your posts and shutting down all services of my Qnap TS119PII (no UPNP, no Webserver, no multimediastation, no DYNDNS anymore) and many reboots, my NAS goes in standby. Now i want to know how to connect via Internet on my NAS. Does anybody knows if there is a possibilitie to use your NAS from outside your LAN via Internet in parallel with a functioning standby mode?
Thanks!!!
A-)
Starting out
Posts: 10
Joined: Fri Apr 20, 2012 6:19 am

Re: QNAP NAS NO STANDBY

Post by A-) »

Hi Peers,

Not sure if I understand what you want, but here's my two cents:

- You should now be able to start enabling stuff again, each time testing if you disks will still spin down (standby). The easiest (quick) way to test this, is to run the blkdevMonitor.sh script (available somewhere on this forum, try searching) from a SSH client (such as Putty, its free, search Google). This will spin down your disks and wait to see what, if anything, spins them up again - Very useful if diagnosing spin-down issues.

- Once you have done this, starting stuff step by step, and disabling again if it prevents spin-down, you will know better what is causing spin-down issues, and can decide if you would rather not use these services, or rather live with disks that are always spinning. If you are VERY desperate for a given service, there might be ways to prevent it from spinning up the disks, but it will likely be hardcore and difficult (for instance, Windows Networking is almost guaranteed to keep you disks spinning, but it IS possible, though not too easy, to prevent it by connecting a USB-stick/drive and changing the smbd.conf file to place the frequently accessed files on the USB-device).

- Finally you mention using your NAS "from outside your LAN". This should be relatively straightforward, a matter of opening the relevant ports on your firewall/router (or enabling UPnP on both the firewall/router and the NAS). However, depending on what you want to do with your NAS, it might very well require the disks to spin up (for instance, using the command-line via SSH will not, in itself, spin up the disks, but as soon as you execute any command that has to do with the disks, these will of course be spun up).

Here's what I've been able to do with regard to standby and using the NAS from putside the LAN:

- I've hacked Windows Networking, so it only spins up the disks if/when my shared folders are actually being used. Without the hack, it would ALWAYS keep the disks spun up, regardless of usage and regardless of configuration-setting.

- Download-station does not seem to keep my disks spinning, EVEN though it does appear to keep the network busy all the time (even, that is, when nothing is actually being downloaded) - Again, the disks WILL of course be spinning when there are active downloads or uploads in the list.

- UPnP (in itself) also does not seem to affect spin-down, though I'm not using it, so can't be 100% certain (also, UPnP might affect other services, and thus cause indirect spin-ups).

- Web-Management, WebDAV, telnet and SSH services should also be "safe" (again, depending on what you do with these services, the disks might spin up, but simply having them enabled and/or using them for things NOT related to the disks shouldn't be a problem).

- I don't know for sure about multimedia-station, since I don't use it, but I'm guessing it will keep the disks spinning, or at the very least, spin them up from time to time. The same might well be true for all other "high-level services" (ie. photostation, surveillance-station etc.)

- I've had few problems using various services from outside my LAN (from the internet), at least not with the NAS (had a bit of trouble with my router/firewall). Only thing I've tried so far, that didn't work as soon as I had the right ports open on the router, is the PPTP service. Otherwise I can access the web-interface, the download-station and even the iStat (QPKG) service from the internet (haven't tried opening ports for much else, but assume it would work as well).

Hope this helps - If I've misunderstood what you want/need, please clarify..?

Cheers,

A-)
s.m.c.
Starting out
Posts: 10
Joined: Tue Apr 24, 2012 10:13 am

Re: QNAP NAS NO STANDBY

Post by s.m.c. »

A-) wrote:Hi

I'm no expert, but here's what I know/think (guess?):

SMC:

With all those QPKG's running, I'd be surprised if your disks DID spin down. Try disabling all of them (and, possibly, most of your built-in services/servers as well), and then see if blkdevMonitor.sh can keep the disks spun down. If so, start enabling things one by one, and see when the disks no longer stay spun down...


In general:

You shouldn't expect your disks being able to stay spun down, unless you have taken care to use ONLY services/servers/packages which do NOT access ANY files on a continous basis. For starters, this will happen if "Windows Networking" (aka. SAMBA/smb/smbd) is running (see above or other similar threads in this forum for more or less elaborate fixes for this, involving moving certain files to a USB-drive).

Unfortunately, there doesn't appear to be any kind of "standard" for avoiding disk-access, such as a standardized method to move often-accessed files to a RAM-drive or solid-state-device (if not an actual/external SSD-drive, then a USB-stick or similar). As such, most unix stuff, including (I must assume) most QPKG's, will tend to cause occasional, if not frequent, disk-access. This makes it near impossible to achieve a situation where the disks stay spun down for extended periods.

[Which is why it would be SO nice, if QNAP would take a long and hard look at this issue, and try to do something about it. It should be possible to place most/all the frequently accessed system-files somewhere other than on the physical disks, be it on a USB-stick or in a RAM-drive/-buffer, in order to at least prevent the built-in software from accessing the disks all the time. I'm not sure it would be possible to provide a fix for when QPKG's are used, but perhaps their QPKG SDK might contain either some tools for, or at least some advice on how you, prevent unnecessary disk-access.]

This being said, I HAVE succeeded in achieving this situation, but the "price" is twofold: A) I have NO QPKG's running, and B) I have had to move all the smbd .lock files (etc.) onto a USB-stick (which is to say: I've modified smbd.conf to place its .lock files on /share/external/sdu1) - While the former is no problem for me, since I can live without QPKG's (which you might not?) the latter might become a problem if/when the USB-stick starts to get errors (which it will, sooner or later, since it doesn't do intelligent re-location like modern SSD-drives, and thus the NVRAM addresses which are written to all the time will wear out eventually). Please note that my fix (above in this thread) is NOT very good, in that NO safety-checking is done and it might well require re-doing every time the power has been removed. As mentioned in one of the replies here, other people have made much better fixes for this problem, which I highly recommend you check out, before trying to use my rudimentary one.

[Please also note that I'm not using very many of the built-in features, apart from having no enabled QPKG's, which might also be luxury you don't have. For starters I don't use NFS, nor anything Mac/Apple-related - Even though I do have an iPhone and an iPad, but they seem to work just fine without the Apple-specific protocols/servers running - At least for my needs. So when it comes down to it, I might just be "lucky" about what stuff I don't need versus which stuff would cause my disks to spin all the time..?]
Hi A-),

Many thanks for your response.
The main reason for my purchase of the NAS was to have all the applications I have installed constantly running in the background for various reasons, to store my media for the Boxee, and as have a central backup location etc etc.

Based your comments I disabled all the QPKG services to try and identify which application was causing the spin-up. Unfortunately I didn’t get very far, with all applications and NFS disabled the HDD still spins up after 2mins of sleep. Based on that I gave trying to identify the issue as I have very, very basic understanding of why and how these things work.

I have read numerous threads on here and have noticed the sleep/HDD spin down issue is potentially caused/or surfaced from the latest firmware issued by QNAP (i must stress, im just speculating here)

I will raise this issue with QNAP support to see what advice they may have.
Thanks, SMC
A-)
Starting out
Posts: 10
Joined: Fri Apr 20, 2012 6:19 am

Re: QNAP NAS NO STANDBY

Post by A-) »

Hi SMC,

I'm no unix-shark either - Tend to "learn by fumbling" :)

In my case, it was Windows Networking (SAMBA / smbd in unix-lingo) that was the main culprit - But few can do without this service running, and the various "fixes" for it, posted here and in other threads, tend to be involved and possibly (a little bit) risky as well.

I think, perhaps, in your case, the best bet would be to place the NAS somewhere it can't be heard (too much), and then simply disable hdd spin-down altogether (since spinning up and down every few minutes is NOT good for your drives, nor will it save energy). With hope, QNAP will provide some kind of "fix" (or at the very least, an "improvement") for this problem, when enough of us have asked for it...
Peers
New here
Posts: 2
Joined: Sat May 05, 2012 10:43 pm

Re: QNAP NAS NO STANDBY

Post by Peers »

Hello A-)
thank´s for your detailed answer. For me it is absolutely ok if the harddrive spins up, when i connect to my NAS. I don´t use my NAS every day, that´s why i would like a spin down of my hdd if i don´t use the NAS. The only app i know for my Android to connect my Nas via Internet is QMobile. This app need´s a lot of function´s to be enabled that does not support the standby mode. Do you or anybody else knows an app for android that does not disable the standby-possibility of the NAS? I would like to have a spindown if i do not use this app from outside. I need the app to open photo´s, mp3´s and so or to download some files to my Android-phone. It also should be a safe method (very hard to hack).

Thank´s!!!!
marc.garcia
Easy as a breeze
Posts: 314
Joined: Sun Aug 09, 2009 3:36 am

Re: QNAP NAS NO STANDBY

Post by marc.garcia »

A-) wrote:Hi
I'm no expert, but here's what I know/think (guess?):
you may not be an expert, but I really thank you for jumping in and trying to bring some light on this.
A-) wrote: marc.garcia:
First of all, have you removed lines from your blkdevMonitor.sh dump? I don't see the countdowns and the disk-idle commands/responses?
You got me :) I actually modified the script myself because it sort of annoyed me those countdown lines all around (I've extensively used blkdevMonitor and got fed up with that)
A-) wrote:(even though I can't see any line(s) saying it "dirtied" any nodes?).

well, I must say I just pasted a small part of the generated output
A-) wrote: ...but I would start by (experimentally) disabling anything to do with UPnP, and see if this makes a difference...
I disabled Multimedia, Music and Photo Stations and the system spins down finally. It looks like QNAP has updated its Stations in firmware version 3.6 although they seem to not be able to evolve their applications appropriately (at least given my personal experience).

Right now, the only thing that annoys me is that with no apparent reason, java kicks in randomly (see attached log captured throughout a whole day):

Code: Select all

 drive state is:  active/idle
2012-05-04_01:22:03
java(6921): READ block 68288 on md2
java(6921): READ block 68296 on md2
java(6921): READ block 68304 on md2
java(6921): READ block 68312 on md2
java(6921): READ block 68320 on md2
java(6921): READ block 68328 on md2
java(6921): READ block 68336 on md2
java(6921): READ block 68344 on md2

---counter=1604---
 drive state is:  active/idle
2012-05-04_04:12:39
java(6921): READ block 68416 on md2
java(6921): READ block 68424 on md2
java(6921): READ block 68432 on md2
java(6921): READ block 68440 on md2
java(6921): READ block 68448 on md2
java(6921): READ block 68456 on md2
java(6921): READ block 68464 on md2
java(6921): READ block 68472 on md2
---counter=1605---

---counter=2403---
 drive state is:  active/idle
2012-05-04_07:42:47
java(6921): READ block 5784184 on md0
java(6921): READ block 5785336 on md0
java(6921): READ block 5785584 on md0
java(6921): READ block 5785832 on md0
java(6921): READ block 5786080 on md0
java(6921): READ block 5786328 on md0
java(6921): READ block 5786576 on md0
java(6921): READ block 5786824 on md0
java(6921): READ block 5787072 on md0
java(6921): READ block 5787320 on md0
---counter=2404---
 drive state is:  active/idle
---counter=4165---
2012-05-04_15:35:28
---counter=4166---
2012-05-04_15:35:44
java(6921): READ block 68672 on md2
java(6921): READ block 68680 on md2
java(6921): READ block 68688 on md2
java(6921): READ block 68696 on md2
java(6921): READ block 68704 on md2
java(6921): READ block 68712 on md2
java(6921): READ block 68720 on md2
java(6921): READ block 68728 on md2
---counter=4167---
2012-05-04_15:36:01
---counter=4168---
2012-05-04_15:36:17
---counter=4169---
I've already tuned my own crontab and modified ntp synchronization period.

Believe me, QNAP is aware of their problems as I've already reported mine to them. I've exchanged over 40 emails with them so far, but it is extremely complicated to make them understand that if they indicate that their systems do spin down, they have to check their software against their feature list.

I can understand that 3rd party qpkgs are not that polished and can prevent the system from spinning down (though being a Apple user I even find that hard to swallow), but it is a crime that they put out a new firmware with new Music Station and so on, which are qnap standard applications, and that makes their NAS devices perform inadequately considering their respective specification sheet.

Again, thanks for taking your time and sharing your experience. Well done.

Regards,
User avatar
schumaku
Guru
Posts: 43579
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: QNAP NAS NO STANDBY

Post by schumaku »

Peers wrote:The only app i know for my Android to connect my Nas via Internet is QMobile. This app need´s a lot of function´s to be enabled that does not support the standby mode.
Such as? Different from your Apple computer, this is exposing the NAS to the Internet - this is required for ie. Qmobile (and more to come) apps to commuicage to your NAS. One of many factors you commonly never have on your Apple computer, right? Mind you are operating a server, that can be reached by each an every Internet user, script kiddie, port-scanne,r serivce-detector, search engine, ...
marc.garcia wrote:but it is a crime that they put out a new firmware with new Music Station and so on, which are qnap standard applications, and that makes their NAS devices perform inadequately considering their respective specification sheet.
Musictation and PhotoStation are, just like MSV2, ypical Web applications. When you want to reach these from the Internet - for you, for your family, for your friends, or for your mobile devices - so the door must be accessible. Anybody out there can ring the door bell and see if there is somebody home - or for example the Web server is listening.

A crime? What a nonense! Every computer - no matter if a WIndows or OS X box with power management enabled, has a config option to spin-down the HDD - when the system does permit.

Java? QNAP does neither provide Java with the firmware nor any Java pplications as part of the firmware.

Just like with any computer: When no process is accessing the HDD, it does spin-down after the defined time from the last access. When the storage is required again, it spins up.

I have nowhere seen that much whining about HDD spin-down than on a NAS. Why? Because of the user expectations are simply wrong when it comes to operate a BitTorrent system (Download Station... "I don't download anything"), or ie. a (Web) server ("...when I don't access it from Qmobile...").

Calm down, and try to understand the full picture.
A-)
Starting out
Posts: 10
Joined: Fri Apr 20, 2012 6:19 am

Re: QNAP NAS NO STANDBY

Post by A-) »

Hi Everybody,

A few comments to your latest posts (not that they were neccessarily intended for me, but hey, hasn't stopped me so far ;)...


Mark.garcia:

Glad you found my rants informative. In my experience too, even the slightest use of Java will tend to generate a lot of frequent disk-access. I'm guessing it must be some of your QPKG's that are using Java (at least I'm not aware of any "standard function/service" that will use Java all by itself; maybe multimedia staytion?)

All (most of?) the "stations" (photo, music, multimedia etc.), with the possible exception of download-station, will at the very least cause occasional "media-scans" to occur, which will certainly wake the disks. Might even be one of these using Java..? (Can't be sure, because I quickly disabled all these).

While I might not use the word "crime", I fully agree with you, that it is no good to claim "power saving" (or whatever actual words?) as a feature, without at least making sure that all the built-in stuff can be enabled (but more or less "idle" of course) without preventing such a feature from ever kicking in. In my view, that's a bit like selling a car as being "low-emission", and then it turns out that it is only if you leave it switched off in your garage, but when you actually turn on the engine in order to drive the car, it pollutes a lot..?!?

I haven't gotten around to experiment with either ntp or crontab (yet - only had my QNAP for two-three weeks), so can't conment on that.


Peers:

I don't know about Android Apps. (being an iPhone owner), but I'm sure there are loads of Apps. for the various "standard means of access" (ie. WebDAV for file/media handling, DLNA/UPnP for media-playback etc.) that you could try. Otherwise there is always the built-in web-interfaces. In any case, the disks will most likely spin up as soon as you use any such "means of access", which I hope you are prepared for, but they might work without needing services that keep rhe disks spinning at all times..?

Of course, if you expect to go whole days between using your NAS, it might be a simple solution to shut the NAS down manually (via web-interface or telnet/SSH), and then use WOL (Wake-On-LAN) to start it remotely (if you can't find a WOL App. for Android that works through your router, you can get a router, or perhaps jailbreak your existing, that supports WOL through its web-interface / telnet). This way you can decide completely when the disks are spinning, at the price of having to shut down the whole NAS whenever you want to "powersave".


Schumaku:

Perhaps someone else should calm down a bit? I don't know if you are aware of it, but you actually come off as being quite a bit more "agitated", than the person(s?) you ask to calm down.

Also, you are incorrect in some things (if I understand you correctly?) - Merely because you make it possible to access your NAS from the internet, does NOT (neccessarily) mean that "anyone can ring the doorbell", as you so poetically put it. There are many ways to prevent this, starting with making the router/firewall only grant access to certain IP/MAC-addresses. Even if "anybody" (on the internet) can ring the bell, the NAS typically will NOT need to spin the disks up for this - some caching/buffering IS being done after all, so typically you would need to actually load a page (that isn't shown frequently) and/or add a download-task to the download-manager before the disks will be spun up (possibly accessing its web-interface is enough to wake the disks, but with no tasks they should spin down again after the timeout).

Nor is it correct (if that is what you are saying?) that BitTorrent and/or the web-server will keep the disks spinning. I use both (AND from the internet too), and neither will spin-up the disks when not in "active use" (and nobody but me, or persons I've allowed, can make that happen from outside my firewall).

Overall you make it sound as if it is crazy (or wrong?) to make it possible to access ones NAS from the internet, or at least that doing so will somehow "expose" you NAS and/or LAN to "hackers and script-kiddies". All aside from the fact that most NAS devices in the world (only a few of which are privately owned btw.) have at least some internet connectivity, it is quite simple, especially nowadays, to guard against such unwanted access, without preventing "legal users" from accessing what they should be allowed to - With a modern internet-router, it can be as simple as enabling UPnP on both devices and disabling guest-access on the NAS - Voila, everything is available on the internet, but only to those who know the 256-bit encrypted password(s)..! In fact, most NAS producers in general, and QNAP in particular, goes to great extents in order to make it possible to selectively decide what, if anything, can be accessed by whom and "where" (ie. LAN and/or internet etc.) So simply chosing to allow certain features to be accessible through the internet, does not automatically mean the whole NAS is suddenly available for "cyber-attacks", nor that one need to behave as if "operating a server" (though I will admit that it helps to have some understanding of internet security, before starting to expose things on the public network).

... So maybe you should'nt be so quick to ask others to "get the full picture", when it turns out that your own view, while possibly "full"(er than theirs?), isn't quite correct in all the details..?
User avatar
schumaku
Guru
Posts: 43579
Joined: Mon Jan 21, 2008 4:41 pm
Location: Kloten (Zurich), Switzerland -- Skype: schumaku
Contact:

Re: QNAP NAS NO STANDBY

Post by schumaku »

The MAC address is rather useless on a non-direct attached network ... so it's prolly more the far end IP address you are talking of. Of course you can manually manage and allow access for your actual address, or for sake the public IP of grandma's Internet connection, an often changing 3G/4G IP, ...

Of course, you can hide anything behind an access control hosted on the router before gaining access to the NAS. Won't be very useful considering the way BitTorrent works (with sharing ot _everyone_, except of a blockinglist probably), I don't ask on how these clients take the additonal hurdle - but that's a different story.

When it comes to any kind of general available service, like a Web server, you expect the default Web page - probably a dynamically created page with the help of PHP and from a MySQL database holding the content can be cached? Last but least, the logs that most want to get written. Nie dream, I must admit.

Now, if you don't expose the NAS direct ... there is nothing that makes it spin-up from that end.

Look: I don't care if you want to make the first price of bringing the HDD to spin-down and keep them down as long as possible.. Should you still have Java active there- no, it's not part of the QNAP firmware at all. Of course, you can fiddle away any QNAP predefined jobs - some exist for good reasons, others are disputable. Some are required, some are indeed just to prepare the media data for better presentation (indexing, thumbnailing, ...).

Good luck!
marc.garcia
Easy as a breeze
Posts: 314
Joined: Sun Aug 09, 2009 3:36 am

Re: QNAP NAS NO STANDBY

Post by marc.garcia »

A-) wrote:All (most of?) the "stations" (photo, music, multimedia etc.), with the possible exception of download-station, will at the very least cause occasional "media-scans" to occur, which will certainly wake the disks. Might even be one of these using Java..? (Can't be sure, because I quickly disabled all these).
I just got an answer from QNAP today. They say
Dear Marc,
The djmount will keep monitoring the media files in the NAS to provide the streaming in time. Hence, it costs memory to do this and the memory could be swap in/out to disk, that why you saw the djmount access device md2 -- the swap disk. Until we find out a method to avoid this, I'm afraid you have to stand it if you want to use the Music Station. Sorry for that.
A-) wrote:While I might not use the word "crime", I fully agree with you, that it is no good to claim "power saving" (or whatever actual words?) as a feature, without at least making sure that all the built-in stuff can be enabled (but more or less "idle" of course) without preventing such a feature from ever kicking in. In my view, that's a bit like selling a car as being "low-emission", and then it turns out that it is only if you leave it switched off in your garage, but when you actually turn on the engine in order to drive the car, it pollutes a lot..?!?
Hell yeah, if you indicate stand-by works, why do you put out a revision of one of your own apps (Music station is brand new in 3.6 I think) if it goes against what you specifically indicate as a feature??
A-) wrote:I haven't gotten around to experiment with either ntp or crontab (yet - only had my QNAP for two-three weeks), so can't conment on that.
I tried to PM you with some details but it looks like you did not allow for others to contact you.
A-) wrote: With a modern internet-router, it can be as simple as enabling UPnP on both devices and disabling guest-access on the NAS - Voila,

I have read that UPnP is not such a good idea (insecure??) ... maybe you have a different take on it that you could share? disable guest access... where exactly? in the shares?
A-) wrote:everything is available on the internet, but only to those who know the 256-bit encrypted password(s)..
256-bit encryption for passwords? I take it you are referring to 256-bit SSL encryption of user passwords, right? I wish longer passwords were accepted TBH.
A-) wrote:! In fact, most NAS producers in general, and QNAP in particular, goes to great extents in order to make it possible to selectively decide what, if anything, can be accessed by whom and "where" (ie. LAN and/or internet etc.)
Even though I've been a qnap user for years, I'm afraid I can't do that unless I don't fumble around with command line unix commands (which I tend to avoid as much as I can)... Maybe you could comment on this as well?

Interesting topic with cool stuff!! cheers!!
marc.garcia
Easy as a breeze
Posts: 314
Joined: Sun Aug 09, 2009 3:36 am

Re: QNAP NAS NO STANDBY

Post by marc.garcia »

marc.garcia wrote:
A-) wrote:I haven't gotten around to experiment with either ntp or crontab (yet - only had my QNAP for two-three weeks), so can't conment on that.
I tried to PM you with some details but it looks like you did not allow for others to contact you.
A-) wrote: With a modern internet-router, it can be as simple as enabling UPnP on both devices and disabling guest-access on the NAS - Voila,
Hello there,

I'm extremely happy now that my NAS has not spun up for the last 24h, over which I decided not to use my NAS at all (no networking device has been activated while monitoring its activity). As I indicated before, I'm on 3.6.1 and I have modified the default crontab in order to perform scheduled tasks on Sunday evening (seizing the fact that I usually use my NAS extensively over the weekend) and also modified ntp syncing frequency.

Regards,
Post Reply

Return to “HDD Spin Down (HDD Standby)”