QNAP NAS

From Elvanör's Technical Wiki
Jump to navigation Jump to search

QNAP manufactures NAS (which basically allow you to share a filesystem over your entire home network). Those NAS can also act as multimedia players. Unfortunately, there are so many bugs and issues with QNAP NAS models that they are basically useless. The proprietary OS is a disaster, and even with a Debian OS the hardware was faulty. Never buy from this company as their products are total crap. These are historical notes based on my previous experience with a QNAP NAS.

Hard Drives

Installing / Removing Hard Drives

  • You have to be very careful when installing HDs, removing them or switching them. Basically, the firmware is tied to a particular HD in a particular slot. So for instance, if you install the OS on one drive, take out that drive, install another one, then take it out and put back the first one, the NAS won't work properly. It won't be able to mount the first HD.
  • The partitioning sheme used by QNAP is strange. You cannot mount a HD used in a QNAP NAS under a standard Linux (even if it's a single disk volume, without RAID, as internally QNAP OS creates a RAID 1 setup for it).
  • You can mount it in an external USB dock connected to the NAS, but it's hard and has to be done manually with the following commands (this was taken from this post):
mkdir -p /mnt/lvm
parted /dev/sdb # to check that USB drive is at /dev/sdb
cat /proc/mdstat
mdadm --assemble /dev/md42 /dev/sdb3

vgscan --cache
lvdisplay
lvchange -a y /dev/vg1/lv1
mount -t ext4 -o ro /dev/vg1/lv1 /mnt/lvm 
  • Basically, it's easier to never try to remove or swap disks in the NAS until you are sure you won't ever need the data or the drive in the NAS again. It avoids a lot of trouble.
  • The root of the HD installed in the NAS is /share/CACHEDEV1_DATA, which is mounted in a strange internal way. Homes are in /share/homes/, symlink to /share/CACHEDEV1_DATA/homes.

Checking a hard drive manually

  • Log in via SSH and issue the following commands. You may need to kill a process if after services.sh stop, unmounting is still not possible. Use lsof for this (with a correct grep).
/etc/init.d/services.sh stop
umount /dev/mapper/cachedev1
e2fsck_64 -fvc -C 0 /dev/mapper/cachedev1
  • Note that the -c option will check bad blocks.

NFS

  • The easiest way is to create a share with /share/homes/admin as root folder (you can do that in the Shared Folders control moduke). You should allow guest access, and then authorize the IPs address you need to access this share.

Getting rid of bloat

  • The QNAP OS (QTS) has a lot of bloat / useless applications. You should delete or at least deactivate most of them, both in the App center and in HD Station, as the system is low on RAM and it also seems to run all the HD Station applications at startup (why?).
  • Basically currently I only use the NFS server, and the following HDMI applications (though HD Station): Kodi, Chrome and JRiver Media Center.

Applications

JRiver Media Center

  • To install a license, you just need a Registration code (that was obtained when purchasing). Then go to the Help menu, there is an option to install a license automatically by entering the registration code.
  • You can configure gaps between tracks. Go to Player -> Playback Options -> Audio.

Transmission

  • Configuration and current data (torrents, resume information) is at /share/CACHEDEV1_DATA/.qpkg/QTransmission. You should backup this folder (the important directory is the etc/ one) in case of reinstallation / reformat.