You are not logged in.

#1 2014-03-09 18:32:32

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Installing Arch on Thecus N4520 NAS

I have a Thecus N4520 NAS and the thing works great (well a hell of a lot better than the POS Netgear ReadyNAS 105 that I had), but the interface sucks. I also can't get access to their stupid message board no matter how hard I try (activation emails won't get sent and no one to contact about it) so any issues I have with it I can't get fixed. I'm getting fed up with it because NZBget keeps crashing but there's no real way to figure out why, except going through their awkward filesystem layout and looking at the logs. It's also a pain in the butt to administer the system at all. Their OS is most likely a home-rolled Linux Distro since it bears no resemblance to any distro I have used (doesn't seem to use Systemd) and doesn't have a package management system.

My question is, could I (easily) install Arch on it without destroying my RAID set and my 4 TB worth of data? It's an x86 based machine (Intel Atom dual core) with like a gig of ram.

Or could anyone recommend another NAS distro?

Offline

#2 2014-03-11 16:34:49

pgoetz
Member
From: Austin, Texas
Registered: 2014-02-21
Posts: 355

Re: Installing Arch on Thecus N4520 NAS

Are you sure that this Thecus device will allow you to install a new OS?  Last time I checked, some will and some won't (I have one that can't be re-installed with another OS).  I would look at FreeNAS if you're looking for specifically a NAS OS.

Offline

#3 2014-03-12 01:24:44

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Installing Arch on Thecus N4520 NAS

Yea looking more into it I'm not sure if it's possible or not. I took it apart and there seems to be no SATA DOM and it won't boot without the HDDs in it, so that leads me to believe that Linux is installed to the RAID array. Also the device is UEFI based, so something like GummiBoot would be needed.

I already asked the guys over at FreeNAS if it would work and they said no because ZFS requires about 8 GB of RAM and mine has 2 GB.

On a side note I finally got access to their message boards, the only way was they sent me a notification that I created an account three months ago and never activated it.

Offline

#4 2014-03-13 11:01:26

Ibex
Member
Registered: 2006-03-02
Posts: 135

Re: Installing Arch on Thecus N4520 NAS

If you're able to ssh into the NAS, you can check whether it uses mdadm to manage the RAID set. If so, it's high likely that you will be able to keep the data when installing Arch on it. Just make sure to don't mess things up during installation.

Offline

#5 2014-03-14 00:37:10

brando56894
Member
From: NYC
Registered: 2008-08-03
Posts: 681

Re: Installing Arch on Thecus N4520 NAS

I don't have the "losing data" problem anymore since I got pissed that it was screwing up and removed the OS, then reinstalled it. The tutorial said that my data would be kept intact and even during the setup it said "we detected data on your RAID set" and there were two options: continue and shutdown. Continue would erase the data and start over, shutdown would shut it down and allow you to swap out the HDDs. I selected "Shut Down" and it proceeded to go on through it's routine. I was thinking maybe it would shutdown after installing the system, about 20 minutes go by and it's finished but never shut down.

I go into RAID management and see "0.2 GB used of 7,890 GB"!! All the data can be reacquired, it's just going to take a while. On the up side the NAS seems faster because I screwed up the OS slightly when I first got it.

The OS itself is actually installed onto an eMMC chip, not on the RAID set. The script used DD to write the image to the chip, I think it's only 2 GB so it can't hold that much, the rest must be stored on the HDD.

Here's the partition/drive listings

[root@N4520 ~]# fdisk -l

Disk /dev/mtdblock0: 4 MB, 4194304 bytes
255 heads, 63 sectors/track, 0 cylinders, total 8192 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x840fc085

Disk /dev/mtdblock0 doesn't contain a valid partition table

Disk /dev/mmcblk0: 1971 MB, 1971322880 bytes
70 heads, 4 sectors/track, 13750 cylinders, total 3850240 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 512 bytes
I/O size (minimum/optimal): 512 bytes / 512 bytes
Disk identifier: 0x4af51941

        Device Boot      Start         End      Blocks   Id  System
/dev/mmcblk0p2          140000     1048575      454288   83  Linux
/dev/mmcblk0p3         1048600     1054759        3080   83  Linux


Disk /dev/md70: 10.7 GB, 10736291840 bytes
2 heads, 4 sectors/track, 2621165 cylinders, total 20969320 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md70 doesn't contain a valid partition table

Disk /dev/md10: 2146 MB, 2146414592 bytes
2 heads, 4 sectors/track, 524027 cylinders, total 4192216 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md10 doesn't contain a valid partition table

Disk /dev/md50: 536 MB, 536850432 bytes
2 heads, 4 sectors/track, 131067 cylinders, total 1048536 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disk identifier: 0x00000000

Disk /dev/md50 doesn't contain a valid partition table

Disk /dev/md0: 8929.2 GB, 8929230716928 bytes
2 heads, 4 sectors/track, -2114979328 cylinders, total 17439903744 sectors
Units = sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 524288 bytes / 1572864 bytes
Disk identifier: 0x00000000

Disk /dev/md0 doesn't contain a valid partition table

It seems as though the mmcblk is the only one that has any partition tables on it.

Here's one of the actual drives in the RAID set (had to use gdisk instead of fdisk)

Disk /dev/sda: 5860533168 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): C4748464-6AF0-47F6-83D0-E7CF118F84DD
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860533134
Partitions will be aligned on 2048-sector boundaries
Total free space is 43941 sectors (21.5 MiB)

Number  Start (sector)    End (sector)  Size       Code  Name
   1        41945088        46139375   2.0 GiB     FD00  
   2        47187968      5860491263   2.7 TiB     FD00  THECUS
   3        46139392        47187951   512.0 MiB   FD00  
   4            2048        20973559   10.0 GiB    FD00  i686-THECUS
   5        20973568        41945071   10.0 GiB    FD00  

Apparently the NAS uses a fakeRAID controller....but it also uses mdadm? I'm new to RAID, set up an array once on my Dad's Dell XPS Gen 4 years ago and it had Windows on it. All this is brand new to me.

Here's some more info from mdadm

[root@N4520 ~]# mdadm --detail /dev/md0 
/dev/md0:
        Version : 1.2
  Creation Time : Wed Mar 12 16:01:04 2014
     Raid Level : raid5
     Array Size : 8719951872 (8315.99 GiB 8929.23 GB)
  Used Dev Size : 2906650624 (2772.00 GiB 2976.41 GB)
   Raid Devices : 4
  Total Devices : 4
    Persistence : Superblock is persistent

    Update Time : Thu Mar 13 20:27:22 2014
          State : clean
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

         Layout : left-symmetric
     Chunk Size : 512K

           Name : (none):0
           UUID : d1d14afc:23490940:a0f7f996:d7b87dfb
         Events : 11

    Number   Major   Minor   RaidDevice State
       0       8        2        0      active sync   /dev/sda2
       1       8       18        1      active sync   /dev/sdb2
       2       8       34        2      active sync   /dev/sdc2
       3       8       50        3      active sync   /dev/sdd2
[root@N4520 ~]# mdadm --detail /dev/md70
/dev/md70:
        Version : 1.2
  Creation Time : Wed Mar 12 15:52:54 2014
     Raid Level : raid1
     Array Size : 10484660 (10.00 GiB 10.74 GB)
  Used Dev Size : 10484660 (10.00 GiB 10.74 GB)
   Raid Devices : 4
  Total Devices : 4
    Persistence : Superblock is persistent

    Update Time : Thu Mar 13 20:30:34 2014
          State : clean
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

           Name : (none):70
           UUID : ea980643:5c1b79e8:64f1b4cb:2462799b
         Events : 19

    Number   Major   Minor   RaidDevice State
       0       8        4        0      active sync   /dev/sda4
       1       8       20        1      active sync   /dev/sdb4
       2       8       36        2      active sync   /dev/sdc4
       3       8       52        3      active sync   /dev/sdd4
[root@N4520 ~]# mdadm --detail /dev/md10
/dev/md10:
        Version : 1.2
  Creation Time : Wed Mar 12 15:52:53 2014
     Raid Level : raid1
     Array Size : 2096108 (2047.32 MiB 2146.41 MB)
  Used Dev Size : 2096108 (2047.32 MiB 2146.41 MB)
   Raid Devices : 4
  Total Devices : 4
    Persistence : Superblock is persistent

    Update Time : Wed Mar 12 21:43:59 2014
          State : clean
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

           Name : (none):10
           UUID : f502437a:d27d335a:d11578d5:6e119d58
         Events : 2

    Number   Major   Minor   RaidDevice State
       0       8        1        0      active sync   /dev/sda1
       1       8       17        1      active sync   /dev/sdb1
       2       8       33        2      active sync   /dev/sdc1
       3       8       49        3      active sync   /dev/sdd1
[root@N4520 ~]# mdadm --detail /dev/md50
/dev/md50:
        Version : 1.2
  Creation Time : Wed Mar 12 16:00:56 2014
     Raid Level : raid1
     Array Size : 524268 (512.07 MiB 536.85 MB)
  Used Dev Size : 524268 (512.07 MiB 536.85 MB)
   Raid Devices : 4
  Total Devices : 4
    Persistence : Superblock is persistent

    Update Time : Wed Mar 12 22:19:51 2014
          State : clean
 Active Devices : 4
Working Devices : 4
 Failed Devices : 0
  Spare Devices : 0

           Name : (none):50
           UUID : d43d5dd6:9446766e:1a7486f4:b811e16d
         Events : 21

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

Any chance someone could give me a quick explanation of what all these md devices are for? I know /dev/md0 is the "main" device, but that's about it.


After reading through the Arch Wiki on RAID creation, /etc/mdamd doesn't exist, but I think the ThecusOS distro is based on Fedora/Red Hat/CentOS since it used RPMs during the installation of the OS, so it could be anywhere for all I know. They put things in odd places on this NAS.

Last edited by brando56894 (2014-03-14 00:44:18)

Offline

#6 2014-03-17 14:00:05

Ibex
Member
Registered: 2006-03-02
Posts: 135

Re: Installing Arch on Thecus N4520 NAS

It's high likely that the distro is indeed some kind of custom tweaked linux distribution. This means you can take nothing for granted as it might run the strangest processes and other stuff. For example, in the past I was debugging some RAID issues on an Iomega IX4 NAS, and it seemed like some process was reconfiguring/changing/creating RAID arrays as soon as I was changing settings myself. It didn't even use all available space for some reason.

If you don't require features unique to the Thecus firmware, it might be a good idea to install basically any standard linux distro, where you then have the possibilities to take full control over all configuration. With generic distros (debian, ubuntu, redhat, archlinux, ...) you might miss a out-of-the-box NAS GUI, and you might have to build/search/install one yourself, or use the CLI if you feel comfortable with it. Using something like FreeNAS (using UFS instead of ZFS because of the limited memory) might give you something more user friendly.

Offline

Board footer

Powered by FluxBB