Welcome! Log In Create A New Profile

Advanced

Zyxel NAS326 Installation Instruction

Posted by bodhi 
Re: Zyxel NAS326 Installation Instruction
September 01, 2022 03:11PM
IIRC, there is extra no internal port that can be used for that purpose.

You could run USB rootfs and let the HDDs sleep. Running USB rootfs is fine if you take precaution avoid wear. And do backup frequently.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NAS326 Installation Instruction
September 02, 2022 02:22AM
Pardon the constant questions, but "running USB rootfs" means plugging a storage device into a port and running off of that?

I ask to confirm, because of the suggestion to back up frequently, which .... there isn't anything inherently unsafe about running off of an SSD, is there!? I assume the warning was because of USB implies possibly using a flash drive or the like???
Re: Zyxel NAS326 Installation Instruction
September 02, 2022 03:25PM
> I ask to confirm, because of the suggestion to
> back up frequently, which .... there isn't
> anything inherently unsafe about running off of an
> SSD, is there!?

There isn't anything unsafe with SSD. It will be just a bit faster than a good flash drive when it's in an USB enclosure. So you might as well use USB flash drive and make the drive "disappear" (example: Sandisk Ultra Fit)

>I assume the warning was because
> of USB implies possibly using a flash drive or the
> like???

Yes.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NAS326 Installation Instruction
September 03, 2022 02:43AM
Thanks very much for your comments and recommendations!
Re: Zyxel NAS326 Installation Instruction
September 24, 2022 12:53AM
Just want to thank everyone who made this possible.

Picked up a NAS326 a couple months ago without even knowing installing a standard Linux was already solved.

Getting it up and running with Debian was a piece of cake thanks to you.
jaro
Re: Zyxel NAS326 Installation Instruction
November 11, 2022 08:41AM
I tried to install Debian on my nas326. Everything went smooth. But at the end I was disappointed by transfer speed. Samba, nfs copying from drive to another ... transfers are around 1/2 of what you can get from stock firmware. I will try to repeat my measurements later, but for now I will stay with stock firmware.

If you prefer modern Linux OS then install this Debian with one of the latest kernel. If you prefer speed then you will probably stay with the stock firmware.

Anyway this is really good guide how to setup Debian on NAS326.
Re: Zyxel NAS326 Installation Instruction
November 11, 2022 02:05PM
jaro,

It's a basic Debian rootfs without any performance tuning. You actually need to do the tuning yourself. See the Wiki thread:

https://forum.doozan.com/read.php?2,23630

Quote

Perfornance Tuning & Benchmarks

Pogo ProV3 vs Pogo E02
Another Pogo Pro V3 benchmarks
Network performance - SAMBA - NFS (various protocols)
Pogo Pro V3 Network NFS benchmarks
Kirkwood vs OXNAS network performance (with flow control)
Kirkwood vs OXNAS network performance (flow control turned off )
OXNAS vs OXNAS network performance (flow control turned off)
Samba Tuning
Mount NTFS with big_writes
Increase NFSD max_block_size
Reduce NFSD threads

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Asure
Re: Zyxel NAS326 Installation Instruction
March 15, 2023 08:56AM
Not much action in this topic since november, so here is my success report.

- Installed Linux version 5.13.8-mvebu-tld-1 with no issues.on Nas326
- Didn't upgrade kernel and stuff yet.
- Added my raid which was already set up on the stock OS and set up mountpoints
- Added swap and fixed up /etc/fstab to use it.
- Needed FTP but proftpd wants systemd, so i switched over to systemd

Some of the posts say to change 'bootargs' but when using USB i needed to use usb_set_bootargs, if i had done it as posted i would have hosed my original bootargs i guess :)

usb_set_bootargs=setenv bootargs "console=ttyS0,115200 root=LABEL=rootfs rootdelay=10 $mtdparts earlyprintk=serial init=/bin/systemd"

Rebooted, but at this point the /root/set_persistent_mac_address starts to freak out and gets stuck in a loop.
I had looked at this before so i knew the ifup/ifdn was looping since pinging would show the box come & go at different ip's and filling up my dhcp client table.I hardcoded the script a bit with some sleep added.

I would reboot into stock, plug in the USB and fix it from stock OS, then sync & reboot.

#
sleep 5
UBOOT_MACADDR=`/usr/bin/fw_printenv ethaddr |  cut -c9-25`
echo "Setting Persistent MAC address to "$UBOOT_MACADDR > /dev/kmsg
/usr/bin/logger -s -i "Setting Persistent MAC address to "$UBOOT_MACADDR
ifdown eth0
ifconfig -v eth0 hw ether $UBOOT_MACADDR
ifup eth0

After this i could get eth0 to stay up at the same IP but sshd would not come up, so that was added too.
/usr/sbin/sshd -f /etc/ssh/sshd_config &
exit 0

I did apt-get update & upgrade and everthing seems smooth from here, this also seems to have fixed sshd for me.

Installed proftpd, works with insecure root stuff added. It borks out on the 'debian' hostname so i fixed that to debian.local in /etc/hostname.
Minidlna logs redirect to /dev/null
Proftpd logs to /dev/null

In theory i could now go for OMV as that was my main goal, but i'm thinking it might be a bit bloated, and i need to minimize writes for logs, configs, etc so my disks will still sleep

All in all it required a bit more effort than i expected, but this is certainly not for newbies ghehe.

Thanks for the release Bodhi!

Todo: Maybe rip Twonky DLNA from the orignal stock and make some package for it.it's inside /md0/sysdisk.img (ext2)
Asure
Re: Zyxel NAS326 Installation Instruction
March 15, 2023 09:04AM
Managed to get Twonky running instead of MiniDLNA, it's a bit lighter on the system:

root@debian:/usr/local/dmsf# ps -aux |grep mini
minidlna  1801  0.0  3.4 134368 17436 ?        SLsl 14:23   0:00 /usr/sbin/minidlnad -f /etc/minidlna.conf -P /run/minidlna/minidlna.pid -S -r

root@debian:/usr/local/dmsf# ps -aux |grep twonk
root      2453  0.0  0.0   1572    60 pts/1    SN   14:55   0:00 /usr/local/dmsf/binary/twonkystarter -appdata /media/raid/.media/twonkymedia
root      2454  0.6  1.4  22476  7336 pts/1    SNl  14:55   0:02 /usr/local/dmsf/binary/twonkyserver -appdata /media/raid/.media/twonkymedia
Re: Zyxel NAS326 Installation Instruction
March 15, 2023 03:09PM
Asure,

> Rebooted, but at this point the
> /root/set_persistent_mac_address starts to freak
> out and gets stuck in a loop.
> I had looked at this before so i knew the
> ifup/ifdn was looping since pinging would show the
> box come & go at different ip's and filling up my
> dhcp client table.I hardcoded the script a bit
> with some sleep added.

That's interesting, I recall somebody suggested a nicer way to do this, i.e. to avoid too much noise (I forgot where I kept the link). I use static IP mostly, so did not notice if the looping can be that bad. I probably need to add to the installation instruction to suggest an alternate place other than rc.local.

> All in all it required a bit more effort than i
> expected, but this is certainly not for newbies
> ghehe.

Definitely not for newbies. We had to work around stock u-boot limitation.

Thanks for the successful report!

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NAS326 Installation Instruction
April 10, 2023 12:01PM
Good afternoon!

Thank you for your hard work.

Successfully installed the system on USB.

But there was such a problem. I tell you what I did.
I upgraded the system to Debian 11 in order to use OMV 6. Installed OMV 6. From OMV, I installed Docker and Portainer. And then transmission 4.0.2 using Portainer. I use the latest kernel from March of this year.

Arbitrary restarts at different intervals are fixed. There is no system. There is nothing in the logs. I manage to observe in TOP that the WA parameter grows and after that the system is rebooted.

At first I thought the transmission version was to blame. Installed 3.0, then 2.98. Everything repeats unfortunately. The system can work for three days, or it can rebooted in 10 minutes.

Then I decided that the problem was transmission. I stopped the container and started watching. And again I got a reboot at different times.

Then I thought it was a malfunction of the NAS. I have three of them. I have tried on each and everywhere self-derived reboots without a system. At different intervals.

Maybe the problem is in Docker. But I'm not sure.

What's left to try is working on Debian 10 and OMV 5.

If you have any thoughts on this, I would be grateful.



Edited 2 time(s). Last edit at 04/10/2023 12:18PM by tormentor.
Re: Zyxel NAS326 Installation Instruction
April 10, 2023 01:54PM
tormentor,

I don't recall anybody reported about OMV 6 experience here before.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NAS326 Installation Instruction
April 10, 2023 02:06PM
bodhi Wrote:
-------------------------------------------------------
> tormentor,
>
> I don't recall anybody reported about OMV 6
> experience here before.


I'm not sure if OMV6 is the problem. For example, now I have set about 30 large torrent distributions for simultaneous downloading. The system is very heavily loaded. Load Average 4-5-6. But there were no reboots. It's been a long time. Conversely, with Load Average 0, the WA parameter suddenly starts to grow to 100 percent, and after it, the Load Average already begins to grow. And at LA around 14, a reboot occurs.
Re: Zyxel NAS326 Installation Instruction
April 10, 2023 02:21PM
Two screenshots

1. Htop and iotop

2. Top

Screenshots are taken in the process of freezing
Attachments:
open | download - htop_and_iotop.jpg (257.6 KB)
open | download - top.jpg (182.8 KB)
Re: Zyxel NAS326 Installation Instruction
April 10, 2023 05:01PM
Quote

Average already begins to grow. And at LA around 14, a reboot occurs.

I don't want to sounds like a systemd hater :) but now I see systemd as PID 1, my wild guess is it killed the system in OOM situation withtout a notification.

My suggestion is if you are usually stress the system like that (btw, I like how you utilize it to the max), you might need to use a 2GB swap file on HDD. This would avoid the OOM killer. When something is running away (eg. memory leak), you will see the swap thrashing. And you can still log in to kill it.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NAS326 Installation Instruction
April 11, 2023 11:14AM
Hm
Thank you

I think we should try without systemd
Re: Zyxel NAS326 Installation Instruction
April 11, 2023 07:03PM
tormentor,

> I think we should try without systemd

IMO, even if you run sysvinit the OOM might still occur (but it will log the usual error in dmesg). I think 2GB swap file would be a good solution to track down this problem to see if in fact there was a OOM and by which process.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NAS326 Installation Instruction
April 15, 2023 12:18PM
bodhi Wrote:
-------------------------------------------------------
> tormentor,
>
> > I think we should try without systemd
>
> IMO, even if you run sysvinit the OOM might still
> occur (but it will log the usual error in dmesg).
> I think 2GB swap file would be a good solution to
> track down this problem to see if in fact there
> was a OOM and by which process.


According to my observations, before restarting the system, due to an unknown reason, a lot of RAM is 60-70 percent free. I don't think swap can help in this case.
Re: Zyxel NAS326 Installation Instruction
April 15, 2023 01:44PM
> According to my observations, before restarting
> the system, due to an unknown reason, a lot of RAM
> is 60-70 percent free. I don't think swap can help
> in this case.

OK. If you can monitor the system at the moment it reboots, then it does not sound like OOM.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NAS326 Installation Instruction
May 14, 2023 02:44AM
hi there!
thanks for the very detailed steps, I managed to install Arch Linux on my 326.
Re: Zyxel NAS326 Installation Instruction
May 14, 2023 02:49PM
> thanks for the very detailed steps, I managed to
> install Arch Linux on my 326.

IIRC, Arch Linux ARM has stopped supporting some of these Armada 38x boxes. So check at their site, and switch to Debian if it is the case for this box.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NAS326 Installation Instruction
May 19, 2023 10:44PM
bodhi Wrote:
-------------------------------------------------------
> > thanks for the very detailed steps, I managed
> to
> > install Arch Linux on my 326.
>
> IIRC, Arch Linux ARM has stopped supporting some
> of these Armada 38x boxes. So check at their site,
> and switch to Debian if it is the case for this
> box.


They stopped the supprt for the 37x SoC, because of those chips are missing the NEON floating point engine.
The 38x is still supported. Thanks for the hint btw, I'll keep in mind once ALARM drop the ARMv7 support :)
Re: Zyxel NAS326 Installation Instruction
May 20, 2023 11:27AM
I didn't do anything, but after a lot of reboots, the system has now been running for almost two weeks.
And at the same time, the CPU load is significant.
Attachments:
open | download - 2023-05-20 19.22.45.png (319.5 KB)
Re: Zyxel NAS326 Installation Instruction
May 20, 2023 04:11PM
Glad to hear! That was a weird problem.
ps -deaf > /tmp/ps.txt
Can you attach the ps.txt here in a post. The pics are quite useless because the only processes on the screen were captured.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NAS326 Installation Instruction
May 21, 2023 01:29AM
Yes. Of course.

Here are all the running processes.
Attachments:
open | download - ps.txt (10.5 KB)
Re: Zyxel NAS326 Installation Instruction
May 21, 2023 08:05AM
I was happy early.))
I think the problem is in OMV6. All this time I haven't accessed the OMV6 web interface.
Today I tried to log into the web interface and immediately got a system reboot.
Re: Zyxel NAS326 Installation Instruction
May 21, 2023 01:08PM
> I was happy early.))
> I think the problem is in OMV6. All this time I
> haven't accessed the OMV6 web interface.
> Today I tried to log into the web interface and
> immediately got a system reboot.

That makes sense.

BTW, because you are running systemd which has binary log (journald), during a problem like this it is harder to pinpoint where it occured. With a text log, some events could have been recorded in syslog. The binary log is just like in Windows.

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NAS326 Installation Instruction
May 24, 2023 06:57AM
I have problems with OMV6 and chrony. I've installed the kernel 6.2.8, apt-get update, apt-get upgrade, activated systemd and installed OMV6. But there are problems with chrony. It seems that OMV6 configures chrony to use "seccomp". It should be connected to the CONFIG_SECCOMP setting of the kernel. I can't even change the timezone of the NAS because it will trigger a restart of the chrony.

Anyone knows how to solve it?

May 24 04:51:52 debian systemd[1]: Starting chrony, an NTP client/server...
May 24 04:51:52 debian chronyd[2240]: chronyd version 4.0 starting (+CMDMON +NTP +REFCLOCK +RTC +PRIVDROP +SCFILTER +SIGND +ASYNCDNS +NTS +SECHASH +IPV6 -DEBUG)
May 24 04:51:52 debian chronyd[2240]: Fatal error : Failed to load seccomp rules
May 24 04:51:52 debian chronyd[2237]: Failed to load seccomp rules
May 24 04:51:52 debian systemd[1]: chrony.service: Control process exited, code=exited, status=1/FAILURE
May 24 04:51:52 debian systemd[1]: chrony.service: Failed with result 'exit-code'.
May 24 04:51:52 debian systemd[1]: Failed to start chrony, an NTP client/server.

and

Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; omv-salt deploy run --no-color chrony 2>&1' with exit code '1': debian.xxxx.it:
----------
          ID: configure_chrony
    Function: file.managed
        Name: /etc/chrony/chrony.conf
      Result: True
     Comment: File /etc/chrony/chrony.conf is in the correct state
     Started: 04:51:51.467684
    Duration: 216.666 ms
     Changes:
----------
          ID: start_chrony_service
    Function: service.running
        Name: chrony
      Result: False
     Comment: Job for chrony.service failed because the control process exited with error code.
              See "systemctl status chrony.service" and "journalctl -xe" for details.
     Started: 04:51:51.762636
    Duration: 588.884 ms
     Changes:

Summary for debian.xxxx.it
------------
Succeeded: 1
Failed:    1
------------
Total states run:     2
Total run time: 805.550 ms
[ERROR   ] Command 'systemd-run' failed with return code: 1
[ERROR   ] stderr: Running scope as unit: run-r7a93c5a87d634e0f8cf3e638311ee5d2.scope
Job for chrony.service failed because the control process exited with error code.
See "systemctl status chrony.service" and "journalctl -xe" for details.
[ERROR   ] retcode: 1
[ERROR   ] Job for chrony.service failed because the control process exited with error code.
See "systemctl status chrony.service" and "journalctl -xe" for details.

OMV\ExecException: Failed to execute command 'export PATH=/bin:/sbin:/usr/bin:/usr/sbin:/usr/local/bin:/usr/local/sbin; export LANG=C.UTF-8; export LANGUAGE=; omv-salt deploy run --no-color chrony 2>&1' with exit code '1': debian.xxxx.it:
----------
          ID: configure_chrony
    Function: file.managed
        Name: /etc/chrony/chrony.conf
      Result: True
     Comment: File /etc/chrony/chrony.conf is in the correct state
     Started: 04:51:51.467684
    Duration: 216.666 ms
     Changes:
----------
          ID: start_chrony_service
    Function: service.running
        Name: chrony
      Result: False
     Comment: Job for chrony.service failed because the control process exited with error code.
              See "systemctl status chrony.service" and "journalctl -xe" for details.
     Started: 04:51:51.762636
    Duration: 588.884 ms
     Changes:

Summary for debian.xxxx.it
------------
Succeeded: 1
Failed:    1
------------
Total states run:     2
Total run time: 805.550 ms
[ERROR   ] Command 'systemd-run' failed with return code: 1
[ERROR   ] stderr: Running scope as unit: run-r7a93c5a87d634e0f8cf3e638311ee5d2.scope
Job for chrony.service failed because the control process exited with error code.
See "systemctl status chrony.service" and "journalctl -xe" for details.
[ERROR   ] retcode: 1
[ERROR   ] Job for chrony.service failed because the control process exited with error code.
See "systemctl status chrony.service" and "journalctl -xe" for details. in /usr/share/php/openmediavault/system/process.inc:220
Stack trace:
#0 /usr/share/php/openmediavault/engine/module/serviceabstract.inc(62): OMV\System\Process->execute()
#1 /usr/share/openmediavault/engined/rpc/config.inc(174): OMV\Engine\Module\ServiceAbstract->deploy()
#2 [internal function]: Engined\Rpc\Config->applyChanges(Array, Array)
#3 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#4 /usr/share/php/openmediavault/rpc/serviceabstract.inc(149): OMV\Rpc\ServiceAbstract->callMethod('applyChanges', Array, Array)
#5 /usr/share/php/openmediavault/rpc/serviceabstract.inc(619): OMV\Rpc\ServiceAbstract->OMV\Rpc\{closure}('/tmp/bgstatusAP...', '/tmp/bgoutput5K...')
#6 /usr/share/php/openmediavault/rpc/serviceabstract.inc(159): OMV\Rpc\ServiceAbstract->execBgProc(Object(Closure))
#7 /usr/share/openmediavault/engined/rpc/config.inc(195): OMV\Rpc\ServiceAbstract->callMethodBg('applyChanges', Array, Array)
#8 [internal function]: Engined\Rpc\Config->applyChangesBg(Array, Array)
#9 /usr/share/php/openmediavault/rpc/serviceabstract.inc(123): call_user_func_array(Array, Array)
#10 /usr/share/php/openmediavault/rpc/rpc.inc(86): OMV\Rpc\ServiceAbstract->callMethod('applyChangesBg', Array, Array)
#11 /usr/sbin/omv-engined(537): OMV\Rpc\Rpc::call('Config', 'applyChangesBg', Array, Array, 1)
#12 {main}

=========
moderator edit: please use code tags (formatted code button) to post log.



Edited 1 time(s). Last edit at 05/24/2023 02:58PM by bodhi.
Re: Zyxel NAS326 Installation Instruction
May 24, 2023 03:01PM
xanatos,

In the past there were GPL issues with SECCOMP so I did not include it. It seems those issues have been resolved, so I will see if it can be enabled in the next kernel release (6.3.x).

-bodhi
===========================
Forum Wiki
bodhi's corner (buy bodhi a beer)
Re: Zyxel NAS326 Installation Instruction
May 26, 2023 02:10AM
I was doing some tests. I've formatted my hdd with btrfs (because it is 18tb, and the stock kernel has an old 32bit ext4 that supports 16tb).

Stock firmware:

time dd if='3gbfile.mkv' of=/dev/null bs=8k
371141+1 records in
371141+1 records out
3040387403 bytes (2.8GB) copied, 17.246572 seconds, 168.1MB/s
real    0m 17.24s
user    0m 0.06s
sys     0m 3.33s

Debian Kernel 6.2.8:

time dd if='3gbfile.mkv' of=/dev/null bs=8k
371141+1 records in
371141+1 records out
3040387403 bytes (3.0 GB, 2.8 GiB) copied, 25.9646 s, 117 MB/s

real    0m26.048s
user    0m0.263s
sys     0m8.278s

So the stock kernel seems to be much much faster (at least with btrfs). I could repeat the test reformatting the hdd with ext4 (it is more or less empty now).

In both cases I'm mounting the btrfs without any option, like

mount -t btrfs /dev/sda1 /mnt/sda1

Addendum:

Made some tests with Ext4. The Ext4 partition is at the end of the disk. The results with the stock kernel and with the latest kernel are much more similar:

Stock firmware:

/mnt/sda2 # time dd if='3gbfile' of=/dev/null bs=8k
371141+1 records in
371141+1 records out
3040387403 bytes (2.8GB) copied, 24.732981 seconds, 117.2MB/s
real    0m 24.73s
user    0m 0.08s
sys     0m 3.38s

Debian Kernel 6.2.8:

root@debian:/mnt/sda2# time dd if='3gbfile' of=/dev/null bs=8k
371141+1 records in
371141+1 records out
3040387403 bytes (3.0 GB, 2.8 GiB) copied, 24.3131 s, 125 MB/s

real    0m24.328s
user    0m0.248s
sys     0m6.969s

The sys time doubles (that for a small CPU like the one in the NAS326 is important), the total time remains more or less the same, the MB/s remains more or less the same (the results change every time a little)



Edited 1 time(s). Last edit at 05/26/2023 06:50AM by xanatos.
Author:

Your Email:


Subject:


Spam prevention:
Please, enter the code that you see below in the input field. This is for blocking bots that try to post this form automatically. If the code is hard to read, then just try to guess it right. If you enter the wrong code, a new image is created and you get another chance to enter it right.
Message: