It is currently Sun Nov 29, 2020 12:20 am
All times are UTC + 8 hours

mdadm constantly read/write data preventing hibernating

mdadm constantly read/write data preventing hibernating

Postby panec » Fri Oct 02, 2020 5:30 pm

My NAS is constantly reading writing data. It is 24/7.

ADM 3.5.1.R8C1
Bios 0.31/1.0023

When trying to find out the cause of the problem I dumped the diagnostic log. It is full of those entries:

Code: Select all
01/10/2020 16:21   mdadm   Storage Management Tools   Volume1   READ
01/10/2020 16:21   mdadm   Storage Management Tools   Volume1   WRITE
01/10/2020 16:21   mdadm   Storage Management Tools   Volume1   READ
01/10/2020 16:21   mdadm   Storage Management Tools   Volume1   WRITE
01/10/2020 16:21   mdadm   Storage Management Tools   Volume1   READ
01/10/2020 16:20   mdadm   Storage Management Tools   Volume1   WRITE
01/10/2020 16:20   mdadm   Storage Management Tools   Volume1   READ
01/10/2020 16:20   mdadm   Storage Management Tools   Volume1   WRITE
01/10/2020 16:20   mdadm   Storage Management Tools   Volume1   READ
01/10/2020 16:19   mdadm   Storage Management Tools   Volume1   WRITE


I tried to see what might be the issue, but it is beyond my knowledge level. Below I attach some of the info about my mdamd process

Code: Select all
root@AS-302T-F4E0:/volume1/.@root # cat /proc/mdstat
Personalities : [linear] [raid0] [raid1] [raid10] [raid6] [raid5] [raid4]
md1 : active raid1 sdb4[2] sda4[3]
      3902560064 blocks super 1.2 [2/2] [UU]
     
md126 : active raid1 sdb3[0] sda3[2]
      2095104 blocks super 1.2 [2/2] [UU]
     
md0 : active raid1 sdb2[3] sda2[2]
      2096064 blocks super 1.2 [2/2] [UU]


What I'm finding odd is that I have 3 active raids?

Code: Select all
root@AS-302T-F4E0:/volume1/.@root # sudo mdadm --detail /dev/md1
/dev/md1:
        Version : 1.2
  Creation Time : Wed Feb  1 20:39:15 2017
     Raid Level : raid1
     Array Size : 3902560064 (3721.77 GiB 3996.22 GB)
  Used Dev Size : 3902560064 (3721.77 GiB 3996.22 GB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

    Update Time : Thu Oct  1 15:04:14 2020
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           Name : AS-302T-F4E0:1  (local to host AS-302T-F4E0)
           UUID : 9d78946a:d536d508:1080b8aa:445f8ba7
         Events : 365248

    Number   Major   Minor   RaidDevice State
       2       8       20        0      active sync   /dev/sdb4
       3       8        4        1      active sync   /dev/sda4


Code: Select all
root@AS-302T-F4E0:/volume1/.@root # sudo mdadm --detail /dev/md126
/dev/md126:
        Version : 1.2
  Creation Time : Wed Apr  1 18:51:42 2020
     Raid Level : raid1
     Array Size : 2095104 (2046.34 MiB 2145.39 MB)
  Used Dev Size : 2095104 (2046.34 MiB 2145.39 MB)
   Raid Devices : 2
  Total Devices : 2
    Persistence : Superblock is persistent

    Update Time : Wed Sep 30 16:33:59 2020
          State : clean
 Active Devices : 2
Working Devices : 2
 Failed Devices : 0
  Spare Devices : 0

           Name : AS-302T-F4E0:126  (local to host AS-302T-F4E0)
           UUID : 5ceeb217:a889bd81:474760b5:0185eb86
         Events : 2211

    Number   Major   Minor   RaidDevice State
       0       8       19        0      active sync   /dev/sdb3
       2       8        3        1      active sync   /dev/sda3


My raid should consist 2x4TB HDD - why do I have the additional ones?

It seems that it should not be doing anything, but it does:

Code: Select all
root@AS-302T-F4E0:/volume1/.@root # grep . /sys/block/*/md/sync_action
/sys/block/md0/md/sync_action:idle
/sys/block/md1/md/sync_action:idle
/sys/block/md126/md/sync_action:idle


The most important question is - what the mdadm process is doing and how I can stop it?
panec
 
Posts: 3
Joined: Fri Oct 02, 2020 4:42 pm

Re: mdadm constantly read/write data preventing hibernating

Postby Nazar78 » Fri Oct 02, 2020 8:06 pm

What I'm finding odd is that I have 3 active raids?

My raid should consist 2x4TB HDD - why do I have the additional ones?

md0 = system volume, the 2nd 2GB partitions of the harddisks.
md1 = data volume, the 4th remaining space partitions of the harddisks.
md126 = swap volume, the 3rd 2GB partitions of the harddisks.

I don't have this issue but did you transferred huge amount of data recently and if the NAS is relatively new? Also to take into account what has been installed. I can't really vouch for this diagnostic log accuracy because mdadm doesn't run persistently or does it for your case? Check the process list. Usually I would debug with other tools such as
iostat and strace. Perhaps you should open a ticket with Asustor support for better analysis.
AS5304T - 16GB DDR4 - [40TB N300 RAID10 + 5 Bay USB: 8TB RAID5 & 480GB SSD for Apps]
User avatar
Nazar78
 
Posts: 197
Joined: Wed Jul 17, 2019 10:21 pm
Location: Singapore

Re: mdadm constantly read/write data preventing hibernating

Postby panec » Tue Oct 06, 2020 7:39 pm

Thank you for your explanation.

I did some more test and in my case enabling CIFS/Samba leads to excessive disk read write. Logging everything shows this activity:

Code: Select all
[2020/10/05 22:39:58.733081,  0, pid=29039, effective(0, 0), real(0, 0)] ../source3/printing/print_standard.c:69(std_pcap_cache_reload)
  Unable to open printcap file /etc/printcap for read!
[2020/10/05 22:40:32.246864,  2, pid=29076, effective(0, 0), real(0, 0)] ../source3/nmbd/nmbd_elections.c:41(send_election_dgram)
  send_election_dgram: Sending election packet for workgroup WORKGROUP on subnet 192.168.1.128
[2020/10/05 22:45:36.764030,  2, pid=29076, effective(0, 0), real(0, 0)] ../source3/nmbd/nmbd_elections.c:41(send_election_dgram)
  send_election_dgram: Sending election packet for workgroup WORKGROUP on subnet 192.168.1.128
[2020/10/05 22:50:41.211987,  2, pid=29076, effective(0, 0), real(0, 0)] ../source3/nmbd/nmbd_elections.c:41(send_election_dgram)
  send_election_dgram: Sending election packet for workgroup WORKGROUP on subnet 192.168.1.128
[2020/10/05 22:52:59.566372,  0, pid=29039, effective(0, 0), real(0, 0)] ../source3/printing/print_standard.c:69(std_pcap_cache_reload)
  Unable to open printcap file /etc/printcap for read!
[2020/10/05 22:54:30.063275,  2, pid=29021, effective(0, 0), real(0, 0)] ../source3/smbd/server.c:576(remove_child_pid)
  Could not find child 13195 -- ignoring
[2020/10/05 22:55:42.872138,  2, pid=29076, effective(0, 0), real(0, 0)] ../source3/nmbd/nmbd_elections.c:41(send_election_dgram)
  send_election_dgram: Sending election packet for workgroup WORKGROUP on subnet 192.168.1.128
[2020/10/05 23:00:47.839049,  2, pid=29076, effective(0, 0), real(0, 0)] ../source3/nmbd/nmbd_elections.c:41(send_election_dgram)
  send_election_dgram: Sending election packet for workgroup WORKGROUP on subnet 192.168.1.128
[2020/10/05 23:05:52.311074,  2, pid=29076, effective(0, 0), real(0, 0)] ../source3/nmbd/nmbd_elections.c:41(send_election_dgram)
  send_election_dgram: Sending election packet for workgroup WORKGROUP on subnet 192.168.1.128


192.168.1.128 is IP of my NAS. Currently I'm trying to figure out why it is doing what is doing, and why is triggers constant read/write on mdadm as the event of "send_election_dgram" is happening every 5 min and is there (probably) because I set log level to Full Log (debug)
panec
 
Posts: 3
Joined: Fri Oct 02, 2020 4:42 pm

Re: mdadm constantly read/write data preventing hibernating

Postby ilike2burnthing » Tue Oct 06, 2020 9:33 pm

Log level 2 or higher causes this. Drop logging down from debug and it should stop.

Code: Select all
DEBUG(2,("send_election_dgram: Sending election packet for workgroup %s on subnet %s\n",
workgroup_name, subrec->subnet_name ));

https://opensource.apple.com/source/sam ... .auto.html
ilike2burnthing
 
Posts: 130
Joined: Thu Apr 09, 2020 8:01 pm

Return to [Official] For AS-30X Series

  • 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
  • Who is online

    Users browsing this forum: No registered users and 1 guest

cron