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
- First, we are going to have to download the application we would like to install.
- 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.
- Unzip the file you have downloaded and have the .qpkg file ready
- Log in to your NAS via web browser and launch App Center
- Click on this icon below
TrueNAS CORE
Links
- Official: https://www.truenas.com/
- Doc: https://www.truenas.com/docs/
GUI
Text Console 啟用登入密碼 (預設: 關閉)
System > Advanced > Unset Show Text Console without Password Prompt
Create Pool
- Name: mypool1
- Data VDevs: Disk da1
- Force: Check (NOTE: 本例的磁碟已經有設置硬體式磁碟陣列,所以這裡要勾選)
Create Dataset
Select the pool: mypool1
- Name: dataset1
- Inherit (non-encrypted): Check
- Share Type: Generic
NFS Sharing Data
- Path: /mnt/mypool1/dataset1
- Description: DB Backup
- Enabled: Check
Services
- NFS: Running + Start Automatically
NOTE: 預設 NFS 分享目錄允許任一主機都可以掛載。如果要限制可掛載的遠端主機,繼續下面的步驟。
Sharing > NFS > Select: /mnt/mypool/dataset1 > Edit > ADVANCED OPTIONS
FTP Sharing Data
Accounts
- Users: <建立帳號>
- Groups: <建立群組>
TIP: 建立帳號時需要指定家目錄位置的 dataset。
Services > FTP
- Running: Check
- Start Automatically: Check
- Configure > advanced options
- Always Chroot: check
- Allow Local User Login: check
CLI
TIP: 除了透過 SSH 或本機 Console 可以進入命令模式,還能使用 Web Shell。
/etc/netcli