General NAS-Central Forums

Welcome to the NAS community
It is currently Wed Feb 21, 2018 1:38 pm

All times are UTC




Post new topic Reply to topic  [ 13 posts ] 
Author Message
PostPosted: Wed Jan 10, 2018 7:46 pm 
Offline

Joined: Thu Jan 04, 2018 4:14 pm
Posts: 10
I recently updated Serviio on my Zyxel NSA325V2 from version 1.52 to version 1.9. I now noticed that my drives will no longer sleep after the prescribed time and stay active as long as serviio process is running. The strange thing is that with version 1.52 of Serviio, I didn't have this problem. If I stop Serviio the unit sleeps after the prescribed time. I have all updating in Serviio shut off but the problem persists. Can anyone help me out on this?

It seems to do the same thing with Twonky but I normally keep Twonky disabled.

Here is what I am seeing with Serviio enabled.

Code:
cat /proc/d_suspdtime


The results are:
Code:
SuspendingTime = 10
Disk0: ACTIVE
Disk1: ACTIVE


The disks never go to INACTIVE so they never go to STANDBY

Code:
root:~# lsof /mnt/HD_a2 | grep i-data
httpd     9415  nobody    5w   REG    9,0   138295 102368995 /i-data/0365a9f9/.system/zyxelFrameworkLog
httpd     9415  nobody   10w   REG    9,0   138295 102368995 /i-data/0365a9f9/.system/zyxelFrameworkLog
dservice 22638    root    2w   REG    9,0   749413 102368990 /i-data/0365a9f9/.system/storage.txt
dservice 22638    root   13u   REG    9,0     3072 102368992 /i-data/0365a9f9/.system/dservice.db
smbd     25902    root  cwd    DIR    9,0     4096 110231553 /i-data/0365a9f9/public
smbd     25903    root  cwd    DIR    9,0     4096  15859713 /i-data/0365a9f9/video
smbd     25904    root  cwd    DIR    9,0     4096  69206017 /i-data/0365a9f9/photo
smbd     25905    root  cwd    DIR    9,0     4096 184942593 /i-data/0365a9f9/music
smbd     25906    root  cwd    DIR    9,0     4096  45744129 /i-data/0365a9f9/admin
smbd     25907    root  cwd    DIR    9,0     4096 114691595 /i-data/0365a9f9/.system/autoshare_sata/Volume1


Can anyone help me out on this?

_________________
Doug


Last edited by Lonewolf54 on Sun Jan 14, 2018 9:33 pm, edited 1 time in total.

Top
 Profile  
 
PostPosted: Wed Jan 10, 2018 8:16 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2361
I guess that dservice stands for firmware download service. Try to disable it temporary.
As for Serviio, it's hard to advise something without regular using of it. Does
Code:
lsof /i-data | grep serviio
returns anything?
P.S. Take a look here:
http://forum.serviio.org/viewtopic.php?f=5&t=24044
On ffp serviio logs are located in /ffp/opt/serviio/log dir.
and here:
http://www.serviio.org/forum/viewtopic.php?f=5&t=23944
https://bitbucket.org/xnejp03/serviio/issues/1026/userdataupdater-waking-up-nas
Seems like a bug in Serviio, which is planned to be resolved in 1.9.1.
Or you can try to fix yourself line serviio developer recommended in post:
http://forum.serviio.org/viewtopic.php?f=5&t=24044#p115340
Stop serviio daemon service before editing and start it after.


Top
 Profile  
 
PostPosted: Wed Jan 10, 2018 11:34 pm 
Offline

Joined: Thu Jan 04, 2018 4:14 pm
Posts: 10
barmalej2 wrote:
I guess that dservice stands for firmware download service. Try to disable it temporary.
As for Serviio, it's hard to advise something without regular using of it. Does
Code:
lsof /i-data | grep serviio
returns anything?

Running this code returns nothing which is what is expected, right?

Yes, the "dservice" is the firmware download service and shutting it down does not help.

I read all the posts you listed and added the "fix" but it did not help. Those issues seem to have the problem that their NAS boxes go to standby but keep coming out every hour or so. My issue is that the disks go "active" as soon as Serviio or Twonky are activated and then never go "not active". Well, I guess I should not say never, as I have caught a momentary "not active" but it only lasts a few seconds before going back to "active". The weird part is that Twonky does the same thing. Is there any other way to see what is causing the drives to stay "active" anytime a media server is enabled?

_________________
Doug


Top
 Profile  
 
PostPosted: Thu Jan 11, 2018 8:34 am 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2361
If you activated Twonky even once and disabled after, it can be a coolprit of current problem. Twonky on zyxel's has known issue to continue working (scanner? still running) even it is disabled. This is a short output of inotifywait utility on my NSA310:
Quote:
/i-data/md0/.media/twonkymedia/db/ ACCESS 11.tms.dat
/i-data/md0/.media/twonkymedia/db/ ACCESS 11.tms.dat
/i-data/md0/.media/twonkymedia/db/ ACCESS 11.tms.dat
/i-data/md0/.media/twonkymedia/db/ ACCESS 11.tms.dat
/i-data/md0/.media/twonkymedia/db/ ACCESS 11.tms.dat
/i-data/md0/.media/twonkymedia/db/ ACCESS 11.tms.dat
/i-data/md0/.media/twonkymedia/db/ ACCESS 11.tms.dat
/i-data/md0/.media/twonkymedia/db/ ACCESS 11.tms.dat
/i-data/md0/.media/twonkymedia/db/ ACCESS 11.tms.dat
/i-data/md0/.media/twonkymedia/db/ ACCESS 11.tms.dat
/i-data/md0/.media/twonkymedia/db/ ACCESS 11.tms.dat
/i-data/md0/.media/twonkymedia/db/ ACCESS 11.tms.dat
/i-data/md0/.media/twonkymedia/db/ ACCESS 11.tms.dat
/i-data/md0/.media/twonkymedia/db/ ACCESS 11.tms.dat
/i-data/md0/.media/twonkymedia/db/ ACCESS 11.tms.dat
/i-data/md0/.media/twonkymedia/db/ ACCESS 11.tms.dat
/i-data/md0/.media/twonkymedia/db/ ACCESS 11.tms.dat

Mijzelf has cool Tweaks package (zypkg-zyxel package), which is available after MetaRepository install:
http://zyxel.nas-central.org/wiki/3rd_party_zypkgs#MetaRepository
http://zyxel.nas-central.org/wiki/3rd_party_zypkgs#Tweaks
Particularly you should be interested in these tweaks:
http://zyxel.nas-central.org/wiki/3rd_party_zypkgs#Disk_monitor
http://zyxel.nas-central.org/wiki/3rd_party_zypkgs#Disable_unneeded_daemons

There is a handy linux utility iotop, but unfortunately it will not run on zyxel's due to missing kernel configuration options enabled:
Quote:
Could not run iotop as some of the requirements are not met:
- Linux >= 2.6.20 with
- I/O accounting support (CONFIG_TASKSTATS, CONFIG_TASK_DELAY_ACCT, CONFIG_TASK_IO_ACCOUNTING)


If you want to track, what files and directories are accessed on HDD, when you can use inotifywait utility for monitoring:
Code:
slacker -a mz:inotify_tools

# Increase max_user_watches if you have a lot files and dirs on HDD
Code:
echo 500000 > /proc/sys/fs/inotify/max_user_watches

Code:
inotifywait -rmdo /root/monitorHDD.log --format '%T %e %w/%f' --timefmt '%Y.%m.%d %H:%M:%S' /i-data/md0
It takes time (up to several minutes) for inotifywait to set up watches on HDD recursively.
That can give some info as well, but it doesn't shows what is accessing and modifying files or directories.

To stop monitoring:
Code:
pkill inotifywait


Top
 Profile  
 
PostPosted: Thu Jan 11, 2018 2:44 pm 
Offline

Joined: Thu Jan 04, 2018 4:14 pm
Posts: 10
OK, I'll give it a shot. Today is busy but I'll check this out tomorrow and see what I find and report back. I have tried out Twonky a few times since it got updated in the latest firmware update I installed before updating Serviio. Perhaps this is what I will find but it seems strange that killing Serviio (with Twonky disabled as well) stops the activity. Thanks for your assistance!!

_________________
Doug


Top
 Profile  
 
PostPosted: Fri Jan 12, 2018 5:59 pm 
Offline

Joined: Thu Jan 04, 2018 4:14 pm
Posts: 10
OK, here is what I think is keeping the disks running. The disk accesses noted in the log stop as soon as I stop Serviio and the disks go "not active".

    ==== Fri Jan 12 12:43:05 EST 2018 ====
    kjournald2(1596): WRITE block 3905183064 on md0
    md0_raid1(1579): WRITE block 8 on sda2
    md0_raid1(1579): WRITE block 8 on sdb2
    kjournald2(1596): WRITE block 3905183072 on md0
    kjournald2(1596): WRITE block 3905183080 on md0
    md0_raid1(1579): WRITE block 8 on sda2
    md0_raid1(1579): WRITE block 8 on sdb2
    pdflush(170): WRITE block 3670018200 on md0
    md0_raid1(1579): WRITE block 8 on sda2
    md0_raid1(1579): WRITE block 8 on sdb2
    md0_raid1(1579): WRITE block 8 on sda2
    md0_raid1(1579): WRITE block 8 on sdb2
    java(13188): dirtied inode 114691904 (.userRootModFile.serviio) on md0
    kjournald2(1596): WRITE block 3905183088 on md0
    md0_raid1(1579): WRITE block 8 on sda2
    md0_raid1(1579): WRITE block 8 on sdb2
    kjournald2(1596): WRITE block 3905183096 on md0
    kjournald2(1596): WRITE block 3905183104 on md0
    md0_raid1(1579): WRITE block 8 on sda2
    md0_raid1(1579): WRITE block 8 on sdb2
    ==== Fri Jan 12 12:44:04 EST 2018 ====
    kjournald2(1596): WRITE block 3905183112 on md0
    md0_raid1(1579): WRITE block 8 on sda2
    md0_raid1(1579): WRITE block 8 on sdb2
    kjournald2(1596): WRITE block 3905183120 on md0
    kjournald2(1596): WRITE block 3905183128 on md0
    md0_raid1(1579): WRITE block 8 on sda2
    md0_raid1(1579): WRITE block 8 on sdb2
    pdflush(170): WRITE block 3670018200 on md0
    md0_raid1(1579): WRITE block 8 on sda2
    md0_raid1(1579): WRITE block 8 on sdb2
    md0_raid1(1579): WRITE block 8 on sda2
    md0_raid1(1579): WRITE block 8 on sdb2
    java(13188): dirtied inode 114691904 (.userRootModFile.serviio) on md0
    kjournald2(1596): WRITE block 3905183136 on md0
    md0_raid1(1579): WRITE block 8 on sda2
    md0_raid1(1579): WRITE block 8 on sdb2
    kjournald2(1596): WRITE block 3905183144 on md0
    kjournald2(1596): WRITE block 3905183152 on md0
    md0_raid1(1579): WRITE block 8 on sda2
    md0_raid1(1579): WRITE block 8 on sdb2
    Logging stopped : Fri Jan 12 12:44:46 EST 2018

Does that make any sense that Serviio is causing this?

_________________
Doug


Top
 Profile  
 
PostPosted: Fri Jan 12, 2018 8:51 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2361
I think so. Not sure what else you wanted to find out. Imo, it should be more interesting to track, what files and folders Serviio is accesing on disk with inotify_wait.


Top
 Profile  
 
PostPosted: Fri Jan 12, 2018 9:10 pm 
Offline

Joined: Thu Jan 04, 2018 4:14 pm
Posts: 10
Doing that now. I'll post results in a moment or two.

_________________
Doug


Top
 Profile  
 
PostPosted: Sat Jan 13, 2018 7:40 pm 
Offline

Joined: Thu Jan 04, 2018 4:14 pm
Posts: 10
OK, I reran inotifywait again this time with all the options you suggested (I missed some the first time) and found something interesting. For some reason, Serviio is opening and closing files every 30 seconds it seems and I don't know why. Here is what it is doing with two 30 second examples listed.

Quote:
018_01_13 19:23:31 OPEN,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio//plugins
2018_01_13 19:23:31 OPEN,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio/plugins//
2018_01_13 19:23:31 CLOSE_NOWRITE,CLOSE,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio//plugins
2018_01_13 19:23:31 CLOSE_NOWRITE,CLOSE,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio/plugins//
2018_01_13 19:23:41 OPEN,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio//plugins
2018_01_13 19:23:41 OPEN,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio/plugins//
2018_01_13 19:23:41 CLOSE_NOWRITE,CLOSE,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio//plugins
2018_01_13 19:23:41 CLOSE_NOWRITE,CLOSE,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio/plugins//
2018_01_13 19:23:51 OPEN,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio//plugins
2018_01_13 19:23:51 OPEN,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio/plugins//
2018_01_13 19:23:51 CLOSE_NOWRITE,CLOSE,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio//plugins
2018_01_13 19:23:51 CLOSE_NOWRITE,CLOSE,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio/plugins//
2018_01_13 19:23:55 OPEN /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio/.java/.userPrefs//.user.lock.serviio
2018_01_13 19:23:55 ATTRIB /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio/.java/.userPrefs//.userRootModFile.serviio
2018_01_13 19:23:55 CLOSE_WRITE,CLOSE /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio/.java/.userPrefs//.user.lock.serviio
2018_01_13 19:24:01 OPEN,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio//plugins
2018_01_13 19:24:01 OPEN,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio/plugins//
2018_01_13 19:24:01 CLOSE_NOWRITE,CLOSE,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio//plugins
2018_01_13 19:24:01 CLOSE_NOWRITE,CLOSE,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio/plugins//
2018_01_13 19:24:11 OPEN,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio//plugins
2018_01_13 19:24:11 OPEN,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio/plugins//
2018_01_13 19:24:11 CLOSE_NOWRITE,CLOSE,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio//plugins
2018_01_13 19:24:11 CLOSE_NOWRITE,CLOSE,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio/plugins//
2018_01_13 19:24:21 OPEN,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio//plugins
2018_01_13 19:24:21 OPEN,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio/plugins//
2018_01_13 19:24:21 CLOSE_NOWRITE,CLOSE,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio//plugins
2018_01_13 19:24:21 CLOSE_NOWRITE,CLOSE,ISDIR /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio/plugins//
2018_01_13 19:24:25 OPEN /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio/.java/.userPrefs//.user.lock.serviio
2018_01_13 19:24:25 ATTRIB /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio/.java/.userPrefs//.userRootModFile.serviio
2018_01_13 19:24:25 CLOSE_WRITE,CLOSE /i-data/md0/.system/zy-pkgs/ffproot/ffp/opt/serviio/.java/.userPrefs//.user.lock.serviio


I have posted this in the Serviio forum but so far nothing from Zip. Any help here if possible would be appreciated.

_________________
Doug


Top
 Profile  
 
PostPosted: Sat Jan 13, 2018 9:35 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2361
I found this log much more interesting, but it is too short. From mine point view:
stop all unnecessary ffp services including serviio, except sshd. Remove all serviio logs inside /ffp/opt/serviio/log dir and then start inotifywait service as described above. Start serviio service after several minutes. Then let run both services at least for 30 min., upload somewhere inotifywait logs for review and save serviio logs for Serviio developer.


Top
 Profile  
 
PostPosted: Sun Jan 14, 2018 8:07 am 
Offline

Joined: Sun Mar 31, 2013 10:07 am
Posts: 69
I've replied over on serviio.org but there's probably a couple of system properties Lonewolf54 can try.
Code:
-Dplugins.check=false -Djava.util.prefs.syncInterval=86400
I've had them in my JAVA_OPTS for a few years and haven't caused me any issues. The only problem is that you need to restart serviio if you add or update a plugin but that isn't a frequent requirement (I am guessing).


Top
 Profile  
 
PostPosted: Sun Jan 14, 2018 6:44 pm 
Offline

Joined: Sun Apr 29, 2012 5:24 pm
Posts: 2361
Good catch Normsland. Seems like you have found solution for Lonewolf54 and those, who have ffp installed on HDD (zypkg version). I wasn't able to reproduce issue, since my ffp is on USB stick. Related info as well:
https://stackoverflow.com/questions/17376200/java-util-preferences-constantly-accesses-disk-about-every-30-secs

I will add these two options to Serviio start script with next Serviio ffp package release.


Top
 Profile  
 
PostPosted: Sun Jan 14, 2018 8:07 pm 
Offline

Joined: Thu Jan 04, 2018 4:14 pm
Posts: 10
OK, because this is for a Zyxel NSA325V2 with Barmalej2's start script, I made the changes suggested in /ffp/start/serviio.sh instead of the version located in /ffp/opt/serviio/bin/serviio.sh. And guess what? IT WORKED!!!!! :D Kudos and many thanks to Normsland and Barmalej2 (again ;) ) for your help diagnosing this issue and then solving the problem. Great!!!

_________________
Doug


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 13 posts ] 

All times are UTC


Who is online

Users browsing this forum: Baidu [Spider] and 65 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
Powered by phpBB® Forum Software © phpBB Group