General NAS-Central Forums

Welcome to the NAS community
It is currently Sun Nov 19, 2017 1:06 am

All times are UTC




Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next
Author Message
PostPosted: Mon Aug 28, 2017 8:31 am 
Offline

Joined: Mon Aug 28, 2017 8:17 am
Posts: 13
Hi all,

I'm really hoping somebody can help me out here. A friend has passed on his two year old Lenovo NAS it's a px4-400d. I have bought two 3TB WD Red's and factory reset the device set it up fresh, it's currently in RAID mode 1.

But, when the room is quiet, I can hear something which sounds like the NAS trying to access a drive, also the storage/drive indicator on the front faintly blinks every 5 seconds (exactly).

Any advice welcome.

Damon


Last edited by Damon1 on Mon Aug 28, 2017 8:40 am, edited 1 time in total.

Top
 Profile  
 
PostPosted: Mon Aug 28, 2017 8:36 am 
Offline

Joined: Mon Aug 28, 2017 8:17 am
Posts: 13
I've disabled some other features on the box, left just these active. I need Media Server for DLNA to a couple of TV's - this was on before and the sound was still there.

Image


Top
 Profile  
 
PostPosted: Mon Aug 28, 2017 9:00 am 
Offline

Joined: Mon Aug 28, 2017 8:17 am
Posts: 13
I've just checked, when the unit light blinks blue every 5 seconds the hard drives also blink white - same time, I can also hear the sound.


Top
 Profile  
 
PostPosted: Mon Aug 28, 2017 9:38 am 
Offline

Joined: Mon Aug 28, 2017 8:17 am
Posts: 13
I've got another NAS, ReadyNAS Pro (old model) with 2 x Seagate 1TB HDD's and that is silent when idle. Could it be an issue specific to WD Red's?


Top
 Profile  
 
PostPosted: Mon Aug 28, 2017 5:48 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
No. An idle disk is silent. So apparently the disk is not idle, while it should. So you'll have to find out which process is accessing the disk each 5 sec. Login over ssh, and execute top. Maybe it can tell you who's responsible.


Top
 Profile  
 
PostPosted: Mon Aug 28, 2017 8:36 pm 
Offline

Joined: Mon Aug 28, 2017 8:17 am
Posts: 13
Mijzelf wrote:
No. An idle disk is silent. So apparently the disk is not idle, while it should. So you'll have to find out which process is accessing the disk each 5 sec. Login over ssh, and execute top. Maybe it can tell you who's responsible.


Thanks for the response, I didn't know this was possible but sounds like the right direction to go. Unfortunately I can't make much sense out of the list, if possible please see if you can spot anything that could be causing the issue.

Image

Image

Image

Image

Image

Image


Top
 Profile  
 
PostPosted: Mon Aug 28, 2017 9:09 pm 
Offline

Joined: Mon Aug 28, 2017 8:17 am
Posts: 13
I've downloaded the full support logs too, if there is any particular log I can take a look at please advise, thank you :)


Top
 Profile  
 
PostPosted: Mon Aug 28, 2017 10:39 pm 
Offline

Joined: Mon Aug 28, 2017 8:17 am
Posts: 13
Code:
root@AM-STORAGE:/# vmstat 3 30
procs -----------memory---------- ---swap-- -----io---- -system-- ----cpu----
 r  b   swpd   free   buff  cache   si   so    bi    bo   in   cs us sy id wa
 0  0      0 496656  60312 1137496    0    0    40    61   62   96  1  1 98  0
 0  0      0 496252  60312 1137504    0    0     0     0  221  351  0  0 100  0
 0  0      0 496152  60320 1137504    0    0     0    14  208  211  0  0 99  0
 0  0      0 496152  60320 1137504    0    0     0     0  159  156  0  0 100  0
 0  0      0 496184  60328 1137504    0    0     0    19  188  183  0  0 100  0
 0  0      0 496184  60336 1137496    0    0     0    24  230  242  0  0 99  0
 0  0      0 496184  60336 1137504    0    0     0     0  158  148  0  0 100  0
 0  0      0 496184  60344 1137504    0    0     0    14  198  217  0  0 99  1
 0  0      0 496292  60344 1137504    0    0     0     0  186  177  0  0 100  0
 0  0      0 495928  60352 1137504    0    0     0    13  276 2429  0  2 98  0
 0  0      0 495936  60360 1137496    0    0     0    13  180  172  0  0 100  0
 0  0      0 495788  60360 1137504    0    0     0     0  172  168  0  0 100  0
 0  0      0 496184  60368 1137504    0    0     0    14  242  396  0  0 99  0
 0  0      0 496152  60368 1137504    0    0     0     0  158  154  0  0 100  0
 0  0      0 496276  60376 1137504    0    0     0    13  175  180  0  0 100  0
 0  0      0 496276  60376 1137504    0    0     0    12  212  217  0  0 99  0
 0  0      0 496276  60376 1137504    0    0     0     3  167  156  0  0 100  0
 0  0      0 496308  60384 1137504    0    0     0    13  171  162  0  0 100  0
 0  0      0 496300  60384 1137504    0    0     0     0  166  160  0  0 100  0
 0  0      0 496144  60392 1137504    0    0     0    13  180  166  0  0 100  0
 0  0      0 495524  60400 1137496    0    0     0    13  189  179  0  0 99  0
 0  0      0 494716  60400 1137504    0    0     0     0  217  223  1  0 99  0
 0  0      0 494748  60408 1137504    0    0     0    13  253  390  1  0 99  0
 0  0      0 494780  60408 1137508    0    0     0     0  170  154  0  0 100  0
 0  0      0 494656  60416 1137504    0    0     0    26  229  239  0  0 99  0
 0  0      0 496268  60416 1137508    0    0     0     0  216  219  0  0 100  0
 0  0      0 496276  60424 1137508    0    0     0    14  168  153  0  0 100  0
 0  0      0 496400  60424 1137508    0    0     0     1  194  211  0  0 100  0
 0  0      0 496152  60424 1137508    0    0     0     0  182  184  0  0 100  0
 0  0      0 495772  60432 1137508    0    0     0    13  274 2484  1  1 98  0


Top
 Profile  
 
PostPosted: Mon Aug 28, 2017 11:29 pm 
Offline

Joined: Mon Aug 28, 2017 8:17 am
Posts: 13
A short video of what's happening.

https://streamable.com/4auz1 (two cages on the left blink also the unit on the right) turn volume up.

^ that was captured whilst I set the box to power down hard drives after 5 minutes for a test, clearly something is keeping these HDD's active/up.


Top
 Profile  
 
PostPosted: Tue Aug 29, 2017 1:09 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
Sorry, from that 'top' listings I can't say who is the culprit.

Some time ago I wrote a script which logs disk activity at low level. You can try that:
Code:
#!/bin/sh

currentlog=/dev/null
cyclic=yes

InitialWait()
{
   # Sleep 5 seconds to let the disks sleep
   # Of course this can be done with a single sleep, but then you'll have to wait
   # before the pid file is cleaned up
   startdelay=$1
   minutes=0
   while [ $startdelay -gt $minutes ] ; do
      for seconds in 00 05 10 15 20 25 30 35 40 45 50 55
      do
         echo "Start delay active ${minutes}:${seconds}/$startdelay:00" >/tmp/diskmon/status
         sleep 5
      done
      let minutes=minutes+1
   done
}


Log()
{
   # Clear logbuffer and enable logging
   dmesg -c >/dev/null

   echo 1 > /proc/sys/vm/block_dump
   echo "Logging active" >/tmp/diskmon/status
   touch /tmp/diskmon/log1
   touch /tmp/diskmon/log2

        if [ -f /tmp/diskmon/logseq ] ; then
                currentlog=/tmp/diskmon/` cat /tmp/diskmon/logseq | cut -d ' ' -f 1 `
        else
                currentlog=/tmp/diskmon/log1
                echo "log1 log2" >/tmp/diskmon/logseq
        fi

        [ "$1" = "restart" ] && echo "Logging restarted : ` date `" >>${currentlog}

        local oldstamp=HHMM

        while [ -d /tmp/diskmon/ ] ; do
                sleep 1
                filesize=` du $currentlog | awk '{print $1}' `
                if [ $filesize -gt 2048 ] ; then
                        if [ "$currentlog" = "/tmp/diskmon/log1" ] ; then
                                currentlog=/tmp/diskmon/log2
                                echo "log1 log2" >/tmp/diskmon/logseq
                        else
                                currentlog=/tmp/diskmon/log1
                                echo "log2 log1" >/tmp/diskmon/logseq
                                [ "${cyclic}" = "no" ] && exit 0
                        fi
                        rm $currentlog && touch $currentlog
                fi

                dmesg -c | grep -v "proc\|rootfs\|sysfs\|tmpfs\|devpts" >/tmp/diskmon/tmp
               
                if [ ` wc -c /tmp/diskmon/tmp | cut -d ' ' -f 1 ` -gt 0 ] ; then
                        local stamp=` date +%H%M `
                        [ "$stamp" != "$oldstamp" ]  && oldstamp=$stamp && echo "==== ` date ` ====" >>${currentlog}
                        cat /tmp/diskmon/tmp >>${currentlog}
                fi
        done
}

Cleanup()
{
        echo 0 >/proc/sys/vm/block_dump
        rm /var/run/diskmon.pid
        echo "Logging stopped : ` date `" >>${currentlog}
        echo "Logging stopped" >/tmp/diskmon/status
}

Daemon()
{
   mkdir -p /tmp/diskmon
   
   echo $$ >/var/run/diskmon.pid


   trap "Cleanup" INT TERM EXIT
   InitialWait $1
   Log $2
}

Daemon $1 $2 >/dev/null 2>&1 &
Put it on your nas, and start it with
Code:
sh <script> 15
The script will wait for 15 minutes to get active, (to calm down from shell activity) and then starts logging in /tmp/diskmon/log1 en ../log2 alternating.

The log might tell you the PID of the culprit. With some luck it's not a temporary process.


Top
 Profile  
 
PostPosted: Tue Aug 29, 2017 1:57 pm 
Offline

Joined: Mon Aug 28, 2017 8:17 am
Posts: 13
Hi, thanks for helping me out.

I've put the script into a folder I know how to locate and also btw I saved the script as a .txt I hope that's ok.

Image

It seems to not like it.


Top
 Profile  
 
PostPosted: Tue Aug 29, 2017 2:52 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
The extension is not important. The problem here are the line endings. The shell needs Linux line endings, and you offered something else. Windows probably.

You need to paste the script in an editor supporting Linux line endings. For Windows that could be PsPad. In case of PsPad, before you save the script goto 'Format' and set it in Linux mode.


Top
 Profile  
 
PostPosted: Tue Aug 29, 2017 2:59 pm 
Offline

Joined: Mon Aug 28, 2017 8:17 am
Posts: 13
Mijzelf wrote:
The extension is not important. The problem here are the line endings. The shell needs Linux line endings, and you offered something else. Windows probably.

You need to paste the script in an editor supporting Linux line endings. For Windows that could be PsPad. In case of PsPad, before you save the script goto 'Format' and set it in Linux mode.


Ok, great, that's worked. I'll leave this for a couple of hours like you said and check in /tmp/diskmon ect..


Top
 Profile  
 
PostPosted: Tue Aug 29, 2017 5:14 pm 
Offline

Joined: Mon Aug 28, 2017 8:17 am
Posts: 13
Mijzelf wrote:
The extension is not important. The problem here are the line endings. The shell needs Linux line endings, and you offered something else. Windows probably.

You need to paste the script in an editor supporting Linux line endings. For Windows that could be PsPad. In case of PsPad, before you save the script goto 'Format' and set it in Linux mode.


I know I can copy that monitoring directory to somewhere where I can copy it to my PC then read it. But, any idea what I should be looking at or for? I can forward it onto you if you like, maybe it's easier? Thanks.


Top
 Profile  
 
PostPosted: Tue Aug 29, 2017 8:06 pm 
Offline

Joined: Mon Jun 16, 2008 10:45 am
Posts: 6072
Damon1 wrote:
any idea what I should be looking at or for?

You are looking for something which is accessing the disk every 5 secondes. Duh.

As nothing should be accessing the disk when idle for more than, let's say, 30 minutes, everything in the log is suspicious.


Top
 Profile  
 
Display posts from previous:  Sort by  
Post new topic Reply to topic  [ 19 posts ]  Go to page 1, 2  Next

All times are UTC


Who is online

Users browsing this forum: No registered users and 4 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:  
cron
Powered by phpBB® Forum Software © phpBB Group