NAS

QNAP NAS

CLI Commands

系統資訊

[~] # getsysinfo
cputmp : get CPU temperature
systmp : get system temperature
sysfan [fan no] : get system fan speed
sysfannum : get total system fan number
hdnum : get total system SATA disk number
hdtmp [disk no] : get SATA disk temperature
hdstatus [disk no] : get SATA disk status
hdmodel [disk no] : get SATA disk model
hdcapacity [disk no] : get SATA disk capacity
hdsmart [disk no] : get SATA disk SMART summary
model : get system model name
sysvolnum : get system volume number
vol_desc [volume no] : get volume description
vol_fs [volume no] : get volume file system
vol_totalsize [volume no] : get volume total size
vol_freesize [volume no] : get volume free size
vol_status [volume no] : get volume status

[~] # getsysinfo model
TVS-1271U-RP[~] #

重啟主機

reboot

poweroff

重啟服務

# Restart SSH
/etc/rcS.d/S85login restart

# Restart Samba
/etc/rcS.d/S62smb restart

列出 NFS Client IP

netstat -antu | grep ESTABLISHED | awk {'print $5'} | cut -d: -f1 | grep -v -e 127.0.0.1

Install Applications

  1. First, we are going to have to download the application we would like to install.
  2. Visit the QNAP App Center, select the model and QTS version of your NAS and download some apps. You may find applications on other third-party websites as well.
  3. Unzip the file you have downloaded and have the .qpkg file ready
  4. Log in to your NAS via web browser and launch App Center
  5. Click on this icon below

TrueNAS CORE

GUI

Text Console 啟用登入密碼 (預設: 關閉)

System > Advanced > Unset Show Text Console without Password Prompt 

Create Pool
Create Dataset

Select the pool: mypool1

NFS Sharing Data

Sharing > Unix Shares (NFS) > ADD

Services

NOTE: 預設 NFS 分享目錄允許任一主機都可以掛載。如果要限制可掛載的遠端主機,繼續下面的步驟。

Sharing > NFS > Select: /mnt/mypool/dataset1 > Edit > ADVANCED OPTIONS 

FTP Sharing Data

Accounts

TIP: 建立帳號時需要指定家目錄位置的 dataset。

Services > FTP

CLI

TIP: 除了透過 SSH 或本機 Console 可以進入命令模式,還能使用 Web Shell。

Console Setup Menu

/etc/netcli