NFS einbinden

    • NFS einbinden

      Hallo

      Ich habe mein NAS Komplet freigemacht und möchte das ganze jetzt nutzen für Aufnahmen und Archivierung von Filmen. Die interne 3Tb Festplatte meines DM7020HD ist chronisch zu klein.

      Gibt es eine Step-By-Step Anleitung wie ich all die Mounts als NFS einbinden kann. Notfalls kann die interne Festplatte als hauptplatte verwendet werden, am liebsten wurde ich aber nicht auf 2 Unterverzeichnisse suchen müssen.

      Wie geht man genau vor. Habe 2 Betrage gefunden aber da wird das Thema nur nebenbei angedeutet.

      Danke in Voraus für alle Tipps

      Gruss
      Gérard
    • Bei mir ist es ein Linux-Server, der NFS-Freigaben bereitstellt. NFS-Verzeichnisse und Parameter anpassen, Datei unix-konform speichern und nach jedem Flashen einfach auf die Box kopieren, schon hat man seine Mounts wieder.

      Beispiel /etc/enigma2/automounts.xml.

      XML-Quellcode

      1. <?xml version="1.0" ?>
      2. <mountmanager>
      3. <nfs>
      4. <mount>
      5. <active>True</active>
      6. <hdd_replacement>False</hdd_replacement>
      7. <ip>192.168.0.XXX</ip>
      8. <sharename>video</sharename>
      9. <sharedir>/var/shares/video</sharedir>
      10. <options>ro,nolock,soft,tcp,rsize=8192,wsize=8192</options>
      11. </mount>
      12. </nfs>
      13. <nfs>
      14. <mount>
      15. <active>True</active>
      16. <hdd_replacement>False</hdd_replacement>
      17. <ip>192.168.0.XXX</ip>
      18. <sharename>record</sharename>
      19. <sharedir>/var/shares/video/record</sharedir>
      20. <options>rw,nolock,soft,tcp,rsize=8192,wsize=8192</options>
      21. </mount>
      22. </nfs>
      23. </mountmanager>
      Alles anzeigen


      Quellcode

      1. ls -lAh /mnt/net/
      2. drwxrwxrwx 9 1000 users 4.0K Aug 30 09:21 audio
      3. drwxrwxrwx 6 1000 users 4.0K Aug 30 09:21 photo
      4. drwxrwxrwx 3 1000 users 4.0K Oct 30 19:47 record
      5. drwxrwxrwx 10 1000 users 4.0K Sep 11 19:25 video
      6. drwxrwxrwx 4 1000 users 4.0K Sep 11 20:52 videodb
      7. df -h
      8. 192.168.0.XXX://var/shares/audio 3.6T 1004.0G 2.6T 27% /media/net/audio
      9. 192.168.0.XXX://var/shares/digicam 3.6T 1004.0G 2.6T 27% /media/net/photo
      10. 192.168.0.XXX://var/shares/video 3.6T 1004.0G 2.6T 27% /media/net/video
      11. 192.168.0.XXX://var/shares/video/record 3.6T 1004.0G 2.6T 27% /media/net/record
      12. 192.168.0.XXX://var/shares/video/videodb 3.6T 1004.0G 2.6T 27% /media/net/videodb
      Alles anzeigen


      NFS Speed Test

      Shell-Script

      1. #!/bin/sh
      2. # IP of your NFS server
      3. serverip=192.168.0.XXX
      4. # exported directory on your NFS server
      5. exportdir="/var/shares/video/record"
      6. # mount point on dbox2 or dreambox
      7. dboxmountpoint="/media/net/video/record"
      8. # filesize to transfer in MBytes.
      9. # At least 8 MByte. Good values are 32 or 64 MByte.
      10. # Try 128 to be more accurate (takes much longer!)
      11. filesize=64
      12. # block sizes to test in KBytes, possible values are 1 2 4 8 16 32.
      13. # values have to be separated with spaces. See examples below.
      14. # blocksizelist="4 8 32"
      15. # blocksizelist="16"
      16. blocksizelist="4 8"
      17. # wether to enable synchronous reading, writing. Possible values are "yes"
      18. # or no. Normally synchronous reading or writing should be slower than
      19. # asynchronous, so to save some time most people would say "no" here.
      20. enablesynctests="no"
      21. ##################################################################
      22. ######## don't edit below this line ########
      23. ##################################################################
      24. clear
      25. startDate=$(date +"%s")
      26. bs=8192
      27. count=`expr $filesize \* 1048576 / $bs`
      28. wlist=""
      29. rlist=""
      30. synctests="async"
      31. if [ $enablesynctests = "yes" ]; then
      32. synctests="sync "$synctests
      33. fi
      34. echo "Measuring NFS throughput..."
      35. for factor in $blocksizelist; do
      36. for protocol in udp tcp; do
      37. for synchronized in $synctests; do
      38. size=`expr $factor \* 1024`
      39. bitcount=`expr $bs \* $count \* 8`
      40. umount $dboxmountpoint 2>/dev/null
      41. mount -t nfs -o rw,soft,$protocol,nolock,$synchronized,rsize=$size,wsize=$size $serverip:$exportdir $dboxmountpoint
      42. # WRITE ----------------------------------------------
      43. echo ""
      44. echo "Mount options: "$protocol", "$synchronized", wsize="$size
      45. echo "writing "$filesize" MBytes..."
      46. a=`date +%s`
      47. tFile='nfs_speedtest_'$a
      48. tmp=`dd if=/dev/zero of=$dboxmountpoint/$tFile bs=$bs count=$count 2>&1 | grep seconds`
      49. res=`echo $tmp | cut -d ',' -f 2,3 | sed 's/^ *//'`
      50. echo $res
      51. wlist="$wlist$res, $protocol, $synchronized, wsize=$size\n"
      52. # READ -----------------------------------------------
      53. # clear memory cache
      54. sync && echo 3 > /proc/sys/vm/drop_caches
      55. echo "Mount options: "$protocol", "$synchronized", rsize="$size
      56. echo "reading "$filesize" MBytes..."
      57. tmp=`dd of=/dev/null if=$dboxmountpoint/$tFile bs=$bs count=$count 2>&1 | grep seconds`;
      58. res=`echo $tmp | cut -d ',' -f 2,3 | sed 's/^ *//'`
      59. echo $res
      60. rlist="$rlist$res, $protocol, $synchronized, rsize=$size\n"
      61. # remove file
      62. rm -f $dboxmountpoint/$tFile
      63. done
      64. done
      65. done
      66. echo
      67. echo "RESULTS ----------------------------------------------------"
      68. echo "Write throughput:"
      69. echo -e $wlist | grep '^[0-9]' | sort -n
      70. echo
      71. echo "Read throughput:"
      72. echo -e $rlist | grep '^[0-9]' | sort -n
      73. endDate=$(date +"%s")
      74. dateDiff=$(($endDate-$startDate))
      75. echo
      76. echo "Execution time: "$(($dateDiff / 60))":"$(($dateDiff % 60))
      77. exit 0
      Alles anzeigen
      Beste Grüße
      Schorsch

      ------------------------------------------------------------
      OSCam-Config