Qnap: Unterschied zwischen den Versionen
Sysd0b (Diskussion | Beiträge) (→OID`s) |
Sysd0b (Diskussion | Beiträge) |
||
(140 dazwischenliegende Versionen desselben Benutzers werden nicht angezeigt) | |||
Zeile 1: | Zeile 1: | ||
− | == | + | = Allgemein = |
− | [http:// | + | == Qnap Port List == |
+ | FTP - 21 by default and configurable. | ||
+ | Passive FTP port - 55536 ~ 56559 by default and configurable | ||
+ | SSH - 22 by default and configurable. | ||
+ | SMTP - 25 by default and configurable. | ||
+ | Web Server/HTTP - 80; HTTPS - 8081 by default and configurable. | ||
+ | Netbios/SAMBA - 137, 138, 139, 445 | ||
+ | SSL/HTTPS - 443 by defualt and configurable | ||
+ | AFP - 548 | ||
+ | Rsync - 873 by default and configurable. | ||
+ | RTRR - 8899 by default and configurable | ||
+ | MySQL - 3306 by defualt and configurable | ||
+ | System management, Web File Manager, Multimedia Station, Download Station, Surveillance Station | ||
+ | 8080 by default and configurable. | ||
+ | Twonkymedia - 9000 | ||
+ | Telnet - 13131 by default and configurable | ||
+ | BitTorrent - 6881~6999 by default and configurable. | ||
+ | Syslog - 514 by defualt and configurable | ||
+ | SNMP - 161 by default and configurable | ||
+ | TFTP - 69 by default and configurable | ||
+ | PPTP - 1723 | ||
+ | OpenVPN - 1194 by defualt and configurable | ||
+ | RADIAUS - monitors UDP ports 1645, 1812 (for RADIUS Authentication) and 1646, 1813 (for RADIUS Accounting) for RADIUS requests. | ||
+ | LDAP Server - 389 | ||
+ | NFS - 2049, 111 and dynamic ports | ||
+ | |||
+ | * Quelle: http://helpdesk.qnap.com/index.php?/Knowledgebase/Article/View/13/5/what-is-the-port-number-used-by-qnap--nas | ||
+ | == Support == | ||
+ | QNAP Support Deutschland: 0900/1845678 (1,49€/min Festnetz, 2,79€ Mobilfunknet) | ||
+ | |||
+ | Logs erstellen: | ||
+ | * QNAP APP Center öffnen | ||
+ | * QNAP Diagnostic Tools herunterladen & öffnen | ||
+ | * Dump der Logs erstellen & herunterladen | ||
+ | * Mail an "desupport@qnap.com" senden inkl. Kontakt Rufnummer & Log Dump`s | ||
+ | |||
+ | |||
+ | = Dienste = | ||
+ | == Backup with Restic == | ||
+ | Da es QNAP selber nicht schafft ordentliche Backup Tools mitzuliefern... | ||
+ | * [https://www.hagen-bauer.de/tags/restic/ example] | ||
+ | |||
+ | === Restic installieren === | ||
+ | * Restic besorgen entweder selber machen (via Shell) | ||
+ | ** [https://restic.net/ restic.net] | ||
+ | * oder bereits als qpkg herunterladen und via WebGUI über den AppStore manuell hinzufügen | ||
+ | ** [https://www.qnapclub.eu/de/qpkg/model/download/466570/Restic_0.9.5_x86_64.qpkg x86/64] oder [https://www.qnapclub.eu/de/qpkg/496 Qnapclub andere Architekturen] | ||
+ | |||
+ | === Restic Wrapper === | ||
+ | Vereinfacht die ohnehin unkomplizierte Bedienung noch mehr = [https://github.com/binarybucks/restic-tools restic Wrapper] (Mit Nagios/Icinga Support), habe ich [https://www.hagen-bauer.de/tags/restic/ hier] gefunden :-) | ||
+ | <pre> | ||
+ | wget https://raw.githubusercontent.com/binarybucks/restic-tools/master/bin/backup | ||
+ | mv backup restic-backup.sh | ||
+ | chmod +x restic-backup.sh | ||
+ | </pre> | ||
+ | Noch etwas config - Ich erstelle ein Backup aller Freigabeorder auf eine via USB verbundene Externe HDD | ||
+ | <pre> | ||
+ | mkdir /etc/backup | ||
+ | vim /etc/backup/local.config | ||
+ | BACKUP_HOSTNAME=$(hostname -f) | ||
+ | BACKUP_DIR="/share/CACHEDEV1_DATA/" / Pfad ggf. anpassen | ||
+ | BACKUP_ARGS="--tag filesystem" | ||
+ | |||
+ | vim /etc/backup/extern.repo | ||
+ | RESTIC_REPOSITORY="/share/WD30EFRX" | ||
+ | RESTIC_PASSWORD='AENDER-MICH' | ||
+ | </pre> | ||
+ | Man sollte noch eine exclude Datei anlegen, um nicht benötigte Ordner vom Backup auszuschließen. Einer der nachfolgende Befehle könnte dafür hilfreich sein: | ||
+ | <pre> | ||
+ | ls -al /share/CACHEDEV1_DATA/ | cut -d " " -f 9,10 | ||
+ | ls -al /share/CACHEDEV1_DATA/ | cut -d: -f 2 | cut -d " " -f2 | ||
+ | </pre> | ||
+ | Exclude Datei erstellen & öffnen | ||
+ | <pre> | ||
+ | vim /etc/backup/local.exclude | ||
+ | </pre> | ||
+ | Ordner die ich nicht sichern möchte eintragen | ||
+ | <pre> | ||
+ | .antivirus/ | ||
+ | .appDB/ | ||
+ | aquota.user | ||
+ | .@backup_config/ | ||
+ | .@backup_qbox/ | ||
+ | .codesigning/ | ||
+ | .idmap/ | ||
+ | .ldapdb/ | ||
+ | .locks/ | ||
+ | .log/ | ||
+ | .nc/ | ||
+ | .php_session/ | ||
+ | .php_session_sys/ | ||
+ | .qbox/ | ||
+ | .qbox_view/ | ||
+ | .@qmariadb/ | ||
+ | .@qmonitor/ | ||
+ | .@qsync/ | ||
+ | .qpkg/ | ||
+ | .samba/ | ||
+ | .spool/ | ||
+ | .SSDLaboratory/ | ||
+ | .swap/ | ||
+ | .system/ | ||
+ | .team_folder/ | ||
+ | .tmp/ | ||
+ | .versioning/ | ||
+ | </pre> | ||
+ | |||
+ | so das wars =) | ||
+ | |||
+ | === testen === | ||
+ | Repository initialisieren | ||
+ | <pre> | ||
+ | ./restic-backup.sh extern init | ||
+ | </pre> | ||
+ | Erstes Backup erstellen | ||
+ | <pre> | ||
+ | ./restic-backup.sh extern local | ||
+ | </pre> | ||
+ | |||
+ | == Clam AV == | ||
+ | '''Config''' | ||
+ | <pre> | ||
+ | cat /etc/config/clamd.conf | ||
+ | cat /etc/config/antivirus.global | ||
+ | cat /etc/config/antivirus.jobs | ||
+ | cat /etc/config/freshclam.conf // Update Server liste | ||
+ | </pre> | ||
+ | |||
+ | Qnap Skripte Aufrufe | ||
+ | <pre> | ||
+ | /etc/init.d/antivirus.sh scan 1 | ||
+ | /etc/init.d/antivirus.sh scan 2 | ||
+ | /etc/init.d/antivirus.sh archive_log | ||
+ | /etc/init.d/antivirus.sh update_db | ||
+ | </pre> | ||
+ | |||
+ | == Crontab == | ||
+ | Hier findet man was so läuft | ||
+ | <pre> | ||
+ | crontab -e | ||
+ | </pre> | ||
+ | z.B. | ||
+ | <pre> | ||
+ | 0 3 * * * /usr/local/sbin/ImR_all -soft /Qmultimedia | ||
+ | #0 2 * * * /sbin/qfstrim | ||
+ | 0 4 * * * /sbin/hwclock -s | ||
+ | 0 3 * * * /sbin/vs_refresh | ||
+ | 0 3 * * * /sbin/clean_reset_pwd | ||
+ | 0-59/15 * * * * /etc/init.d/nss2_dusg.sh | ||
+ | 30 7 * * * /sbin/clean_upload_file | ||
+ | 0-59/10 * * * * /etc/init.d/storage_usage.sh | ||
+ | 30 3 * * * /sbin/notice_log_tool -v -R | ||
+ | 30 6 * * 1 /home/httpd/cgi-bin/disk/disk_manage.cgi func=test_hd_speed | ||
+ | 10 15 * * * /usr/bin/power_clean -c 2>/dev/null | ||
+ | */10 * * * * /sbin/config_cache_util 0 | ||
+ | 0 0 * * 0 /sbin/hal_event --pd_self_test dev_id=0x00000001,action=1 | ||
+ | 30 7 * * * /usr/local/sbin/version_cleaner -t 0 > /dev/null 2>/dev/null | ||
+ | 35 7 * * * /sbin/qbox_util -c > /dev/null 2>/dev/null | ||
+ | 3 9,21 * * * /sbin/notify_update --nc 1>/dev/null 2>&1 | ||
+ | 0-59/20 3 * * * /sbin/adjust_time | ||
+ | 0 1 * * * /etc/init.d/flush_memory.sh >/dev/null 2>&1 | ||
+ | 0 3 * * 0 /etc/init.d/idmap.sh dump | ||
+ | 0 19 1 * * /sbin/storage_util --data_scrubbing raid_id=-1 >/dev/null 2>&1 | ||
+ | #0 0 * * * /etc/init.d/rsyncRR.sh Schedule9 2>/dev/null | ||
+ | 43 * * * * /sbin/qddns_check 2>/dev/null | ||
+ | * * * * * /var/cache/netmgr/lock_timer.sh | ||
+ | 4 3 * * 3 /etc/init.d/backup_conf.sh | ||
+ | 0 19 * * 5 /etc/init.d/antivirus.sh scan 1 | ||
+ | 0 0 * * 0 /etc/init.d/antivirus.sh scan 2 | ||
+ | 0 0 * * * /etc/init.d/antivirus.sh archive_log | ||
+ | 09 0 */1 * * /etc/init.d/antivirus.sh update_db | ||
+ | 0 12 * * * /mnt/ext/opt/LicenseCenter/bin/qlicense_tool local_check | ||
+ | 0 0 * * * /usr/local/sbin/qsh nc.archive >/dev/null 2>&1 | ||
+ | 55 19 * * * /mnt/ext/opt/QcloudSSLCertificate/bin/ssl_agent_cli | ||
+ | 0 4 * * * /etc/init.d/wsd.sh restart | ||
+ | </pre> | ||
+ | == Entware (OPKG) == | ||
+ | Um Busybox etwas zu bereichern gbt es nun [https://github.com/Entware/Entware/wiki/Install-on-QNAP-NAS Entware], wer länger dabei ist -> Früher gab es [https://dwaves.org/2015/03/26/enable-and-install-screen-command-on-qnap/ ipgk Optware] für diesen Zweck. | ||
+ | |||
+ | <pre> | ||
+ | ssh admin@192.168.23.5 // Ipv4 Adresse des NAS anpassen | ||
+ | cd /share/Public // in das Public Verzeichniss wechseln | ||
+ | wget http://bin.entware.net/other/Entware_1.00std.qpkg // Entware download (prüfen ob die Version aktuell ist) | ||
+ | sh Entware_1.00std.qpkg // Installation starten & anschliessend Dienst bzw. NAS neustarten | ||
+ | rm Entware_1.00std.qpkg // Installer löschen | ||
+ | </pre> | ||
+ | |||
+ | Die OPKG Config befindet hier und sollte nun einen Eintrag für Entware enthalten | ||
+ | <pre> | ||
+ | cat /etc/config/qpkg.conf | ||
+ | </pre> | ||
+ | |||
+ | Wenn alles geklappt hat kann man nun weitere Software via opkg installieren: | ||
+ | <pre> | ||
+ | opkg update && opkg upgrade && opkg install screen | ||
+ | export TERMINFO=/opt/share/terminfo | ||
+ | </pre> | ||
+ | |||
+ | == Rsync == | ||
+ | Auf der Shell zu finden unter namen "qsync" unter dem Pfad "/etc/config/qsync". | ||
+ | |||
+ | Skripte: | ||
+ | |||
+ | * /etc/init.d/rsyncSpeedTest.sh | ||
+ | |||
+ | |||
+ | === Profile === | ||
+ | In Profilen werden Verbindungsinformationen zu Server abgelegt. | ||
+ | <pre> | ||
+ | #/etc/config/qsync/hbrm_profile.conf Hier werden die Profile abgelegt, sieht dann wie folgt aus: | ||
+ | |||
+ | [Profile0] | ||
+ | Name = Local_Profile | ||
+ | InUse = 0 | ||
+ | |||
+ | [Profile2] | ||
+ | StorageType = 1 | ||
+ | Ssh = 0 | ||
+ | Name = RSYNC_Old1 | ||
+ | INetAddr = 192.168.23.5 | ||
+ | Account = admin | ||
+ | Port = 873 | ||
+ | EnPassword = V2@De3TlXYZbC94JqfXYZCnfA== | ||
+ | Ssl = 0 | ||
+ | InUse = 1 | ||
+ | RsyncMode = 0 | ||
+ | </pre> | ||
+ | |||
+ | === Speicher === | ||
+ | <pre> | ||
+ | /etc/config/qsync/hbrm_storage.conf | ||
+ | |||
+ | [Storage1] | ||
+ | Name = Storage_Old1 | ||
+ | Path = /XYZ-Pfad | ||
+ | ProfileID = Profile1 | ||
+ | ConnectStatus = 0 | ||
+ | TotalCapacity = 44796761 | ||
+ | UsedCapacity = 44796105 | ||
+ | |||
+ | [Storage0] | ||
+ | ProfileID = Profile1 | ||
+ | Name = Remote Storage 1 | ||
+ | DestRoot = / | ||
+ | Path = /XYZ-Pfad/ | ||
+ | ConnectStatus = 0 | ||
+ | TotalCapacity = 105708282 | ||
+ | UsedCapacity = 0 | ||
+ | </pre> | ||
+ | |||
+ | '''Links''' | ||
+ | * https://wiki.qnap.com/wiki/Rsync | ||
+ | |||
+ | == Skripte == | ||
+ | <pre> | ||
+ | find /etc/ -iname *.sh | ||
+ | |||
+ | /etc/acpi/events/check_press.sh | ||
+ | /etc/rcS.d/S99sdmd.sh | ||
+ | /etc/rcS.d/S99thunderbolt.sh | ||
+ | /etc/rcS.d/S99sync_action.sh | ||
+ | /etc/ssl/misc/CA.sh | ||
+ | /etc/init.d/vpn_qbelt_client.sh | ||
+ | /etc/init.d/vpn_qbelt.sh | ||
+ | /etc/init.d/vpn_l2tp_client.sh | ||
+ | /etc/init.d/vpn_l2tp.sh | ||
+ | /etc/init.d/vpn_openvpn_client.sh | ||
+ | /etc/init.d/vpn_openvpn.sh | ||
+ | /etc/init.d/vpn_pptp_client.sh | ||
+ | /etc/init.d/vpn_pptp.sh | ||
+ | /etc/init.d/vpn_common.sh | ||
+ | /etc/init.d/rsyncd.sh | ||
+ | /etc/init.d/rsyncd-BS.sh | ||
+ | /etc/init.d/rsyncRR.sh | ||
+ | /etc/init.d/rsyncRR-BS.sh | ||
+ | /etc/init.d/player.sh | ||
+ | /etc/init.d/qboost.sh | ||
+ | /etc/init.d/ssd_lab.sh | ||
+ | /etc/init.d/qpkg_res.sh | ||
+ | /etc/init.d/QcloudSSLCertificate.sh | ||
+ | /etc/init.d/nc.sh | ||
+ | /etc/init.d/LicenseCenter.sh | ||
+ | /etc/init.d/Entware.sh | ||
+ | /etc/init.d/Restic.sh | ||
+ | /etc/init.d/qvpn.sh | ||
+ | /etc/init.d/helpdesk.sh | ||
+ | /etc/init.d/hbs.sh | ||
+ | /etc/init.d/QNAP_Diagnostic_Tool.sh | ||
+ | /etc/init.d/BackupVersion.sh | ||
+ | /etc/init.d/qvsd.sh | ||
+ | /etc/init.d/CloudLink.sh | ||
+ | /etc/init.d/QAirplay.sh | ||
+ | /etc/init.d/Dropbox.sh | ||
+ | /etc/init.d/phpMyAdmin.sh | ||
+ | /etc/init.d/netmgr.sh | ||
+ | /etc/init.d/mtp_run.sh | ||
+ | /etc/init.d/bonjour.sh | ||
+ | /etc/init.d/smb.sh | ||
+ | /etc/init.d/wsd.sh | ||
+ | /etc/init.d/mkchangepwd.sh | ||
+ | /etc/init.d/force_shutdown.sh | ||
+ | /etc/init.d/getmac.sh | ||
+ | /etc/init.d/nvrd.sh | ||
+ | /etc/init.d/fbdisk.sh | ||
+ | /etc/init.d/qHAsyncman.sh | ||
+ | /etc/init.d/update_power.sh | ||
+ | /etc/init.d/genpowerfail.sh | ||
+ | /etc/init.d/iscsiinit.sh | ||
+ | /etc/init.d/install.sh | ||
+ | /etc/init.d/s3_callback.sh | ||
+ | /etc/init.d/snmp_ups.sh | ||
+ | /etc/init.d/avahi.sh | ||
+ | /etc/init.d/mariadb.sh | ||
+ | /etc/init.d/qplayd.sh | ||
+ | /etc/init.d/init_qpkg.sh | ||
+ | /etc/init.d/rcv_port.sh | ||
+ | /etc/init.d/addshare.sh | ||
+ | /etc/init.d/sysinit.sh | ||
+ | /etc/init.d/check_bootcmd.sh | ||
+ | /etc/init.d/scan_wifi_ups.sh | ||
+ | /etc/init.d/backup_conf.sh | ||
+ | /etc/init.d/ddns_update_for_cgi.sh | ||
+ | /etc/init.d/recycled.sh | ||
+ | /etc/init.d/rsyslog.sh | ||
+ | /etc/init.d/create_udev_rule.sh | ||
+ | /etc/init.d/adjust_sync_speed.sh | ||
+ | /etc/init.d/gen_tr_version_conf.sh | ||
+ | /etc/init.d/skylink-updater.sh | ||
+ | /etc/init.d/cloudinstall_finish.sh | ||
+ | /etc/init.d/udev_run.sh | ||
+ | /etc/init.d/radius.sh | ||
+ | /etc/init.d/update_def_share.sh | ||
+ | /etc/init.d/twonkymedia.sh | ||
+ | /etc/init.d/upnpd.sh | ||
+ | /etc/init.d/smb2_protocol.sh | ||
+ | /etc/init.d/init_final.sh | ||
+ | /etc/init.d/iscsitrgt.sh | ||
+ | /etc/init.d/qtag.sh | ||
+ | /etc/init.d/ntpf.sh | ||
+ | /etc/init.d/opentftp.sh | ||
+ | /etc/init.d/init_gpu.sh | ||
+ | /etc/init.d/timemachine.sh | ||
+ | /etc/init.d/remote_folder_mount.sh | ||
+ | /etc/init.d/convert2_ext4.sh | ||
+ | /etc/init.d/nsswitch.sh | ||
+ | /etc/init.d/qna_load.sh | ||
+ | /etc/init.d/radvd.sh | ||
+ | /etc/init.d/thttpd.sh | ||
+ | /etc/init.d/atalk.sh | ||
+ | /etc/init.d/idmap.sh | ||
+ | /etc/init.d/init_network.sh | ||
+ | /etc/init.d/dbus.sh | ||
+ | /etc/init.d/boot_done.sh | ||
+ | /etc/init.d/qcloud_init.sh | ||
+ | /etc/init.d/openssl_signature.sh | ||
+ | /etc/init.d/ldap.sh | ||
+ | /etc/init.d/qcloud_blob_daemon.sh | ||
+ | /etc/init.d/init_hardware.sh | ||
+ | /etc/init.d/ntpclient.sh | ||
+ | /etc/init.d/init_mac_addr.sh | ||
+ | /etc/init.d/ldap_backup_db.sh | ||
+ | /etc/init.d/enc_share.sh | ||
+ | /etc/init.d/push_notification_daemon.sh | ||
+ | /etc/init.d/rsyncd_srv.sh | ||
+ | /etc/init.d/ads_register_dns.sh | ||
+ | /etc/init.d/mysqld.sh | ||
+ | /etc/init.d/init_iTune.sh | ||
+ | /etc/init.d/ntpd.sh | ||
+ | /etc/init.d/timechange_notify.sh | ||
+ | /etc/init.d/printer.sh | ||
+ | /etc/init.d/photo_scand.sh | ||
+ | /etc/init.d/ipv6.sh | ||
+ | /etc/init.d/set_led.sh | ||
+ | /etc/init.d/qts_notice.sh | ||
+ | /etc/init.d/login.sh | ||
+ | /etc/init.d/sync_action.sh | ||
+ | /etc/init.d/check_lan_port.sh | ||
+ | /etc/init.d/cloudinstall_report_offline.sh | ||
+ | /etc/init.d/log_rotation.sh | ||
+ | /etc/init.d/qraid1.sh | ||
+ | /etc/init.d/refresh_internet_status.sh | ||
+ | /etc/init.d/usb_ups.sh | ||
+ | /etc/init.d/start_service.sh | ||
+ | /etc/init.d/qm2_nic.sh | ||
+ | /etc/init.d/nvr_svc.sh | ||
+ | /etc/init.d/iso_mount.sh | ||
+ | /etc/init.d/reset_sata.sh | ||
+ | /etc/init.d/cloudinstall_init_daemon.sh | ||
+ | /etc/init.d/killnas.sh | ||
+ | /etc/init.d/services.sh | ||
+ | /etc/init.d/antivirus.sh | ||
+ | /etc/init.d/ldap_server.sh | ||
+ | /etc/init.d/usb_device_check.sh | ||
+ | /etc/init.d/update_tr_004u_img.sh | ||
+ | /etc/init.d/init_lvm.sh | ||
+ | /etc/init.d/update_img.sh | ||
+ | /etc/init.d/load_lan_module.sh | ||
+ | /etc/init.d/ipchange_notify.sh | ||
+ | /etc/init.d/StartMediaService.sh | ||
+ | /etc/init.d/QMediaService.sh | ||
+ | /etc/init.d/qsnapman.sh | ||
+ | /etc/init.d/check_ddns_external_ip.sh | ||
+ | /etc/init.d/init_platform.sh | ||
+ | /etc/init.d/gen_hd_info.sh | ||
+ | /etc/init.d/rsyncSpeedTest.sh | ||
+ | /etc/init.d/kdebug.sh | ||
+ | /etc/init.d/chkcfgpart.sh | ||
+ | /etc/init.d/bluetooth.sh | ||
+ | /etc/init.d/init_check.sh | ||
+ | /etc/init.d/oray-updater.sh | ||
+ | /etc/init.d/refresh_nvr_crontab.sh | ||
+ | /etc/init.d/unit_test.sh | ||
+ | /etc/init.d/cdrom.sh | ||
+ | /etc/init.d/init_dns_type.sh | ||
+ | /etc/init.d/stunnel.sh | ||
+ | /etc/init.d/gen_issue.sh | ||
+ | /etc/init.d/updatedb.sh | ||
+ | /etc/init.d/porter.sh | ||
+ | /etc/init.d/flush_memory.sh | ||
+ | /etc/init.d/qsyncman.sh | ||
+ | /etc/init.d/logo.sh | ||
+ | /etc/init.d/nss2_dusg.sh | ||
+ | /etc/init.d/mtp_run_hal.sh | ||
+ | /etc/init.d/cacd.sh | ||
+ | /etc/init.d/ftp.sh | ||
+ | /etc/init.d/runone.sh | ||
+ | /etc/init.d/ups.sh | ||
+ | /etc/init.d/genLanglist.sh | ||
+ | /etc/init.d/shutdown_check.sh | ||
+ | /etc/init.d/noshareservices.sh | ||
+ | /etc/init.d/get_external_ip.sh | ||
+ | /etc/init.d/installtgz.sh | ||
+ | /etc/init.d/qna_setup.sh | ||
+ | /etc/init.d/nsed.sh | ||
+ | /etc/init.d/power_button.sh | ||
+ | /etc/init.d/tfan_auto_testing.sh | ||
+ | /etc/init.d/klogd.sh | ||
+ | /etc/init.d/update_tr_002_img.sh | ||
+ | /etc/init.d/ddns_update.sh | ||
+ | /etc/init.d/wireless_detect.sh | ||
+ | /etc/init.d/qanalytic_init.sh | ||
+ | /etc/init.d/network.sh | ||
+ | /etc/init.d/qbutton.sh | ||
+ | /etc/init.d/thunderbolt.sh | ||
+ | /etc/init.d/pw_sleep.sh | ||
+ | /etc/init.d/set_mtu.sh | ||
+ | /etc/init.d/init_nas.sh | ||
+ | /etc/init.d/thunderbolt_net.sh | ||
+ | /etc/init.d/qsyncsrv_install.sh | ||
+ | /etc/init.d/irqb.sh | ||
+ | /etc/init.d/wireless_modules.sh | ||
+ | /etc/init.d/update.sh | ||
+ | /etc/init.d/selfhost-updater.sh | ||
+ | /etc/init.d/Qthttpd.sh | ||
+ | /etc/init.d/lunportman.sh | ||
+ | /etc/init.d/ImRd.sh | ||
+ | /etc/init.d/hostname.sh | ||
+ | /etc/init.d/init_disk.sh | ||
+ | /etc/init.d/snapshot.sh | ||
+ | /etc/init.d/cloudinstall_init.sh | ||
+ | /etc/init.d/dav_mount.sh | ||
+ | /etc/init.d/init_acl.sh | ||
+ | /etc/init.d/lan_card_test.sh | ||
+ | /etc/init.d/crond.sh | ||
+ | /etc/init.d/wfm_thttpd.sh | ||
+ | /etc/init.d/cloudinstall_report_complete_daemon.sh | ||
+ | /etc/init.d/sdmd.sh | ||
+ | /etc/init.d/wireless.sh | ||
+ | /etc/init.d/reset_all.sh | ||
+ | /etc/init.d/recoverd.sh | ||
+ | /etc/init.d/storage_usage.sh | ||
+ | /etc/init.d/update_tr_img.sh | ||
+ | /etc/init.d/cupsd.sh | ||
+ | /etc/init.d/qaccess.sh | ||
+ | /etc/rcK.d/K78NotificationCenter.sh | ||
+ | </pre> | ||
+ | |||
+ | == TimeMachine == | ||
+ | * https://www.qnap.com/de-de/how-to/tutorial/article/ihren-mac-mit-time-machine-%C3%BCber-smb-auf-einem-qnap-nas-sichern | ||
+ | |||
+ | == NFS == | ||
+ | * QTS 4.2.2 -> NFSv2/v3 Server auf Port 2049 | ||
+ | * http://kodi.wiki/view/NFS#QNAP | ||
+ | |||
+ | <pre> | ||
+ | |||
+ | /etc/config/nfssetting // nfs rechte config | ||
+ | |||
+ | /etc/exports // freigabe | ||
+ | |||
+ | |||
+ | /etc/init.d/nfs {start|stop|restart|reexport|remountd|create_keytab} | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | == Virtualization Station == | ||
+ | === Paralells Desktop VM migration === | ||
+ | Wer von eine VM von einen OSX Paralells Desktop auf einen QNAP VM Host migrieren möchte, | ||
+ | nimmt dafür am besten die Testversion von [https://www.vmware.com/de/products/fusion/ VMware Fusion], | ||
+ | hier kann man im Gegensatz zum Paralells Desktop die VM direkt in .ovh (Open Virtualization Format) | ||
+ | exportieren und somit direkt in das QNAP Virtualization Station importieren. Mit Paralells Desktop | ||
+ | müsste man nach dem Export noch eine Konvertierung durchführen, kann man so machen aber ist halt..... | ||
+ | |||
+ | === WIndows ACL === | ||
+ | * https://www.qnap.com/de-de/how-to/faq/article/warum-verschwinden-die-windows-acl-einstellungen-eines-unterordners-wenn-ich-erweiterte-ordnerberechtigungen-und-windows-acl-unterst%C3%BCtzung-zusammen-aktiviere-und-dann-nur-die-erweiterten-ordnerberechtigungen-deaktiviere | ||
+ | |||
+ | = Shell Befehle = | ||
+ | Hier läuft [https://busybox.net/ Busybox]! | ||
+ | == Server Linux version == | ||
+ | <pre> | ||
+ | busybox | head -1 | ||
+ | hal_app --se_sys_get_board_sn enc_sys_id=root // S/N auslesen | ||
+ | </Pre> | ||
+ | |||
+ | == CPU & Architektur == | ||
+ | <pre> | ||
+ | cat /proc/cpuinfo | ||
+ | cat /proc/cpuinfo |grep model | ||
+ | |||
+ | uname -m | ||
+ | </pre> | ||
+ | |||
+ | == Dump Qnap Logs == | ||
+ | Falls die GUI mal nicht funktioniert, geht das auch via Shell ;) | ||
+ | <pre> | ||
+ | /mnt/ext/opt/qdesk/www/data/script/get_log $(get_hwsn) | ||
+ | </pre> | ||
+ | Der gepackte Dump liegt dann hier, und kann mit scp (von der lokalen shell) dann nach Hause kopiert werden | ||
+ | <pre> | ||
+ | cd /tmp/helpdump/ | ||
+ | |||
+ | scp admin@192.168.XXX.XXX:/tmp/helpdump/QXXXXXXXXX.zip Pfad/auf/euren/client/ | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | == Enclosure == | ||
+ | <pre> | ||
+ | rm /etc/config/enclosure.map // Erweiterngseinheiten zurücksetzen | ||
+ | cp /etc/config/raid.conf /etc/config/raid.conf.bckp // Sicherheitskopie | ||
+ | vim /etc/config/raid.conf // Altes Raidgruppe + HDD`s entfernen | ||
+ | </pre> | ||
+ | |||
+ | == HDD == | ||
+ | <pre> | ||
+ | df -h // Mit "disk free" eingehängte Partitionen auflisten, "-h" = human radable | ||
+ | fdisk /dev/sdg1 // Mit "Fixed Disk" z.B. externe Platten auswählen, hier z.B. "/dev/sdg1" | ||
+ | p // fdisk menü: Partionen der o.g. Platte anzeigen | ||
+ | d // fdisk menü: Partitionen der o.g. Platte löschen | ||
+ | m // fdisk menü: Verfügbare Dateisysteme anzeigen | ||
+ | n // fdisk menü: Neue Partition anlegen | ||
+ | </pre> | ||
+ | |||
+ | == Netzwerk == | ||
+ | <pre> | ||
+ | ifconfig eth4 10.0.2.20 netmask 255.255.255.0 | ||
+ | </pre> | ||
+ | == Raid == | ||
+ | <pre> | ||
+ | cat /proc/mdstat // Kurze Zusammenfassung aller Raid | ||
+ | // Ausgaben: | ||
+ | md9 // System (Raid 1) | ||
+ | md13 // Swap (Raid 1) | ||
+ | md321 // Extended Swap (Raid 1) | ||
+ | </pre> | ||
+ | |||
+ | == Qsync == | ||
+ | <pre> | ||
+ | cat /etc/logs/qsync/qsync-Job0.log | ||
+ | </pre> | ||
+ | |||
+ | == qcli == | ||
+ | <pre> | ||
+ | qcli -l user=admin pw='PASSWORT' saveauthsid=yes // login first ;-) | ||
+ | |||
+ | qcli_admin qcli_firmwareupdate qcli_log qcli_pool qcli_rtrrserver qcli_timezone | ||
+ | qcli_vpnserver qcli_backuprestore qcli_hardware qcli_mysqlserver qcli_power qcli_sharedfolder | ||
+ | qcli_usergroups qcli_wifi qcli_cache qcli_hdd qcli_nastonas qcli_quota | ||
+ | qcli_snapreplica qcli_users qcli_domaincontroller qcli_iscsi qcli_network qcli_raid | ||
+ | qcli_snapshotvault qcli_virtualdisk qcli_domainsecurity qcli_iscsiacl qcli_networkrecyclebin qcli_rsync | ||
+ | qcli_storage qcli_volume qcli_encrypt qcli_iscsibackup qcli_networkservice qcli_rsyncserver | ||
+ | qcli_systemstatus qcli_volumesnapshot qcli_externaldevice qcli_iscsisnapshot qcli_ntp qcli_rtrr | ||
+ | qcli_timemachine qcli_vpnclient | ||
+ | |||
+ | qcli_hdd -l // Zeigt alle aktiven enclosures | ||
+ | qcli_hdd -D enclosureID=0 // Zeigt alle Disks der gewählten enclosure | ||
+ | </pre> | ||
+ | |||
+ | == Screen == | ||
+ | Unterstütztes Anzeigeterminal herausfinden: | ||
+ | <pre> | ||
+ | ls /usr/share/terminfo/x | ||
+ | </pre> | ||
+ | Ausgabe: | ||
+ | <pre> | ||
+ | xterm | ||
+ | xterm-xfree86 | ||
+ | </pre> | ||
+ | Umgebungsvariable entsprechend setzen: | ||
+ | <pre> | ||
+ | export TERM=xterm-xfree86 | ||
+ | </pre> | ||
+ | kurzer test & los gehts | ||
+ | <pre> | ||
+ | TERMINFO='/usr/share/terminfo/' screen | ||
+ | </pre> | ||
+ | |||
+ | = Debian = | ||
+ | * ARM = https://wiki.qnap.com/wiki/Debian_Installation_On_QNAP | ||
+ | * x86 = https://www.pro-linux.de/artikel/2/1530/2,installation-von-debian.html | ||
+ | <pre> | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | = Produkte = | ||
+ | == TS-439 Pro II+ == | ||
+ | === Specs=== | ||
+ | * CPU: Intel(R) Atom(TM) CPU D425 @ 1.80GHz | ||
+ | * RAM: 1GB | ||
− | == Openssh == | + | === Openssh === |
Eigentlich hat die Orginale Firmware schon einen sshd, aber der will nur den user "admin" reinlassen unter anderem. | Eigentlich hat die Orginale Firmware schon einen sshd, aber der will nur den user "admin" reinlassen unter anderem. | ||
Das war anfangs kein problem, bis ich git über den ipkg-manager installiert hatte und einen anderen user via ssh | Das war anfangs kein problem, bis ich git über den ipkg-manager installiert hatte und einen anderen user via ssh | ||
einloggen wollte. Eine kurze Recherche ergab, das jemand schon ein [http://www.boesebeck.name/?p=697 Kochrezept] dafür bereitliegen hat. | einloggen wollte. Eine kurze Recherche ergab, das jemand schon ein [http://www.boesebeck.name/?p=697 Kochrezept] dafür bereitliegen hat. | ||
+ | === RAM Upgrade === | ||
+ | * Default RAM: 1x 1GB ADATA AD2S800B1G6-B (SODIMM, DDR2, PC-6400, CL6, 800MHz) | ||
+ | * Upgrade RAM: 1x 2GB Kingston KVR800D2S6/2G (SODIMM, DDR2, PC2-6400, CL6, 800 MHz) | ||
+ | |||
+ | |||
+ | === SNMP === | ||
+ | ==== Check_mk ==== | ||
+ | Da war jemand schon schneller ;-) | ||
+ | |||
+ | * https://www.kickinass.net/qnap-ts-439-pro-check_mk_agent-installieren/ | ||
+ | |||
+ | ==== OpenNMS ==== | ||
+ | [http://unicolet.blogspot.de/2012/06/monitoring-qnap-devices-with-opennms.html Kochrezept] | ||
+ | |||
+ | ==== Icinga Plugin ==== | ||
+ | Gibt es schon, mehr dazu [http://wiki.d0b.eu/index.php?title=Icinga2#check_qnap hier] | ||
+ | |||
+ | ==== Debian ==== | ||
+ | * https://www.cyrius.com/debian/kirkwood/qnap/ts-41x/install/ | ||
+ | * https://wiki.debian.org/InstallingDebianOn/QNAP | ||
− | = | + | ==== OID`s ==== |
− | |||
− | === OID`s === | ||
{|class="wikitable sortable" | {|class="wikitable sortable" | ||
|- | |- | ||
− | | | + | | MIB || OBJECT LABEL || OBJECT ID || Data Type || Value (Example) |
|- | |- | ||
| [http://www.oidview.com/mibs/0/RFC1213-MIB.html MIB-2] || || .1.3.6.1.2.1 || || - | | [http://www.oidview.com/mibs/0/RFC1213-MIB.html MIB-2] || || .1.3.6.1.2.1 || || - | ||
|- | |- | ||
− | | | + | | - || system || .1.3.6.1.2.1.1 || || - |
|- | |- | ||
− | | | + | | - || sysDescr.0 || .1.3.6.1.2.1.1.1.0 || OctetString || "GS1910-24HP 24x1G Ethernet Switch" |
|- | |- | ||
− | | | + | | - || sysUpTime.0 || .1.3.6.1.2.1.1.3.0 || TimeTicks || "Timeticks: (9400662) 1 day, 2:06:46.62" |
|- | |- | ||
− | | | + | | - || sysContact.0 || .1.3.6.1.2.1.1.4.0 || OctetString || "your@email.tld" |
|- | |- | ||
− | | | + | | - || sysName.0 || .1.3.6.1.2.1.1.5.0 || OctetString || "switch_23" |
|- | |- | ||
− | | | + | | - || sysLocation.0 || .1.3.6.1.2.1.1.6.0 || OctetString || "Rack 3" |
|- | |- | ||
| Interfaces || || .1.3.6.1.2.1.2 || || - | | Interfaces || || .1.3.6.1.2.1.2 || || - | ||
Zeile 55: | Zeile 690: | ||
| Firmware Version || entPhysicalFirmwareRev || .1.3.6.1.2.1.47.1.1.1.1.9.1 || OctetString || "V2.00(AAAY.0)C0" | | Firmware Version || entPhysicalFirmwareRev || .1.3.6.1.2.1.47.1.1.1.1.9.1 || OctetString || "V2.00(AAAY.0)C0" | ||
|- | |- | ||
− | | NAS-MIB || storage || .1.3.6.1.4.1.24681 || - || - | + | | [http://www.oidview.com/mibs/24681/NAS-MIB.html NAS-MIB] || storage || .1.3.6.1.4.1.24681 || - || - |
|- | |- | ||
| - || SystemCPU-Usage || .1.3.6.1.4.1.24681.1.2.1.0 || OctetString || "0,90 %" | | - || SystemCPU-Usage || .1.3.6.1.4.1.24681.1.2.1.0 || OctetString || "0,90 %" | ||
Zeile 61: | Zeile 696: | ||
| - || SystemTotalMem || .1.3.6.1.4.1.24681.1.2.2.0 || OctetString || "989.0 MB" | | - || SystemTotalMem || .1.3.6.1.4.1.24681.1.2.2.0 || OctetString || "989.0 MB" | ||
|- | |- | ||
− | | - || SystemFreeMem || .1.3.6.1.4.1.24681.1.2.3.0 || OctetString || " | + | | - || SystemFreeMem || .1.3.6.1.4.1.24681.1.2.3.0 || OctetString || "266.0 MB" |
|- | |- | ||
| - || CPU-Temperature || .1.3.6.1.4.1.24681.1.2.5.0 || OctetString || "43 C/109 F" | | - || CPU-Temperature || .1.3.6.1.4.1.24681.1.2.5.0 || OctetString || "43 C/109 F" | ||
Zeile 71: | Zeile 706: | ||
| - || SysFanNumber || .1.3.6.1.4.1.24681.1.2.14.0 || Integer || "1" | | - || SysFanNumber || .1.3.6.1.4.1.24681.1.2.14.0 || Integer || "1" | ||
|- | |- | ||
− | | - || SysFanSpeed || .1.3.6.1.4.1.24681.1.2.15.1.3.1 || | + | | - || SysFanSpeed || .1.3.6.1.4.1.24681.1.2.15.1.3.1 || OctetString || "1280 RPM" |
|- | |- | ||
| - || SysVolumeNumber || .1.3.6.1.4.1.24681.1.2.16.0 || Integer || "1" | | - || SysVolumeNumber || .1.3.6.1.4.1.24681.1.2.16.0 || Integer || "1" | ||
Zeile 81: | Zeile 716: | ||
| - || HdTemperature || .1.3.6.1.4.1.24681.1.2.11.1.3.{1-4} || OctetString || " 36 C/96 F" | | - || HdTemperature || .1.3.6.1.4.1.24681.1.2.11.1.3.{1-4} || OctetString || " 36 C/96 F" | ||
|} | |} | ||
+ | |||
+ | == TS-470 Pro == | ||
+ | === RAM Upgrade === | ||
+ | Es müssen die Festplatten ausgebaut werden, anschließend sind die RAM Slots erreichbar. Slot 1 ist gut erreichbar, Slot 2 etwas schwerer, | ||
+ | wer es sich leicht machen will, baut nur 8GB RAM auf Slot 1 nach, der Standard 2GB RAM ist auf Slot 2 verbaut. Für den geschickten Techniker sollte es aber auch kein Problem sein beide Riegel zu tauschen. | ||
+ | * Kompatibler RAM | ||
+ | ** [http://www.kingston.com/dataSheets/KVR16S11K2_16.pdf Kingston SO-DIMM PC-12800 (1600Mhz) DDR3 RAM, 1.5V] | ||
+ | ***[http://forum.qnap.com/viewtopic.php?t=90278 QNAP Forum] | ||
+ | |||
+ | == TVS-471 == | ||
+ | Gibt es mit in folgenden Ausführungen: | ||
+ | * TVS-471-PT-4G: Dual-core Intel G3250 3.2 GHz Processor + 4 GB DDR3 RAM | ||
+ | * TVS-471-i3-4G: Dual-core Intel Core i3-4150 3.5 GHz Processor + 4 GB DDR3 RAM | ||
+ | |||
+ | === RAM Upgrade === | ||
+ | Bei diesen Modell wird ein Riegel von der Innenseite (HDD Schacht1) ausgetauscht, der andere ist von der Außenseite sehr gut erreichbar nachdem das Gehäuseblech (3 Schrauben) entfernt wurde. | ||
+ | |||
+ | * Default RAM: Transcend 4GB kit (2x2GB) DDR3 PC3-12800,1600MHz, 702662-3524 | ||
+ | * Upgrade RAM: Crucial 16GB kit (2x8GB) DDR3 PC3-12800,1600MHz, CT2K8G3S160BM | ||
+ | |||
+ | == TS-879U-RP == | ||
+ | * https://www.qnap.com/de-de/product/ts-879u-rp | ||
+ | * [https://www.qnap.com/de-de/product_x_down/product_down.php?II=16 Downloads für das TS-879U-RP] | ||
+ | |||
+ | === Zubehör === | ||
+ | ==== Rails ==== | ||
+ | * A03-Serie (Gehäuse), Schienenset, maximale Belastbarkeit 57 kg | ||
+ | |||
+ | ==== RAM Upgrade ==== | ||
+ | Anforderung: | ||
+ | DDR3 - 8 GB - DIMM 240-PIN - 1600 MHz / PC3-12800 - ungepuffert - nicht-ECC - für QNAP TS-1270U-RP, TS-1279U-RP, TS-1679U-RP, TS-870U-RP, TS-879U-RP | ||
+ | |||
+ | * Default RAM: | ||
+ | * Upgrade RAM: [https://www.compuram.de/arbeitsspeicher,qnap,nas,ts-870u-rp-4-+ts-879u-rp-4-+ts-1279u-rp-4-+ts-1270u-rp,8gb,crm8d3-1-qn128_s006390.htm Bsp.] | ||
+ | |||
+ | === VTx aktivieren === | ||
+ | Um auch bei diesen Modell die Virtualization Station nutzen zu können, muss man zuerst im Bios die VTx (Intel Virtualization Technology, Intel) Funktion aktivieren. Dafür einen Monitor + Tastatur am QNAP anschliessen & ins Bios neustarten. Wie das genau geht ist hier beschrieben: | ||
+ | * de https://www.qnap.com/de-de/qa/con_show.php?op=showone&cid=258 | ||
+ | * en https://www.qnap.com/en/qa/con_show.php?op=showone&cid=258 | ||
+ | |||
+ | == TVS-871U-RP == | ||
+ | * https://www.qnap.com/de-de/product/tvs-871u-rp | ||
+ | === Zubehör === | ||
+ | ==== Rails ==== | ||
+ | * RAIL-B02 | ||
+ | |||
+ | == TVS-872XU-RP == | ||
+ | * https://www.qnap.com/de-de/product/tvs-872xu-rp | ||
+ | === Zubehör === | ||
+ | ==== Rails ==== | ||
+ | * RAIL-B02 | ||
+ | |||
+ | = Zubehör = | ||
+ | == SAS-12G2E-U == | ||
+ | Es handelt sich hier um einen SAS Controller von LSI vom Typ SAS3008 (SAS3008 PCI Express® to 8-Port 12 Gb/s SAS+SATA Controller) | ||
+ | |||
+ | * https://www.broadcom.com/products/storage/sas-sata-controllers/sas-3008 | ||
+ | * https://docs.broadcom.com/docs/12351998 | ||
+ | |||
+ | = Troubleshooting = | ||
+ | == AFP == | ||
+ | === CNID-DB === | ||
+ | '''Fehlerbeschreibung: ''' Es erscheint folgende Fehlermeldung beim Zugriff auf eine Freigabe via [https://de.wikipedia.org/wiki/Apple_Filing_Protocol AFP]: ''"Something wrong with the volume's cnid db using temporary cnid db instead. Check server messages for details!"'' | ||
+ | |||
+ | '''Fehlerursache: ''' Es scheint die CNID-DB ("Catalog Node ID" Datenbank) der AFP-Freigabe Schaden genommen zu haben. | ||
+ | |||
+ | '''Fehlerbehebung: ''' .AppleDB der jeweiligen Freigabe löschen via ssh, AFP erstellt den Ordner neu. [http://wiki.qnap.com/wiki/How_to_remove_.AppleDB_for_the_share_with_problem%3F QNAP Howto] | ||
+ | <pre> | ||
+ | ssh admin@<nas-ip> // Als admin via ssh anmelden | ||
+ | find / -name cnid2.db | sed 's/\/share/rm -r \/share/' > rm_cnid // CNID-DB`s suchen | "rm -r" einfügen > Ergebnis in Datei speichern | ||
+ | chmod u+x rm_cnid // User Rechte zur Ausführung des Skripts geben | ||
+ | ./rm_cnidb // Skript ausführen | ||
+ | </pre> | ||
+ | |||
+ | * Hier gibts es auch noch was http://netatalk.sourceforge.net/2.1/htmldocs/dbd.1.html | ||
+ | |||
+ | === Freigabeorder weg === | ||
+ | Wenn der Server mit einen Stromausfall heruntergefahren wurde, kann es passieren das [https://de.wikipedia.org/wiki/Apple_Filing_Protocol AFP] Freigabe Ordner verschwinden unter [https://de.wikipedia.org/wiki/Server_Message_Block SMB] noch sichtbar. Aus bisher unbekannten Gründen wird der Ordner auf "versteckt" gesetzt, so macht ihr in wieder Sichtbar: | ||
+ | |||
+ | Netzlaufwerk mounten via Finder | ||
+ | * Den Finder öffnen anschliessend Shortcut "CMD+K" ausführen (Dialog "Mit Server verbinden zu öffnen") | ||
+ | ** Im neuen Dialog Fenster Pfad angeben: "afp://<SERVER-IP>/<PFAD>", falls es keine öffentliche Freigabe ist werdet ihr anschließen nach Benutzernamen + Passwort gefragt. | ||
+ | |||
+ | Alternativ Netzlaufwerk mounten via Terminal | ||
+ | <pre> | ||
+ | sudo mkdir /Volumes/<FREIGABENAME> // Ordner für die Freigabe anlegen | ||
+ | sudo mount -t afp afp://user:pass@<SERVER-IP>/<PFAD> /Volumes/<FREIGABENAME> // Netzlaufwerk einhängen | ||
+ | </pre> | ||
+ | |||
+ | Jetzt zu den Pfad Navigieren wo sich der fehlende Ordner befindet und unsichtbare Ordner anzeigen: | ||
+ | <pre> | ||
+ | cd /Volumes/<FREIGABENAME>/ // In das entsprechende Verzeichnis wechseln | ||
+ | defaults write com.apple.finder AppleShowAllFiles TRUE // Versteckte Ordner sichtbar machen | ||
+ | </pre> | ||
+ | Anschliessend entsprechende Ordner wieder sichtbar machen | ||
+ | <pre> | ||
+ | sudo SetFile -a v <UNSICHTBARER-ORDNER>/ // Datei Attribute auf in/visible setzen | ||
+ | sudo chflags nohidden <UNSICHTBARER-ORDNER>/ // Datei Flags auf sichtbar stellen (nur GUI) | ||
+ | |||
+ | defaults write com.apple.finder AppleShowAllFiles FALSE // Versteckte Ordner unsichtbar machen | ||
+ | sudo umount /Volumes/<FREIGABENAME> // Netzlaufwerk aushängen falls es nicht mehr gebraucht wird | ||
+ | </pre> | ||
+ | |||
+ | == Dateien werden zeitverzögert gelöscht == | ||
+ | Dateien werden stark zeitlich versetzt (15-60sek.) gelöscht | ||
+ | |||
+ | Freigabe -> Option "Erweiterte Ordnerzugriffsrechte aktivieren" -> Ein & wieder ausschalten | ||
+ | Manchmal reicht es auch schon den Netzwerkpapierkorb zu deaktiveren und wieder aktivieren | ||
+ | |||
+ | * forum.qnap.com/viewtopic.php?f=189&t=41733 | ||
+ | |||
+ | == Malware == | ||
+ | === Derek === | ||
+ | <pre> | ||
+ | curl https://download.qnap.com/Storage/tsd/utility/derek-be-gone.sh | sh | ||
+ | </pre> | ||
+ | |||
+ | Quelltext: | ||
+ | <pre> | ||
+ | #!/bin/sh | ||
+ | |||
+ | ###################### | ||
+ | # Derek Be Gone v1.1 # | ||
+ | # Author: qnapd # | ||
+ | ###################### | ||
+ | |||
+ | set_mutable() { | ||
+ | if [ ! -e "$1" ]; then | ||
+ | return 0 | ||
+ | fi | ||
+ | if [ -e /etc/IS_64BITS ]; then | ||
+ | # 64bit set mutable | ||
+ | SET_M_64="$1" | ||
+ | echo " [*] Setting mutable 64bit on $SET_M_64" | ||
+ | python -c "import os,fcntl,sys,struct;fd = os.open('${SET_M_64}', os.O_RDONLY); rec = struct.pack('L', 0); x = fcntl.ioctl(fd, 0x80086601, rec); flags = struct.unpack('L',x)[0]; was_immutable = flags & 0x00000010; flags = flags & ~0x00000010; f = struct.pack('i', flags); fcntl.ioctl(fd, 0x40086602, f); os.close(fd)" | ||
+ | else | ||
+ | # 32bit set mutable | ||
+ | SET_M_32="$1" | ||
+ | echo " [*] Setting mutable 32bit on $SET_M_32" | ||
+ | python -c "import os,fcntl,sys,struct;fd = os.open('${SET_M_32}', os.O_RDONLY); rec = struct.pack('L', 0); x = fcntl.ioctl(fd, 0x80046601, rec); flags = struct.unpack('L',x)[0]; was_immutable = flags & 0x00000010; flags = flags & ~0x00000010; f = struct.pack('i', flags); fcntl.ioctl(fd, 0x40046602, f); os.close(fd)" | ||
+ | fi | ||
+ | } | ||
+ | |||
+ | remove_bad_thing() { | ||
+ | badpath="$1" | ||
+ | if [ -e "$badpath" ]; then | ||
+ | echo " [*] Removing $badpath" | ||
+ | rm -rf "$badpath" | ||
+ | if [ $? -eq 0 ]; then | ||
+ | echo " [+] Success!" | ||
+ | else | ||
+ | echo " [-] Failed" | ||
+ | fi | ||
+ | fi | ||
+ | } | ||
+ | |||
+ | # clear fake qpkg | ||
+ | bdir= | ||
+ | test -f "${confdir}/smb.conf" && for i in homes Public Download Multimedia Web Recordings; do bdir=`getcfg "$i" path -f "${confdir}/smb.conf"` && test ! -z "$bdir" && bdir=`dirname "$bdir"` && test -d "$bdir" && testwriteable=$(mktemp "${bdir}/.tmp.XXXXXX") && rm "${testwriteable}" && break; bdir=''; done | ||
+ | test -z "${bdir}" || test ! -d "${bdir}" && { command -v readlink >/dev/null 2>&1 || ln -sf /bin/busybox /usr/bin/readlink; for i in Public Download Multimedia Web Recordings homes; do bdir=`readlink "/share/${i}" 2>/dev/null` && test ! -z "$bdir" && bdir=`dirname "$bdir"` && bdir=/share/${bdir##*/} && test -d "$bdir" && break; done; | ||
+ | test -z "${bdir}" || test ! -d "${bdir}"; } && { bdir=`getcfg SHARE_DEF defVolMP -f "${confdir}/def_share.info"` | ||
+ | test -z "${bdir}" || test ! -d "${bdir}"; } && { bdir=`mount | sed -n "s/.*\(\/share\/[^ /]\+\) .*/\1/gp" | head -n 1` | ||
+ | test -z "${bdir}" || test ! -d "${bdir}"; } && { for i in CACHEDEV3_DATA CACHEDEV2_DATA CACHEDEV1_DATA MD0_DATA; do test -d "/share/${i}" && bdir="/share/${i}" && break; done; | ||
+ | test -z "${bdir}" || test ! -d "${bdir}" && bdir=/mnt/HDA_ROOT; } | ||
+ | |||
+ | echo "[o] System path: ${bdir}" | ||
+ | echo "[o] Removing fake qpkg" | ||
+ | remove_bad_thing "${bdir}/.qpkg/.liveupdate/" | ||
+ | remove_bad_thing "${bdir}/.qpkg/.config/" | ||
+ | echo "---" | ||
+ | |||
+ | # clear dom | ||
+ | mdir=/tmp/config | ||
+ | __BOOT_DEV= | ||
+ | __model=`getcfg System "Internal Model"` | ||
+ | CONFIG_DEV_NODE=`getcfg "CONFIG STORAGE" DEVICE_NODE -f /etc/platform.conf` | ||
+ | CONFIG_DEV_PART=`getcfg "CONFIG STORAGE" FS_ACTIVE_PARTITION -f /etc/platform.conf` | ||
+ | CONFIG_DEV_FS=`getcfg "CONFIG STORAGE" FS_TYPE -f /etc/platform.conf` | ||
+ | __BOOT_CONF=`test -f /etc/default_config/BOOT.conf && cat /etc/default_config/BOOT.conf 2>/dev/null || cat "${confdir}/BOOT.conf"` || { test "$arch_o" = arm && __BOOT_CONF=TS-NASARM; } | ||
+ | command -v hal_app > /dev/null 2>&1 && { __BOOT_DEV=$(hal_app --get_boot_pd port_id=0); } | ||
+ | test "${__BOOT_CONF}" = TS-NASARM || test "$arch_o" = arm && { test -f /etc/IS_TAS && __BOOT_DEV="${__BOOT_DEV:-/dev/mtdblock}7" || __BOOT_DEV="${__BOOT_DEV:-/dev/mtdblock}5"; } || __BOOT_DEV="${__BOOT_DEV:-/dev/sdx}6" | ||
+ | test "x${CONFIG_DEV_NODE}" != "x" && { ubiattach -m "${CONFIG_DEV_PART}" -d 2; mount -t ubifs ubi2:config "${mdir}" > /dev/null 2>&1 || { test -f /etc/IS_TAS && mount -t ext4 /dev/mmcblk0p7 "${mdir}"; } } || mount ${__BOOT_DEV} -t ext2 ${mdir} || { test "${__model}" = "TS-201" && mount -t ext2 /dev/mtdblock4 ${mdir}; } || { ubiattach -m "${CONFIG_DEV_PART}" -d 2; mount -t ubifs ubi2:config "${mdir}"; mount -t ext4 /dev/mmcblk0p7 "${mdir}"; } || { test "${__model}" = "TS-269L" && mount -t ext2 /dev/sdc6 ${mdir}; } || { test "${__model}" = "TS-869" && mount -t ext2 /dev/sdi6 ${mdir}; } || { test "$arch_o" = arm || ${__BOOT_CONF} = "TS-NASARM" && { for i in 5 7 4 6 3 8; do mount -t ext2 "/dev/mtdblock${i}" ${mdir} && break; done; }; } || { test "$arch_o" = x86 && for n in /dev/sdc /dev/sdx /dev/sdi $__BOOT_DEV; do for i in 6 $CONFIG_DEV_PART; do mount -t ext2 ${n}${i} ${mdir} && break 2; done; done; } || { mount -t ext2 $(/sbin/hal_app --get_boot_pd port_id=0)6 ${mdir}; } | ||
+ | |||
+ | echo "[o] Cleaning DOM" | ||
+ | remove_bad_thing "$mdir/autorun.sh" | ||
+ | for i in $mdir/K0*.sh; do | ||
+ | remove_bad_thing "$i" | ||
+ | done | ||
+ | umount "$mdir" | ||
+ | echo "---" | ||
+ | |||
+ | # reinstall MR | ||
+ | echo "[o] Remove old MR" | ||
+ | mrpath="${bdir}/.qpkg/MalwareRemover/" | ||
+ | set_mutable "$mrpath" | ||
+ | set_mutable "$mrpath/modules/10_derek_3.pyc" | ||
+ | set_mutable "$mrpath/modules/12_derek_3.pyc" | ||
+ | remove_bad_thing "$mrpath" | ||
+ | rmcfg MalwareRemover -f /etc/config/qpkg.conf | ||
+ | echo "---" | ||
+ | |||
+ | echo "[o] Install new MR" | ||
+ | mrpkg=MalwareRemover_3.4.0_20190121_173849.qpkg | ||
+ | wget -nv "https://download.qnap.com/Storage/tsd/utility/$mrpkg" | ||
+ | sh "$mrpkg" > /dev/null 2>&1 | ||
+ | getcfg MalwareRemover Enable -f /etc/config/qpkg.conf > /dev/null | ||
+ | if [ $? -eq 0 ]; then | ||
+ | echo " [+] Success!" | ||
+ | else | ||
+ | echo " [-] Failed" | ||
+ | fi | ||
+ | rm -f "$mrpkg" | ||
+ | echo "---" | ||
+ | echo "Finished!" | ||
+ | rm -f "$0" | ||
+ | |||
+ | </pre> | ||
+ | |||
+ | * [https://forum.qnap.com/viewtopic.php?f=50&t=146352 Thread auf forum.qnap.com] | ||
+ | |||
+ | == Migration == | ||
+ | === 4.2.X -> 4.3.X === | ||
+ | Am besten gar nicht erst migrieren sondern neu anlegen ist mein Fazit... | ||
+ | |||
+ | Hier die Dinge die auf jeden Fall nicht mehr funktionieren: | ||
+ | * RSYNC Backup Jobs müssen neu angelegt werden | ||
+ | * NFS Freigaben funktionieren nur noch Fehlerhaft (Ordner werden nicht korrekt angezeigt/verschwinden im Zugriff) | ||
+ | |||
+ | |||
+ | == NFS == | ||
+ | In der Nachfolgenden Fehlersuche gehen wir mal davon aus der Server die IP-Adresse 192.168.23.23 hat und der Client sich im gleichen Netz befindet mit einer abweichende IP-Adresse (z.B. 192.168.23.42). | ||
+ | |||
+ | * Physikalische Verbindung prüfen (Client: Ping 192.168.23.23) | ||
+ | * Prüfen ob RPC Messages durch das Netzwerk gelassen werden (Firewall Log prüfen) | ||
+ | * Prüfen ob der entsprechende RPC Dienst läuft (Server & Client) ggf. neustarten (/etc/init.d/nfs restart) | ||
+ | ** Server: "rpc.nfsd -d" | ||
+ | ** Client: "rpcinfo -p 192.168.23.23 | grep nfs" | ||
+ | * Funktioniert die Freigabe (Client: showmount -e 192.168.23.23) | ||
+ | * Freigabe neu verbinden (Client: umount) | ||
+ | * Wenn es hier noch probleme gibt wird es tricky, am besten pakete mitschneiden (z.B. Wireshark) und nachfolgende Befehle | ||
+ | <pre> | ||
+ | ls -ld /pfad/zur/freigabe | ||
+ | |||
+ | getfacl /pfad/zur/freigabe | ||
+ | |||
+ | dmesg | grep NFS* | ||
+ | |||
+ | nfsstat | ||
+ | </pre> | ||
+ | |||
+ | |||
+ | Links | ||
+ | * https://linux.die.net/man/8/nfsstat | ||
+ | * https://wiki.archlinux.org/index.php/NFS/Troubleshooting#Debugging | ||
+ | * https://www.linuxquestions.org/questions/linux-newbie-8/can-see-my-nfs-share-but-not-the-files-folders-inside-it-4175621092/page3.html | ||
+ | * https://www.thegeekdiary.com/troubleshooting-common-nfs-issues-in-linux/ | ||
+ | |||
+ | == SCSI Sense Fehler == | ||
+ | * https://en.wikipedia.org/wiki/Key_Code_Qualifier | ||
+ | |||
+ | == TVS-663 HDD Eject== | ||
+ | * Schlechtes Backplane Design, Mosfet überhitzen - Lösung Bauteile ersetzen oder Lüfter Manuell voll aufdrehen, gerät kühl halten | ||
+ | * https://forum.qnap.com/viewtopic.php?f=25&t=134212&start=435 | ||
+ | |||
+ | Lösungen: | ||
+ | * Alle Mosfets (AP4957AGM) tauschen und Gatewiderstände korrigieren | ||
+ | * Mosfets überbrücken (D1 - S1 + D2 - S2), an den Pins bzw. falls vorhanden lötbrücken | ||
+ | |||
+ | = Links = | ||
+ | * [https://www.qnap.com/de-de/how-to/tutorial/article/online-raid-kapazit%C3%A4tserweiterung Online-RAID-Kapazitätserweiterung] | ||
+ | * [https://www.qnap.com/de-de/how-to/tutorial/article/online-raid-level-migration Online-RAID-Level-Migration] | ||
+ | * [https://www.qnap.com/de-de/how-to/tutorial/article/wiederherstellung-ihres-erweiterungsger%C3%A4ts-nach-ersatz-oder-betriebsunterbrechung Wiederherstellung Ihres Erweiterungsgeräts nach Ersatz oder Betriebsunterbrechung] | ||
+ | * [https://www.qnap.com/de-de/how-to/tutorial/article/wie-werden-daten-mit-der-jbod-migration-zu-anderen-nas-ger%C3%A4ten-verschoben Wie werden Daten mit der JBOD-Migration zu anderen NAS-Geräten verschoben?] | ||
+ | * [https://wiki.qnap.com/wiki/Add_items_to_crontab QNAP Crontab] | ||
+ | |||
+ | * [https://www.qnap.com/tr-tr/how-to/knowledge-base/article/how-to-downgrade-firmware/ How to downgrade firmware?] | ||
+ | * [https://www.qnap.com/de-de/how-to/tutorial/article/wie-wird-die-firmware-ihres-qnap-nas-aktualisiert/ How to Upgrade] | ||
+ | * [https://docs.qnap.com/nas/4.1/SMB/de/index.html?system_migration.htm NAS Migrieren] | ||
+ | * [https://www.qnap.com/de-de/how-to/tutorial/article/ihren-mac-mit-time-machine-%C3%BCber-smb-auf-einem-qnap-nas-sichern/ Mac Timemachine mit SMB] | ||
+ | * [https://www.qnap.com/de-de/how-to/knowledge-base/article/the-different-ways-of-resetting-your-nas-explained/ The different ways of resetting your NAS] |
Aktuelle Version vom 1. Mai 2022, 23:12 Uhr
Inhaltsverzeichnis
Allgemein
Qnap Port List
FTP - 21 by default and configurable. Passive FTP port - 55536 ~ 56559 by default and configurable SSH - 22 by default and configurable. SMTP - 25 by default and configurable. Web Server/HTTP - 80; HTTPS - 8081 by default and configurable. Netbios/SAMBA - 137, 138, 139, 445 SSL/HTTPS - 443 by defualt and configurable AFP - 548 Rsync - 873 by default and configurable. RTRR - 8899 by default and configurable MySQL - 3306 by defualt and configurable System management, Web File Manager, Multimedia Station, Download Station, Surveillance Station 8080 by default and configurable. Twonkymedia - 9000 Telnet - 13131 by default and configurable BitTorrent - 6881~6999 by default and configurable. Syslog - 514 by defualt and configurable SNMP - 161 by default and configurable TFTP - 69 by default and configurable PPTP - 1723 OpenVPN - 1194 by defualt and configurable RADIAUS - monitors UDP ports 1645, 1812 (for RADIUS Authentication) and 1646, 1813 (for RADIUS Accounting) for RADIUS requests. LDAP Server - 389 NFS - 2049, 111 and dynamic ports
Support
QNAP Support Deutschland: 0900/1845678 (1,49€/min Festnetz, 2,79€ Mobilfunknet)
Logs erstellen:
- QNAP APP Center öffnen
- QNAP Diagnostic Tools herunterladen & öffnen
- Dump der Logs erstellen & herunterladen
- Mail an "desupport@qnap.com" senden inkl. Kontakt Rufnummer & Log Dump`s
Dienste
Backup with Restic
Da es QNAP selber nicht schafft ordentliche Backup Tools mitzuliefern...
Restic installieren
- Restic besorgen entweder selber machen (via Shell)
- oder bereits als qpkg herunterladen und via WebGUI über den AppStore manuell hinzufügen
Restic Wrapper
Vereinfacht die ohnehin unkomplizierte Bedienung noch mehr = restic Wrapper (Mit Nagios/Icinga Support), habe ich hier gefunden :-)
wget https://raw.githubusercontent.com/binarybucks/restic-tools/master/bin/backup mv backup restic-backup.sh chmod +x restic-backup.sh
Noch etwas config - Ich erstelle ein Backup aller Freigabeorder auf eine via USB verbundene Externe HDD
mkdir /etc/backup vim /etc/backup/local.config BACKUP_HOSTNAME=$(hostname -f) BACKUP_DIR="/share/CACHEDEV1_DATA/" / Pfad ggf. anpassen BACKUP_ARGS="--tag filesystem" vim /etc/backup/extern.repo RESTIC_REPOSITORY="/share/WD30EFRX" RESTIC_PASSWORD='AENDER-MICH'
Man sollte noch eine exclude Datei anlegen, um nicht benötigte Ordner vom Backup auszuschließen. Einer der nachfolgende Befehle könnte dafür hilfreich sein:
ls -al /share/CACHEDEV1_DATA/ | cut -d " " -f 9,10 ls -al /share/CACHEDEV1_DATA/ | cut -d: -f 2 | cut -d " " -f2
Exclude Datei erstellen & öffnen
vim /etc/backup/local.exclude
Ordner die ich nicht sichern möchte eintragen
.antivirus/ .appDB/ aquota.user .@backup_config/ .@backup_qbox/ .codesigning/ .idmap/ .ldapdb/ .locks/ .log/ .nc/ .php_session/ .php_session_sys/ .qbox/ .qbox_view/ .@qmariadb/ .@qmonitor/ .@qsync/ .qpkg/ .samba/ .spool/ .SSDLaboratory/ .swap/ .system/ .team_folder/ .tmp/ .versioning/
so das wars =)
testen
Repository initialisieren
./restic-backup.sh extern init
Erstes Backup erstellen
./restic-backup.sh extern local
Clam AV
Config
cat /etc/config/clamd.conf cat /etc/config/antivirus.global cat /etc/config/antivirus.jobs cat /etc/config/freshclam.conf // Update Server liste
Qnap Skripte Aufrufe
/etc/init.d/antivirus.sh scan 1 /etc/init.d/antivirus.sh scan 2 /etc/init.d/antivirus.sh archive_log /etc/init.d/antivirus.sh update_db
Crontab
Hier findet man was so läuft
crontab -e
z.B.
0 3 * * * /usr/local/sbin/ImR_all -soft /Qmultimedia #0 2 * * * /sbin/qfstrim 0 4 * * * /sbin/hwclock -s 0 3 * * * /sbin/vs_refresh 0 3 * * * /sbin/clean_reset_pwd 0-59/15 * * * * /etc/init.d/nss2_dusg.sh 30 7 * * * /sbin/clean_upload_file 0-59/10 * * * * /etc/init.d/storage_usage.sh 30 3 * * * /sbin/notice_log_tool -v -R 30 6 * * 1 /home/httpd/cgi-bin/disk/disk_manage.cgi func=test_hd_speed 10 15 * * * /usr/bin/power_clean -c 2>/dev/null */10 * * * * /sbin/config_cache_util 0 0 0 * * 0 /sbin/hal_event --pd_self_test dev_id=0x00000001,action=1 30 7 * * * /usr/local/sbin/version_cleaner -t 0 > /dev/null 2>/dev/null 35 7 * * * /sbin/qbox_util -c > /dev/null 2>/dev/null 3 9,21 * * * /sbin/notify_update --nc 1>/dev/null 2>&1 0-59/20 3 * * * /sbin/adjust_time 0 1 * * * /etc/init.d/flush_memory.sh >/dev/null 2>&1 0 3 * * 0 /etc/init.d/idmap.sh dump 0 19 1 * * /sbin/storage_util --data_scrubbing raid_id=-1 >/dev/null 2>&1 #0 0 * * * /etc/init.d/rsyncRR.sh Schedule9 2>/dev/null 43 * * * * /sbin/qddns_check 2>/dev/null * * * * * /var/cache/netmgr/lock_timer.sh 4 3 * * 3 /etc/init.d/backup_conf.sh 0 19 * * 5 /etc/init.d/antivirus.sh scan 1 0 0 * * 0 /etc/init.d/antivirus.sh scan 2 0 0 * * * /etc/init.d/antivirus.sh archive_log 09 0 */1 * * /etc/init.d/antivirus.sh update_db 0 12 * * * /mnt/ext/opt/LicenseCenter/bin/qlicense_tool local_check 0 0 * * * /usr/local/sbin/qsh nc.archive >/dev/null 2>&1 55 19 * * * /mnt/ext/opt/QcloudSSLCertificate/bin/ssl_agent_cli 0 4 * * * /etc/init.d/wsd.sh restart
Entware (OPKG)
Um Busybox etwas zu bereichern gbt es nun Entware, wer länger dabei ist -> Früher gab es ipgk Optware für diesen Zweck.
ssh admin@192.168.23.5 // Ipv4 Adresse des NAS anpassen cd /share/Public // in das Public Verzeichniss wechseln wget http://bin.entware.net/other/Entware_1.00std.qpkg // Entware download (prüfen ob die Version aktuell ist) sh Entware_1.00std.qpkg // Installation starten & anschliessend Dienst bzw. NAS neustarten rm Entware_1.00std.qpkg // Installer löschen
Die OPKG Config befindet hier und sollte nun einen Eintrag für Entware enthalten
cat /etc/config/qpkg.conf
Wenn alles geklappt hat kann man nun weitere Software via opkg installieren:
opkg update && opkg upgrade && opkg install screen export TERMINFO=/opt/share/terminfo
Rsync
Auf der Shell zu finden unter namen "qsync" unter dem Pfad "/etc/config/qsync".
Skripte:
- /etc/init.d/rsyncSpeedTest.sh
Profile
In Profilen werden Verbindungsinformationen zu Server abgelegt.
#/etc/config/qsync/hbrm_profile.conf Hier werden die Profile abgelegt, sieht dann wie folgt aus: [Profile0] Name = Local_Profile InUse = 0 [Profile2] StorageType = 1 Ssh = 0 Name = RSYNC_Old1 INetAddr = 192.168.23.5 Account = admin Port = 873 EnPassword = V2@De3TlXYZbC94JqfXYZCnfA== Ssl = 0 InUse = 1 RsyncMode = 0
Speicher
/etc/config/qsync/hbrm_storage.conf [Storage1] Name = Storage_Old1 Path = /XYZ-Pfad ProfileID = Profile1 ConnectStatus = 0 TotalCapacity = 44796761 UsedCapacity = 44796105 [Storage0] ProfileID = Profile1 Name = Remote Storage 1 DestRoot = / Path = /XYZ-Pfad/ ConnectStatus = 0 TotalCapacity = 105708282 UsedCapacity = 0
Links
Skripte
find /etc/ -iname *.sh /etc/acpi/events/check_press.sh /etc/rcS.d/S99sdmd.sh /etc/rcS.d/S99thunderbolt.sh /etc/rcS.d/S99sync_action.sh /etc/ssl/misc/CA.sh /etc/init.d/vpn_qbelt_client.sh /etc/init.d/vpn_qbelt.sh /etc/init.d/vpn_l2tp_client.sh /etc/init.d/vpn_l2tp.sh /etc/init.d/vpn_openvpn_client.sh /etc/init.d/vpn_openvpn.sh /etc/init.d/vpn_pptp_client.sh /etc/init.d/vpn_pptp.sh /etc/init.d/vpn_common.sh /etc/init.d/rsyncd.sh /etc/init.d/rsyncd-BS.sh /etc/init.d/rsyncRR.sh /etc/init.d/rsyncRR-BS.sh /etc/init.d/player.sh /etc/init.d/qboost.sh /etc/init.d/ssd_lab.sh /etc/init.d/qpkg_res.sh /etc/init.d/QcloudSSLCertificate.sh /etc/init.d/nc.sh /etc/init.d/LicenseCenter.sh /etc/init.d/Entware.sh /etc/init.d/Restic.sh /etc/init.d/qvpn.sh /etc/init.d/helpdesk.sh /etc/init.d/hbs.sh /etc/init.d/QNAP_Diagnostic_Tool.sh /etc/init.d/BackupVersion.sh /etc/init.d/qvsd.sh /etc/init.d/CloudLink.sh /etc/init.d/QAirplay.sh /etc/init.d/Dropbox.sh /etc/init.d/phpMyAdmin.sh /etc/init.d/netmgr.sh /etc/init.d/mtp_run.sh /etc/init.d/bonjour.sh /etc/init.d/smb.sh /etc/init.d/wsd.sh /etc/init.d/mkchangepwd.sh /etc/init.d/force_shutdown.sh /etc/init.d/getmac.sh /etc/init.d/nvrd.sh /etc/init.d/fbdisk.sh /etc/init.d/qHAsyncman.sh /etc/init.d/update_power.sh /etc/init.d/genpowerfail.sh /etc/init.d/iscsiinit.sh /etc/init.d/install.sh /etc/init.d/s3_callback.sh /etc/init.d/snmp_ups.sh /etc/init.d/avahi.sh /etc/init.d/mariadb.sh /etc/init.d/qplayd.sh /etc/init.d/init_qpkg.sh /etc/init.d/rcv_port.sh /etc/init.d/addshare.sh /etc/init.d/sysinit.sh /etc/init.d/check_bootcmd.sh /etc/init.d/scan_wifi_ups.sh /etc/init.d/backup_conf.sh /etc/init.d/ddns_update_for_cgi.sh /etc/init.d/recycled.sh /etc/init.d/rsyslog.sh /etc/init.d/create_udev_rule.sh /etc/init.d/adjust_sync_speed.sh /etc/init.d/gen_tr_version_conf.sh /etc/init.d/skylink-updater.sh /etc/init.d/cloudinstall_finish.sh /etc/init.d/udev_run.sh /etc/init.d/radius.sh /etc/init.d/update_def_share.sh /etc/init.d/twonkymedia.sh /etc/init.d/upnpd.sh /etc/init.d/smb2_protocol.sh /etc/init.d/init_final.sh /etc/init.d/iscsitrgt.sh /etc/init.d/qtag.sh /etc/init.d/ntpf.sh /etc/init.d/opentftp.sh /etc/init.d/init_gpu.sh /etc/init.d/timemachine.sh /etc/init.d/remote_folder_mount.sh /etc/init.d/convert2_ext4.sh /etc/init.d/nsswitch.sh /etc/init.d/qna_load.sh /etc/init.d/radvd.sh /etc/init.d/thttpd.sh /etc/init.d/atalk.sh /etc/init.d/idmap.sh /etc/init.d/init_network.sh /etc/init.d/dbus.sh /etc/init.d/boot_done.sh /etc/init.d/qcloud_init.sh /etc/init.d/openssl_signature.sh /etc/init.d/ldap.sh /etc/init.d/qcloud_blob_daemon.sh /etc/init.d/init_hardware.sh /etc/init.d/ntpclient.sh /etc/init.d/init_mac_addr.sh /etc/init.d/ldap_backup_db.sh /etc/init.d/enc_share.sh /etc/init.d/push_notification_daemon.sh /etc/init.d/rsyncd_srv.sh /etc/init.d/ads_register_dns.sh /etc/init.d/mysqld.sh /etc/init.d/init_iTune.sh /etc/init.d/ntpd.sh /etc/init.d/timechange_notify.sh /etc/init.d/printer.sh /etc/init.d/photo_scand.sh /etc/init.d/ipv6.sh /etc/init.d/set_led.sh /etc/init.d/qts_notice.sh /etc/init.d/login.sh /etc/init.d/sync_action.sh /etc/init.d/check_lan_port.sh /etc/init.d/cloudinstall_report_offline.sh /etc/init.d/log_rotation.sh /etc/init.d/qraid1.sh /etc/init.d/refresh_internet_status.sh /etc/init.d/usb_ups.sh /etc/init.d/start_service.sh /etc/init.d/qm2_nic.sh /etc/init.d/nvr_svc.sh /etc/init.d/iso_mount.sh /etc/init.d/reset_sata.sh /etc/init.d/cloudinstall_init_daemon.sh /etc/init.d/killnas.sh /etc/init.d/services.sh /etc/init.d/antivirus.sh /etc/init.d/ldap_server.sh /etc/init.d/usb_device_check.sh /etc/init.d/update_tr_004u_img.sh /etc/init.d/init_lvm.sh /etc/init.d/update_img.sh /etc/init.d/load_lan_module.sh /etc/init.d/ipchange_notify.sh /etc/init.d/StartMediaService.sh /etc/init.d/QMediaService.sh /etc/init.d/qsnapman.sh /etc/init.d/check_ddns_external_ip.sh /etc/init.d/init_platform.sh /etc/init.d/gen_hd_info.sh /etc/init.d/rsyncSpeedTest.sh /etc/init.d/kdebug.sh /etc/init.d/chkcfgpart.sh /etc/init.d/bluetooth.sh /etc/init.d/init_check.sh /etc/init.d/oray-updater.sh /etc/init.d/refresh_nvr_crontab.sh /etc/init.d/unit_test.sh /etc/init.d/cdrom.sh /etc/init.d/init_dns_type.sh /etc/init.d/stunnel.sh /etc/init.d/gen_issue.sh /etc/init.d/updatedb.sh /etc/init.d/porter.sh /etc/init.d/flush_memory.sh /etc/init.d/qsyncman.sh /etc/init.d/logo.sh /etc/init.d/nss2_dusg.sh /etc/init.d/mtp_run_hal.sh /etc/init.d/cacd.sh /etc/init.d/ftp.sh /etc/init.d/runone.sh /etc/init.d/ups.sh /etc/init.d/genLanglist.sh /etc/init.d/shutdown_check.sh /etc/init.d/noshareservices.sh /etc/init.d/get_external_ip.sh /etc/init.d/installtgz.sh /etc/init.d/qna_setup.sh /etc/init.d/nsed.sh /etc/init.d/power_button.sh /etc/init.d/tfan_auto_testing.sh /etc/init.d/klogd.sh /etc/init.d/update_tr_002_img.sh /etc/init.d/ddns_update.sh /etc/init.d/wireless_detect.sh /etc/init.d/qanalytic_init.sh /etc/init.d/network.sh /etc/init.d/qbutton.sh /etc/init.d/thunderbolt.sh /etc/init.d/pw_sleep.sh /etc/init.d/set_mtu.sh /etc/init.d/init_nas.sh /etc/init.d/thunderbolt_net.sh /etc/init.d/qsyncsrv_install.sh /etc/init.d/irqb.sh /etc/init.d/wireless_modules.sh /etc/init.d/update.sh /etc/init.d/selfhost-updater.sh /etc/init.d/Qthttpd.sh /etc/init.d/lunportman.sh /etc/init.d/ImRd.sh /etc/init.d/hostname.sh /etc/init.d/init_disk.sh /etc/init.d/snapshot.sh /etc/init.d/cloudinstall_init.sh /etc/init.d/dav_mount.sh /etc/init.d/init_acl.sh /etc/init.d/lan_card_test.sh /etc/init.d/crond.sh /etc/init.d/wfm_thttpd.sh /etc/init.d/cloudinstall_report_complete_daemon.sh /etc/init.d/sdmd.sh /etc/init.d/wireless.sh /etc/init.d/reset_all.sh /etc/init.d/recoverd.sh /etc/init.d/storage_usage.sh /etc/init.d/update_tr_img.sh /etc/init.d/cupsd.sh /etc/init.d/qaccess.sh /etc/rcK.d/K78NotificationCenter.sh
TimeMachine
NFS
- QTS 4.2.2 -> NFSv2/v3 Server auf Port 2049
- http://kodi.wiki/view/NFS#QNAP
/etc/config/nfssetting // nfs rechte config /etc/exports // freigabe /etc/init.d/nfs {start|stop|restart|reexport|remountd|create_keytab}
Virtualization Station
Paralells Desktop VM migration
Wer von eine VM von einen OSX Paralells Desktop auf einen QNAP VM Host migrieren möchte, nimmt dafür am besten die Testversion von VMware Fusion, hier kann man im Gegensatz zum Paralells Desktop die VM direkt in .ovh (Open Virtualization Format) exportieren und somit direkt in das QNAP Virtualization Station importieren. Mit Paralells Desktop müsste man nach dem Export noch eine Konvertierung durchführen, kann man so machen aber ist halt.....
WIndows ACL
Shell Befehle
Hier läuft Busybox!
Server Linux version
busybox | head -1 hal_app --se_sys_get_board_sn enc_sys_id=root // S/N auslesen
CPU & Architektur
cat /proc/cpuinfo cat /proc/cpuinfo |grep model uname -m
Dump Qnap Logs
Falls die GUI mal nicht funktioniert, geht das auch via Shell ;)
/mnt/ext/opt/qdesk/www/data/script/get_log $(get_hwsn)
Der gepackte Dump liegt dann hier, und kann mit scp (von der lokalen shell) dann nach Hause kopiert werden
cd /tmp/helpdump/ scp admin@192.168.XXX.XXX:/tmp/helpdump/QXXXXXXXXX.zip Pfad/auf/euren/client/
Enclosure
rm /etc/config/enclosure.map // Erweiterngseinheiten zurücksetzen cp /etc/config/raid.conf /etc/config/raid.conf.bckp // Sicherheitskopie vim /etc/config/raid.conf // Altes Raidgruppe + HDD`s entfernen
HDD
df -h // Mit "disk free" eingehängte Partitionen auflisten, "-h" = human radable fdisk /dev/sdg1 // Mit "Fixed Disk" z.B. externe Platten auswählen, hier z.B. "/dev/sdg1" p // fdisk menü: Partionen der o.g. Platte anzeigen d // fdisk menü: Partitionen der o.g. Platte löschen m // fdisk menü: Verfügbare Dateisysteme anzeigen n // fdisk menü: Neue Partition anlegen
Netzwerk
ifconfig eth4 10.0.2.20 netmask 255.255.255.0
Raid
cat /proc/mdstat // Kurze Zusammenfassung aller Raid // Ausgaben: md9 // System (Raid 1) md13 // Swap (Raid 1) md321 // Extended Swap (Raid 1)
Qsync
cat /etc/logs/qsync/qsync-Job0.log
qcli
qcli -l user=admin pw='PASSWORT' saveauthsid=yes // login first ;-) qcli_admin qcli_firmwareupdate qcli_log qcli_pool qcli_rtrrserver qcli_timezone qcli_vpnserver qcli_backuprestore qcli_hardware qcli_mysqlserver qcli_power qcli_sharedfolder qcli_usergroups qcli_wifi qcli_cache qcli_hdd qcli_nastonas qcli_quota qcli_snapreplica qcli_users qcli_domaincontroller qcli_iscsi qcli_network qcli_raid qcli_snapshotvault qcli_virtualdisk qcli_domainsecurity qcli_iscsiacl qcli_networkrecyclebin qcli_rsync qcli_storage qcli_volume qcli_encrypt qcli_iscsibackup qcli_networkservice qcli_rsyncserver qcli_systemstatus qcli_volumesnapshot qcli_externaldevice qcli_iscsisnapshot qcli_ntp qcli_rtrr qcli_timemachine qcli_vpnclient qcli_hdd -l // Zeigt alle aktiven enclosures qcli_hdd -D enclosureID=0 // Zeigt alle Disks der gewählten enclosure
Screen
Unterstütztes Anzeigeterminal herausfinden:
ls /usr/share/terminfo/x
Ausgabe:
xterm xterm-xfree86
Umgebungsvariable entsprechend setzen:
export TERM=xterm-xfree86
kurzer test & los gehts
TERMINFO='/usr/share/terminfo/' screen
Debian
- ARM = https://wiki.qnap.com/wiki/Debian_Installation_On_QNAP
- x86 = https://www.pro-linux.de/artikel/2/1530/2,installation-von-debian.html
Produkte
TS-439 Pro II+
Specs
- CPU: Intel(R) Atom(TM) CPU D425 @ 1.80GHz
- RAM: 1GB
Openssh
Eigentlich hat die Orginale Firmware schon einen sshd, aber der will nur den user "admin" reinlassen unter anderem. Das war anfangs kein problem, bis ich git über den ipkg-manager installiert hatte und einen anderen user via ssh einloggen wollte. Eine kurze Recherche ergab, das jemand schon ein Kochrezept dafür bereitliegen hat.
RAM Upgrade
- Default RAM: 1x 1GB ADATA AD2S800B1G6-B (SODIMM, DDR2, PC-6400, CL6, 800MHz)
- Upgrade RAM: 1x 2GB Kingston KVR800D2S6/2G (SODIMM, DDR2, PC2-6400, CL6, 800 MHz)
SNMP
Check_mk
Da war jemand schon schneller ;-)
OpenNMS
Icinga Plugin
Gibt es schon, mehr dazu hier
Debian
- https://www.cyrius.com/debian/kirkwood/qnap/ts-41x/install/
- https://wiki.debian.org/InstallingDebianOn/QNAP
OID`s
MIB | OBJECT LABEL | OBJECT ID | Data Type | Value (Example) |
MIB-2 | .1.3.6.1.2.1 | - | ||
- | system | .1.3.6.1.2.1.1 | - | |
- | sysDescr.0 | .1.3.6.1.2.1.1.1.0 | OctetString | "GS1910-24HP 24x1G Ethernet Switch" |
- | sysUpTime.0 | .1.3.6.1.2.1.1.3.0 | TimeTicks | "Timeticks: (9400662) 1 day, 2:06:46.62" |
- | sysContact.0 | .1.3.6.1.2.1.1.4.0 | OctetString | "your@email.tld" |
- | sysName.0 | .1.3.6.1.2.1.1.5.0 | OctetString | "switch_23" |
- | sysLocation.0 | .1.3.6.1.2.1.1.6.0 | OctetString | "Rack 3" |
Interfaces | .1.3.6.1.2.1.2 | - | ||
at | .1.3.6.1.2.1.3 | - | ||
IP | .1.3.6.1.2.1.4 | - | ||
ICMP | .1.3.6.1.2.1.5 | - | ||
TCP | .1.3.6.1.2.1.6 | - | ||
UDP | .1.3.6.1.2.1.7 | - | ||
SNMP | .1.3.6.1.2.1.11 | - | ||
HOST-RESOURCES-MIB | host | .1.3.6.1.2.1.25 | - | |
- | hrStorageSize | .1.3.6.1.2.1.25.2.3.1.5.33 | Integer | - |
- | hrStorageUsed | .1.3.6.1.2.1.25.2.3.1.6.33 | Integer | - |
Enity MIB | .1.3.6.1.2.1.47 | - | ||
MAC Adress | entPhysicalSerialNum | 1.3.6.1.2.1.47.1.1.1.1.11.1 | OctetString | "aa-bb-cc-dd" |
Firmware Version | entPhysicalFirmwareRev | .1.3.6.1.2.1.47.1.1.1.1.9.1 | OctetString | "V2.00(AAAY.0)C0" |
NAS-MIB | storage | .1.3.6.1.4.1.24681 | - | - |
- | SystemCPU-Usage | .1.3.6.1.4.1.24681.1.2.1.0 | OctetString | "0,90 %" |
- | SystemTotalMem | .1.3.6.1.4.1.24681.1.2.2.0 | OctetString | "989.0 MB" |
- | SystemFreeMem | .1.3.6.1.4.1.24681.1.2.3.0 | OctetString | "266.0 MB" |
- | CPU-Temperature | .1.3.6.1.4.1.24681.1.2.5.0 | OctetString | "43 C/109 F" |
- | SystemTemperature | .1.3.6.1.4.1.24681.1.2.6.0 | OctetString | "42 C/107 F" |
- | HdNumber-Usage | .1.3.6.1.4.1.24681.1.2.10.0 | OctetString | "4" |
- | SysFanNumber | .1.3.6.1.4.1.24681.1.2.14.0 | Integer | "1" |
- | SysFanSpeed | .1.3.6.1.4.1.24681.1.2.15.1.3.1 | OctetString | "1280 RPM" |
- | SysVolumeNumber | .1.3.6.1.4.1.24681.1.2.16.0 | Integer | "1" |
- | SysVolumeStatus | .1.3.6.1.4.1.24681.1.2.17.1.6 | OctetString | "Ready" |
- | HdSmartInfo | .1.3.6.1.4.1.24681.1.2.11.1.7.{1-4} | OctetString | "Good" |
- | HdTemperature | .1.3.6.1.4.1.24681.1.2.11.1.3.{1-4} | OctetString | " 36 C/96 F" |
TS-470 Pro
RAM Upgrade
Es müssen die Festplatten ausgebaut werden, anschließend sind die RAM Slots erreichbar. Slot 1 ist gut erreichbar, Slot 2 etwas schwerer, wer es sich leicht machen will, baut nur 8GB RAM auf Slot 1 nach, der Standard 2GB RAM ist auf Slot 2 verbaut. Für den geschickten Techniker sollte es aber auch kein Problem sein beide Riegel zu tauschen.
- Kompatibler RAM
TVS-471
Gibt es mit in folgenden Ausführungen:
- TVS-471-PT-4G: Dual-core Intel G3250 3.2 GHz Processor + 4 GB DDR3 RAM
- TVS-471-i3-4G: Dual-core Intel Core i3-4150 3.5 GHz Processor + 4 GB DDR3 RAM
RAM Upgrade
Bei diesen Modell wird ein Riegel von der Innenseite (HDD Schacht1) ausgetauscht, der andere ist von der Außenseite sehr gut erreichbar nachdem das Gehäuseblech (3 Schrauben) entfernt wurde.
- Default RAM: Transcend 4GB kit (2x2GB) DDR3 PC3-12800,1600MHz, 702662-3524
- Upgrade RAM: Crucial 16GB kit (2x8GB) DDR3 PC3-12800,1600MHz, CT2K8G3S160BM
TS-879U-RP
Zubehör
Rails
- A03-Serie (Gehäuse), Schienenset, maximale Belastbarkeit 57 kg
RAM Upgrade
Anforderung: DDR3 - 8 GB - DIMM 240-PIN - 1600 MHz / PC3-12800 - ungepuffert - nicht-ECC - für QNAP TS-1270U-RP, TS-1279U-RP, TS-1679U-RP, TS-870U-RP, TS-879U-RP
- Default RAM:
- Upgrade RAM: Bsp.
VTx aktivieren
Um auch bei diesen Modell die Virtualization Station nutzen zu können, muss man zuerst im Bios die VTx (Intel Virtualization Technology, Intel) Funktion aktivieren. Dafür einen Monitor + Tastatur am QNAP anschliessen & ins Bios neustarten. Wie das genau geht ist hier beschrieben:
- de https://www.qnap.com/de-de/qa/con_show.php?op=showone&cid=258
- en https://www.qnap.com/en/qa/con_show.php?op=showone&cid=258
TVS-871U-RP
Zubehör
Rails
- RAIL-B02
TVS-872XU-RP
Zubehör
Rails
- RAIL-B02
Zubehör
SAS-12G2E-U
Es handelt sich hier um einen SAS Controller von LSI vom Typ SAS3008 (SAS3008 PCI Express® to 8-Port 12 Gb/s SAS+SATA Controller)
- https://www.broadcom.com/products/storage/sas-sata-controllers/sas-3008
- https://docs.broadcom.com/docs/12351998
Troubleshooting
AFP
CNID-DB
Fehlerbeschreibung: Es erscheint folgende Fehlermeldung beim Zugriff auf eine Freigabe via AFP: "Something wrong with the volume's cnid db using temporary cnid db instead. Check server messages for details!"
Fehlerursache: Es scheint die CNID-DB ("Catalog Node ID" Datenbank) der AFP-Freigabe Schaden genommen zu haben.
Fehlerbehebung: .AppleDB der jeweiligen Freigabe löschen via ssh, AFP erstellt den Ordner neu. QNAP Howto
ssh admin@<nas-ip> // Als admin via ssh anmelden find / -name cnid2.db | sed 's/\/share/rm -r \/share/' > rm_cnid // CNID-DB`s suchen | "rm -r" einfügen > Ergebnis in Datei speichern chmod u+x rm_cnid // User Rechte zur Ausführung des Skripts geben ./rm_cnidb // Skript ausführen
- Hier gibts es auch noch was http://netatalk.sourceforge.net/2.1/htmldocs/dbd.1.html
Freigabeorder weg
Wenn der Server mit einen Stromausfall heruntergefahren wurde, kann es passieren das AFP Freigabe Ordner verschwinden unter SMB noch sichtbar. Aus bisher unbekannten Gründen wird der Ordner auf "versteckt" gesetzt, so macht ihr in wieder Sichtbar:
Netzlaufwerk mounten via Finder
- Den Finder öffnen anschliessend Shortcut "CMD+K" ausführen (Dialog "Mit Server verbinden zu öffnen")
- Im neuen Dialog Fenster Pfad angeben: "afp://<SERVER-IP>/<PFAD>", falls es keine öffentliche Freigabe ist werdet ihr anschließen nach Benutzernamen + Passwort gefragt.
Alternativ Netzlaufwerk mounten via Terminal
sudo mkdir /Volumes/<FREIGABENAME> // Ordner für die Freigabe anlegen sudo mount -t afp afp://user:pass@<SERVER-IP>/<PFAD> /Volumes/<FREIGABENAME> // Netzlaufwerk einhängen
Jetzt zu den Pfad Navigieren wo sich der fehlende Ordner befindet und unsichtbare Ordner anzeigen:
cd /Volumes/<FREIGABENAME>/ // In das entsprechende Verzeichnis wechseln defaults write com.apple.finder AppleShowAllFiles TRUE // Versteckte Ordner sichtbar machen
Anschliessend entsprechende Ordner wieder sichtbar machen
sudo SetFile -a v <UNSICHTBARER-ORDNER>/ // Datei Attribute auf in/visible setzen sudo chflags nohidden <UNSICHTBARER-ORDNER>/ // Datei Flags auf sichtbar stellen (nur GUI) defaults write com.apple.finder AppleShowAllFiles FALSE // Versteckte Ordner unsichtbar machen sudo umount /Volumes/<FREIGABENAME> // Netzlaufwerk aushängen falls es nicht mehr gebraucht wird
Dateien werden zeitverzögert gelöscht
Dateien werden stark zeitlich versetzt (15-60sek.) gelöscht
Freigabe -> Option "Erweiterte Ordnerzugriffsrechte aktivieren" -> Ein & wieder ausschalten Manchmal reicht es auch schon den Netzwerkpapierkorb zu deaktiveren und wieder aktivieren
- forum.qnap.com/viewtopic.php?f=189&t=41733
Malware
Derek
curl https://download.qnap.com/Storage/tsd/utility/derek-be-gone.sh | sh
Quelltext:
#!/bin/sh ###################### # Derek Be Gone v1.1 # # Author: qnapd # ###################### set_mutable() { if [ ! -e "$1" ]; then return 0 fi if [ -e /etc/IS_64BITS ]; then # 64bit set mutable SET_M_64="$1" echo " [*] Setting mutable 64bit on $SET_M_64" python -c "import os,fcntl,sys,struct;fd = os.open('${SET_M_64}', os.O_RDONLY); rec = struct.pack('L', 0); x = fcntl.ioctl(fd, 0x80086601, rec); flags = struct.unpack('L',x)[0]; was_immutable = flags & 0x00000010; flags = flags & ~0x00000010; f = struct.pack('i', flags); fcntl.ioctl(fd, 0x40086602, f); os.close(fd)" else # 32bit set mutable SET_M_32="$1" echo " [*] Setting mutable 32bit on $SET_M_32" python -c "import os,fcntl,sys,struct;fd = os.open('${SET_M_32}', os.O_RDONLY); rec = struct.pack('L', 0); x = fcntl.ioctl(fd, 0x80046601, rec); flags = struct.unpack('L',x)[0]; was_immutable = flags & 0x00000010; flags = flags & ~0x00000010; f = struct.pack('i', flags); fcntl.ioctl(fd, 0x40046602, f); os.close(fd)" fi } remove_bad_thing() { badpath="$1" if [ -e "$badpath" ]; then echo " [*] Removing $badpath" rm -rf "$badpath" if [ $? -eq 0 ]; then echo " [+] Success!" else echo " [-] Failed" fi fi } # clear fake qpkg bdir= test -f "${confdir}/smb.conf" && for i in homes Public Download Multimedia Web Recordings; do bdir=`getcfg "$i" path -f "${confdir}/smb.conf"` && test ! -z "$bdir" && bdir=`dirname "$bdir"` && test -d "$bdir" && testwriteable=$(mktemp "${bdir}/.tmp.XXXXXX") && rm "${testwriteable}" && break; bdir=''; done test -z "${bdir}" || test ! -d "${bdir}" && { command -v readlink >/dev/null 2>&1 || ln -sf /bin/busybox /usr/bin/readlink; for i in Public Download Multimedia Web Recordings homes; do bdir=`readlink "/share/${i}" 2>/dev/null` && test ! -z "$bdir" && bdir=`dirname "$bdir"` && bdir=/share/${bdir##*/} && test -d "$bdir" && break; done; test -z "${bdir}" || test ! -d "${bdir}"; } && { bdir=`getcfg SHARE_DEF defVolMP -f "${confdir}/def_share.info"` test -z "${bdir}" || test ! -d "${bdir}"; } && { bdir=`mount | sed -n "s/.*\(\/share\/[^ /]\+\) .*/\1/gp" | head -n 1` test -z "${bdir}" || test ! -d "${bdir}"; } && { for i in CACHEDEV3_DATA CACHEDEV2_DATA CACHEDEV1_DATA MD0_DATA; do test -d "/share/${i}" && bdir="/share/${i}" && break; done; test -z "${bdir}" || test ! -d "${bdir}" && bdir=/mnt/HDA_ROOT; } echo "[o] System path: ${bdir}" echo "[o] Removing fake qpkg" remove_bad_thing "${bdir}/.qpkg/.liveupdate/" remove_bad_thing "${bdir}/.qpkg/.config/" echo "---" # clear dom mdir=/tmp/config __BOOT_DEV= __model=`getcfg System "Internal Model"` CONFIG_DEV_NODE=`getcfg "CONFIG STORAGE" DEVICE_NODE -f /etc/platform.conf` CONFIG_DEV_PART=`getcfg "CONFIG STORAGE" FS_ACTIVE_PARTITION -f /etc/platform.conf` CONFIG_DEV_FS=`getcfg "CONFIG STORAGE" FS_TYPE -f /etc/platform.conf` __BOOT_CONF=`test -f /etc/default_config/BOOT.conf && cat /etc/default_config/BOOT.conf 2>/dev/null || cat "${confdir}/BOOT.conf"` || { test "$arch_o" = arm && __BOOT_CONF=TS-NASARM; } command -v hal_app > /dev/null 2>&1 && { __BOOT_DEV=$(hal_app --get_boot_pd port_id=0); } test "${__BOOT_CONF}" = TS-NASARM || test "$arch_o" = arm && { test -f /etc/IS_TAS && __BOOT_DEV="${__BOOT_DEV:-/dev/mtdblock}7" || __BOOT_DEV="${__BOOT_DEV:-/dev/mtdblock}5"; } || __BOOT_DEV="${__BOOT_DEV:-/dev/sdx}6" test "x${CONFIG_DEV_NODE}" != "x" && { ubiattach -m "${CONFIG_DEV_PART}" -d 2; mount -t ubifs ubi2:config "${mdir}" > /dev/null 2>&1 || { test -f /etc/IS_TAS && mount -t ext4 /dev/mmcblk0p7 "${mdir}"; } } || mount ${__BOOT_DEV} -t ext2 ${mdir} || { test "${__model}" = "TS-201" && mount -t ext2 /dev/mtdblock4 ${mdir}; } || { ubiattach -m "${CONFIG_DEV_PART}" -d 2; mount -t ubifs ubi2:config "${mdir}"; mount -t ext4 /dev/mmcblk0p7 "${mdir}"; } || { test "${__model}" = "TS-269L" && mount -t ext2 /dev/sdc6 ${mdir}; } || { test "${__model}" = "TS-869" && mount -t ext2 /dev/sdi6 ${mdir}; } || { test "$arch_o" = arm || ${__BOOT_CONF} = "TS-NASARM" && { for i in 5 7 4 6 3 8; do mount -t ext2 "/dev/mtdblock${i}" ${mdir} && break; done; }; } || { test "$arch_o" = x86 && for n in /dev/sdc /dev/sdx /dev/sdi $__BOOT_DEV; do for i in 6 $CONFIG_DEV_PART; do mount -t ext2 ${n}${i} ${mdir} && break 2; done; done; } || { mount -t ext2 $(/sbin/hal_app --get_boot_pd port_id=0)6 ${mdir}; } echo "[o] Cleaning DOM" remove_bad_thing "$mdir/autorun.sh" for i in $mdir/K0*.sh; do remove_bad_thing "$i" done umount "$mdir" echo "---" # reinstall MR echo "[o] Remove old MR" mrpath="${bdir}/.qpkg/MalwareRemover/" set_mutable "$mrpath" set_mutable "$mrpath/modules/10_derek_3.pyc" set_mutable "$mrpath/modules/12_derek_3.pyc" remove_bad_thing "$mrpath" rmcfg MalwareRemover -f /etc/config/qpkg.conf echo "---" echo "[o] Install new MR" mrpkg=MalwareRemover_3.4.0_20190121_173849.qpkg wget -nv "https://download.qnap.com/Storage/tsd/utility/$mrpkg" sh "$mrpkg" > /dev/null 2>&1 getcfg MalwareRemover Enable -f /etc/config/qpkg.conf > /dev/null if [ $? -eq 0 ]; then echo " [+] Success!" else echo " [-] Failed" fi rm -f "$mrpkg" echo "---" echo "Finished!" rm -f "$0"
Migration
4.2.X -> 4.3.X
Am besten gar nicht erst migrieren sondern neu anlegen ist mein Fazit...
Hier die Dinge die auf jeden Fall nicht mehr funktionieren:
- RSYNC Backup Jobs müssen neu angelegt werden
- NFS Freigaben funktionieren nur noch Fehlerhaft (Ordner werden nicht korrekt angezeigt/verschwinden im Zugriff)
NFS
In der Nachfolgenden Fehlersuche gehen wir mal davon aus der Server die IP-Adresse 192.168.23.23 hat und der Client sich im gleichen Netz befindet mit einer abweichende IP-Adresse (z.B. 192.168.23.42).
- Physikalische Verbindung prüfen (Client: Ping 192.168.23.23)
- Prüfen ob RPC Messages durch das Netzwerk gelassen werden (Firewall Log prüfen)
- Prüfen ob der entsprechende RPC Dienst läuft (Server & Client) ggf. neustarten (/etc/init.d/nfs restart)
- Server: "rpc.nfsd -d"
- Client: "rpcinfo -p 192.168.23.23 | grep nfs"
- Funktioniert die Freigabe (Client: showmount -e 192.168.23.23)
- Freigabe neu verbinden (Client: umount)
- Wenn es hier noch probleme gibt wird es tricky, am besten pakete mitschneiden (z.B. Wireshark) und nachfolgende Befehle
ls -ld /pfad/zur/freigabe getfacl /pfad/zur/freigabe dmesg | grep NFS* nfsstat
Links
- https://linux.die.net/man/8/nfsstat
- https://wiki.archlinux.org/index.php/NFS/Troubleshooting#Debugging
- https://www.linuxquestions.org/questions/linux-newbie-8/can-see-my-nfs-share-but-not-the-files-folders-inside-it-4175621092/page3.html
- https://www.thegeekdiary.com/troubleshooting-common-nfs-issues-in-linux/
SCSI Sense Fehler
TVS-663 HDD Eject
- Schlechtes Backplane Design, Mosfet überhitzen - Lösung Bauteile ersetzen oder Lüfter Manuell voll aufdrehen, gerät kühl halten
- https://forum.qnap.com/viewtopic.php?f=25&t=134212&start=435
Lösungen:
- Alle Mosfets (AP4957AGM) tauschen und Gatewiderstände korrigieren
- Mosfets überbrücken (D1 - S1 + D2 - S2), an den Pins bzw. falls vorhanden lötbrücken