Hallo,
ich bin auf dem Weg mein aktuelles NAS (TS-409 Pro) durch einen Nachfolger (TS-431) zu ersetzen. Die Daten, mittlerweile rund ~3 TB, lassen sich nicht schnell mit einer 500 MHz CPU per scp/sftp verschlüsseln und komprimieren und zum neuen NAS übertragen.
Die (aus meiner Sicht) einzige sinnvolle Möglichkeit Dateien zu übertragen ist rsync - ohne SSH. Leider hat QNAP in der Firmwareversion 3.3.3 eine kastrierte Version von rsync mitgeliefert, mit der kein sinnvolles arbeiten möglich ist.
Ich will hier kurz erklären wie man sich ein eigenes rsync übersetzt. Voraussetzung ist - natürlich - einiges an Erfahrung mit Linux! Ich verwende Linux Mint 20 als Compile-Host.
Los geht es:
- $ mkdir rsync4nas
- $ cd rsync4nas/
- Den nötigen Compiler für das TS-409 NAS findet man hier:
QDK-Guide
Die Toolchain für die Marvell ARM NAS Toolchain(ARM-x19) funktioniert auch für das TS-409 NAS. - Toolchain entpacken:
$ tar xfz ~/Downloads/TS-x19_cross-project-arm-20110901.tar.gz -C . - Pfad zum Compiler setzen:
$ export PATH=${PATH}:${HOME}/rsync4nas/opt/cross-project/arm/marvell/bin - Sicherstellen das er Compiler auch gefunden wird:
$ arm-none-linux-gnueabi-gcc
sollte die Ausgabe
arm-none-linux-gnueabi-gcc: no input files
liefern. - Die Sourcen für rsync gibt es hier:
Welcome to the rsync web pages - rsync entpacken:
$ tar xfz ~/Downloads/rsync-3.2.6.tar.gz -C . - In das rsync Verzeichnis wechseln:
$ cd rsync-3.2.6/ - Die Softwareumgebung ist beim QTS abgespeckt, also muss rsync auch abgespeckt werden. Das configure Script mit notwendigen Optionen wird wie folgt aufgerufen:
Code
Alles anzeigen$ ./configure --host=arm-none-linux-gnueabi --disable-openssl --disable-xxhash --disable-zstd --disable-lz4 checking for arm-none-linux-gnueabi-gcc... arm-none-linux-gnueabi-gcc checking whether the C compiler works... yes checking for C compiler default output file name... a.out checking for suffix of executables... checking whether we are cross compiling... yes checking for suffix of object files... o checking whether the compiler supports GNU C... yes checking whether arm-none-linux-gnueabi-gcc accepts -g... yes checking for arm-none-linux-gnueabi-gcc option to enable C11 features... unsupported checking for arm-none-linux-gnueabi-gcc option to enable C99 features... -std=gnu99 checking for stdio.h... yes ... checking for _acl... no checking for __acl... no checking for _facl... no checking for __facl... no checking whether to support ACLs... running tests: checking for acl_get_file in -lacl... no checking for ACL support... no checking ACL test results... No ACL support found checking whether to support extended attributes... Using Linux xattrs checking for getxattr in -lattr... no configure.sh: creating ./config.status config.status: creating Makefile config.status: creating lib/dummy config.status: creating zlib/dummy config.status: creating popt/dummy config.status: creating shconfig config.status: creating config.h rsync 3.2.6 configuration successful
- Compiler starten:
Code
Alles anzeigen$ nice make gawk -f ./daemon-parm.awk ./daemon-parm.txt gawk -f ./mkproto.awk ./*.c ./lib/compat.c daemon-parm.h arm-none-linux-gnueabi-gcc -std=gnu99 -I. -I. -I./zlib -I./popt -g -O2 -DHAVE_CONFIG_H -Wall -W -c flist.c -o flist.o arm-none-linux-gnueabi-gcc -std=gnu99 -I. -I. -I./zlib -I./popt -g -O2 -DHAVE_CONFIG_H -Wall -W -c rsync.c -o rsync.o arm-none-linux-gnueabi-gcc -std=gnu99 -I. -I. -I./zlib -I./popt -g -O2 -DHAVE_CONFIG_H -Wall -W -c generator.c -o generator.o arm-none-linux-gnueabi-gcc -std=gnu99 -I. -I. -I./zlib -I./popt -g -O2 -DHAVE_CONFIG_H -Wall -W -c receiver.c -o receiver.o ... arm-none-linux-gnueabi-gcc -std=gnu99 -I. -I. -I./zlib -I./popt -g -O2 -DHAVE_CONFIG_H -Wall -W -c popt/popt.c -o popt/popt.o arm-none-linux-gnueabi-gcc -std=gnu99 -I. -I. -I./zlib -I./popt -g -O2 -DHAVE_CONFIG_H -Wall -W -c popt/poptconfig.c -o popt/poptconfig.o arm-none-linux-gnueabi-gcc -std=gnu99 -I. -I. -I./zlib -I./popt -g -O2 -DHAVE_CONFIG_H -Wall -W -c popt/popthelp.c -o popt/popthelp.o arm-none-linux-gnueabi-gcc -std=gnu99 -I. -I. -I./zlib -I./popt -g -O2 -DHAVE_CONFIG_H -Wall -W -c popt/poptparse.c -o popt/poptparse.o arm-none-linux-gnueabi-gcc -std=gnu99 -I./zlib -I./popt -g -O2 -DHAVE_CONFIG_H -Wall -W -o rsync flist.o rsync.o generator.o receiver.o cleanup.o sender.o exclude.o util1.o util2.o main.o checksum.o match.o syscall.o log.o backup.o delete.o options.o io.o compat.o hlink.o token.o uidlist.o socket.o hashtable.o usage.o fileio.o batch.o clientname.o chmod.o acls.o xattrs.o progress.o pipe.o params.o loadparm.o clientserver.o access.o connection.o authenticate.o lib/wildmatch.o lib/compat.o lib/snprintf.o lib/mdfour.o lib/md5.o lib/permstring.o lib/pool_alloc.o lib/sysacls.o lib/sysxattrs.o zlib/deflate.o zlib/inffast.o zlib/inflate.o zlib/inftrees.o zlib/trees.o zlib/zutil.o zlib/adler32.o zlib/compress.o zlib/crc32.o popt/findme.o popt/popt.o popt/poptconfig.o popt/popthelp.o popt/poptparse.o syscall.o: In function `do_mkstemp': rsync4nas/rsync-3.2.6/syscall.c:351: warning: the use of `mktemp' is dangerous, better use `mkstemp' sed 's;\@bindir\@;/usr/local/bin;g' <./stunnel-rsyncd.conf.in >stunnel-rsyncd.conf
- Schnell prüfen das wir auch ein Cross Compiled Binary (für ARM) haben:
- Danach das Binary zum NAS übertragen und happy rsync'en
Ich hoffe ich kann hier dem einen oder anderen helfen.
Gruss,