Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. ioBroker Allgemein
    4. Raspberry Pi3+ SSD + SWAP

    NEWS

    • ioBroker@Smart Living Forum Solingen, 14.06. - Agenda added

    • ioBroker goes Matter ... Matter Adapter in Stable

    • Monatsrückblick - April 2025

    Raspberry Pi3+ SSD + SWAP

    This topic has been deleted. Only users with topic management privileges can see it.
    • F
      Foradh 0 last edited by

      Guten Abend zusammen,
      ich habe leider aktuell ein kleines Problem mit meinem iobroker System mit dem ich auf eine SSD umgezogen bin.
      System:
      Raspberry Pi 3 B+ mit bullseye
      iobroker mit ein paar Adaptern + Grafana

      Wie gesagt, bin ich mit diesem System von einer SD Karte auf eine SSD mit USB Adapter umgezogen.
      Hierbei musste ich feststellen, dass das System nach dem Umzug sich beim booten immer wieder aufgehängt hat. Nach etwas Überprüfung stelle ich fest, dass wenn ich die SWAP Funktion deaktiviere alles wieder ganz normal läuft. Da der Rpi 3 leider nur mit 1GB RAM daherkommt, kann ich ohne SWAP einen Adapter nicht nutzen, da sonst zu wenig RAM zur Verfügung steht.
      Nun zu meiner Frage...muss ich beim Umzug auf eine SSD evtl. etwas zusätzlich für die SWAP datei eingstellen?

      Ich weiß, das Thema passt eigentlich nicht ganz hier her, aber ich habe bisher so tolle Erfahrungen mit dem Forum gemacht und dachte ich propiere hier mal mein Glück.

      Vielen Dank
      Foradh

      Winni sprobst L Thomas Braun BananaJoe 5 Replies Last reply Reply Quote 0
      • Winni
        Winni @Foradh 0 last edited by

        @foradh-0 Ich bin kein Raspi-Spezialist, aber was mir spontan einfällt ist das Netzteil. Am besten ist, wenn du ein orginal Raspberry Netzteil verwendest.

        1 Reply Last reply Reply Quote 0
        • sprobst
          sprobst @Foradh 0 last edited by sprobst

          @foradh-0

          Hallo,

          so ein Konstrukt ist bei mir jahrelang gut gelaufen. Wichtig ist ein USB-Hub mit eigenem Netzteil, erst dann hat das bei mir damals stabil funktioniert. Die SSD zieht zuviel Strom über den Raspberry.

          Gruß
          Sven

          Winni 1 Reply Last reply Reply Quote 0
          • Winni
            Winni @sprobst last edited by

            @sprobst Also, ich hatte mal ein ähnliches Problem, mit einem Raspi 4. Da habe ich tagelang rum gemacht. Der lief auch prima mit der sd, aber als ich auf eine ssd umgestiegen bin ging nix mehr, stürzte beim booten immer ab. Das Netzteil das ich verwendete hatte 25w, aber es geht mehr um die Stabilität der Spannung. Probier das orginal Netzteil, wenn es nicht funktioniert kannst du es ja zurück schicken.
            https://www.amazon.de/Raspberry-Pi-Netzteil-USB-C-für/dp/B085X69KRL/ref=sr_1_17?__mk_de_DE=ÅMÅŽÕÑ&crid=2LF54IGI4C9LV&keywords=original+raspberry+pi+netzteil&qid=1675622432&sprefix=orginal+raspberrypi+netzteil%2Caps%2C230&sr=8-17

            1 Reply Last reply Reply Quote 0
            • F
              Foradh 0 last edited by

              Hi Winni,
              Hi Sprobst,
              vielen Dank für eure schnellen Antworten.
              Leider kann ich das Netzteil als Problemquelle ausschließen. Das war nämlich auch mein erster Gedanke. Ich habe aber zuerst verschiedene Netzteile mit genügend Leistung ausprobiert...immer das gleiche Ergebnis. Zusätzlich habe ich die SSD an an Y Kabel gehängt um mit dem 2. Anschluss die Platte an eine eingene Stromquelle angeschlossen...leider gleiches Problem.

              Thomas Braun 1 Reply Last reply Reply Quote 0
              • Thomas Braun
                Thomas Braun Most Active @Foradh 0 last edited by

                @foradh-0

                iob diag
                

                sagt? Bitte die Langfassung.

                1 Reply Last reply Reply Quote 0
                • F
                  Foradh 0 last edited by

                  @thomas-braun sagte in Raspberry Pi3+ SSD + SWAP:

                  iob diag

                  Hi Thomas, anbei das Ergebnis

                  
                  Skript v.2023-01-02
                  
                  *** BASE SYSTEM ***
                  Model           : Raspberry Pi 3 Model B Plus Rev 1.3
                  Architecture:   aarch64
                  Docker:         false
                  Virtualization: none
                  Distributor ID: Debian
                  Description:    Debian GNU/Linux 11 (bullseye)
                  Release:        11
                  Codename:       bullseye
                  
                  PRETTY_NAME="Debian GNU/Linux 11 (bullseye)"
                  NAME="Debian GNU/Linux"
                  VERSION_ID="11"
                  VERSION="11 (bullseye)"
                  VERSION_CODENAME=bullseye
                  ID=debian
                  HOME_URL="https://www.debian.org/"
                  SUPPORT_URL="https://www.debian.org/support"
                  BUG_REPORT_URL="https://bugs.debian.org/"
                  
                  Systemuptime and Load:
                   12:34:52 up 28 min,  1 user,  load average: 5.50, 7.64, 4.17
                  CPU threads: 4
                  
                  *** Time and Time Zones ***
                  Mon Feb  6 11:34:52 UTC 2023
                  Mon Feb  6 12:34:52 CET 2023
                  CET +0100
                  Europe/Berlin
                  
                  *** User and Groups ***
                  pi
                  /home/pi
                  pi adm dialout cdrom sudo audio video plugdev games users input render netdev lp
                  
                  *** X-Server-Setup ***
                  X-Server:       false
                  Desktop:
                  Terminal:       tty
                  Boot Target:    multi-user.target
                  
                  *** MEMORY ***
                                 total        used        free      shared  buff/cache   available
                  Mem:            909M        774M         39M        1.0M         95M         79M
                  Swap:             0B          0B          0B
                  Total:          909M        774M         39M
                  
                            909 M total memory
                            775 M used memory
                             37 M active memory
                            753 M inactive memory
                             39 M free memory
                              7 M buffer memory
                             87 M swap cache
                              0 M total swap
                              0 M used swap
                              0 M free swap
                  
                  *** FILESYSTEM ***
                  Filesystem     Type      Size  Used Avail Use% Mounted on
                  /dev/root      ext4      220G  8.0G  203G   4% /
                  devtmpfs       devtmpfs  325M     0  325M   0% /dev
                  tmpfs          tmpfs     455M     0  455M   0% /dev/shm
                  tmpfs          tmpfs     182M  1.1M  181M   1% /run
                  tmpfs          tmpfs     5.0M  4.0K  5.0M   1% /run/lock
                  /dev/sda1      vfat      255M   31M  225M  12% /boot
                  tmpfs          tmpfs      91M   16K   91M   1% /run/user/1000
                  
                  Messages in dmesg:
                  [Mon Feb  6 12:05:56 2023] Kernel command line: coherent_pool=1M 8250.nr_uarts=0rootwait quiet splash plymouth.ignore-serial-consoles
                  [Mon Feb  6 12:06:00 2023] EXT4-fs (sda2): INFO: recovery required on readonly f
                  [Mon Feb  6 12:06:00 2023] EXT4-fs (sda2): write access will be enabled during r
                  [Mon Feb  6 12:06:01 2023] EXT4-fs (sda2): orphan cleanup on readonly fs
                  [Mon Feb  6 12:06:01 2023] EXT4-fs (sda2): 1 orphan inode deleted
                  [Mon Feb  6 12:06:01 2023] EXT4-fs (sda2): recovery complete
                  [Mon Feb  6 12:06:01 2023] EXT4-fs (sda2): mounted filesystem with ordered data
                  [Mon Feb  6 12:06:01 2023] VFS: Mounted root (ext4 filesystem) readonly on devic
                  [Mon Feb  6 12:06:04 2023] EXT4-fs (sda2): re-mounted. Opts: (null). Quota mode:
                  
                  Show mounted filesystems (real ones only):
                  TARGET  SOURCE    FSTYPE OPTIONS
                  /       /dev/sda2 ext4   rw,noatime
                  `-/boot /dev/sda1 vfat   rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharse
                  
                  Files in neuralgic directories:
                  
                  /var:
                  3.3G    /var/
                  2.1G    /var/log
                  1.8G    /var/log/journal/277251c066b54e14abe3a8dd6d0d19d4
                  1.8G    /var/log/journal
                  406M    /var/lib
                  
                  /opt/iobroker/backups:
                  375M    /opt/iobroker/backups/
                  4.0K    /opt/iobroker/backups/influxDB_2023_01_27-12_11_58_backupiobroker
                  
                  /opt/iobroker/iobroker-data:
                  205M    /opt/iobroker/iobroker-data/
                  111M    /opt/iobroker/iobroker-data/files
                  60M     /opt/iobroker/iobroker-data/backup-objects
                  51M     /opt/iobroker/iobroker-data/files/javascript.admin
                  32M     /opt/iobroker/iobroker-data/files/javascript.admin/static/js
                  
                  The five largest files in iobroker-data are:
                  30M     /opt/iobroker/iobroker-data/objects.jsonl
                  6.9M    /opt/iobroker/iobroker-data/files/javascript.admin/static/js/610.de0231c
                  6.3M    /opt/iobroker/iobroker-data/files/admin.admin/custom/static/js/vendors-n
                  5.1M    /opt/iobroker/iobroker-data/states.jsonl
                  4.9M    /opt/iobroker/iobroker-data/files/javascript.admin/static/js/848.7424922
                  
                  *** NodeJS-Installation ***
                  
                  /usr/bin/nodejs         v16.19.0
                  /usr/bin/node           v16.19.0
                  /usr/bin/npm            8.19.3
                  /usr/bin/npx            8.19.3
                  
                  nodejs:
                    Installed: 16.19.0-deb-1nodesource1
                    Candidate: 16.19.0-deb-1nodesource1
                    Version table:
                   *** 16.19.0-deb-1nodesource1 500
                          500 https://deb.nodesource.com/node_16.x bullseye/main arm64 Packages
                          100 /var/lib/dpkg/status
                       12.22.12~dfsg-1~deb11u3 500
                          500 http://security.debian.org/debian-security bullseye-security/main ar
                       12.22.5~dfsg-2~11u1 500
                          500 http://deb.debian.org/debian bullseye/main arm64 Packages
                  
                  Temp directories causing npm8 problem: 0
                  
                  *** ioBroker-Installation ***
                  
                  ioBroker Status
                  iobroker is running on this host.
                  
                  
                  Objects type: jsonl
                  States  type: jsonl
                  
                  Core adapters versions
                  js-controller:  4.0.24
                  admin:          6.3.5
                  javascript:     6.1.4
                  
                  Adapters from github:   0
                  
                  Adapter State
                  + system.adapter.admin.0                  : admin                 : RPI
                    system.adapter.backitup.0               : backitup              : RPI
                    system.adapter.daswetter.0              : daswetter             : RPI
                    system.adapter.discovery.0              : discovery             : RPI
                  + system.adapter.ebus.0                   : ebus                  : RPI
                  + system.adapter.fronius.0                : fronius               : RPI
                  + system.adapter.influxdb.0               : influxdb              : RPI
                    system.adapter.info.0                   : info                  : RPI
                  + system.adapter.iqontrol.0               : iqontrol              : RPI
                  + system.adapter.javascript.0             : javascript            : RPI
                    system.adapter.pvforecast.0             : pvforecast            : RPI
                  + system.adapter.rpi2.0                   : rpi2                  : RPI
                  + system.adapter.web.0                    : web                   : RPI
                  
                  + instance is alive
                  
                  Enabled adapters with bindings
                  + system.adapter.admin.0                  : admin                 : RPI
                  + system.adapter.influxdb.0               : influxdb              : RPI
                  + system.adapter.web.0                    : web                   : RPI
                  
                  ioBroker-Repositories
                  stable        : http://download.iobroker.net/sources-dist.json
                  beta          : http://download.iobroker.net/sources-dist-latest.json
                  
                  Active repo(s): stable
                  
                  Installed ioBroker-Instances
                  Used repository: stable
                  Adapter    "admin"        : 6.3.5    , installed 6.3.5
                  Adapter    "backitup"     : 2.5.10   , installed 2.5.10
                  Adapter    "daswetter"    : 3.1.4    , installed 3.1.4
                  Adapter    "discovery"    : 3.1.0    , installed 3.1.0
                  Adapter    "ebus"         : 3.0.7    , installed 3.0.7
                  Adapter    "fronius"      : 1.1.3    , installed 1.1.3
                  Adapter    "influxdb"     : 3.2.0    , installed 3.2.0
                  Adapter    "info"         : 1.9.19   , installed 1.9.19
                  Adapter    "iqontrol"     : 2.0.0    , installed 2.0.0
                  Adapter    "javascript"   : 6.1.4    , installed 6.1.4
                  Controller "js-controller": 4.0.24   , installed 4.0.24
                  Adapter    "pvforecast"   : 2.3.0    , installed 2.5.1
                  Adapter    "rpi2"         : 1.3.2    , installed 1.3.2
                  Adapter    "simple-api"   : 2.7.2    , installed 2.7.2
                  Adapter    "socketio"     : 4.2.0    , installed 4.2.0
                  Adapter    "sonoff"       : 2.5.1    , installed 2.5.1
                  Adapter    "web"          : 4.3.0    , installed 4.3.0
                  Adapter    "ws"           : 1.3.0    , installed 1.3.0
                  
                  Objects and States
                  Please stand by - This may take a while
                  Objects:        1600
                  States:         1387
                  
                  *** OS-Repositories and Updates ***
                  Hit:1 http://security.debian.org/debian-security bullseye-security InRelease
                  Hit:2 http://deb.debian.org/debian bullseye InRelease
                  Hit:3 http://deb.debian.org/debian bullseye-updates InRelease
                  Hit:4 http://archive.raspberrypi.org/debian bullseye InRelease
                  Hit:5 https://repos.influxdata.com/debian stable InRelease
                  Hit:6 https://apt.grafana.com stable InRelease
                  Hit:7 https://deb.nodesource.com/node_16.x bullseye InRelease
                  Hit:8 https://repo.ebusd.eu/apt/default/bullseye bullseye InRelease
                  Reading package lists... Done
                  
                  
                  Thomas Braun 1 Reply Last reply Reply Quote 0
                  • Thomas Braun
                    Thomas Braun Most Active @Foradh 0 last edited by

                    @foradh-0

                    Warum hast du denn bei dem mageren 1GB Arbeitsspeicher auch noch den SWAP ausgeschaltet?
                    Das kann nicht funktionieren.

                    L 1 Reply Last reply Reply Quote 0
                    • L
                      Luxi @Thomas Braun last edited by

                      @thomas-braun steht im ersten Post....

                      1 Reply Last reply Reply Quote 0
                      • L
                        Luxi @Foradh 0 last edited by

                        @foradh-0

                        In der Konstellation hatte ich auch immer wieder Probleme, wobei ich das Netzteil nicht als Problem wahrnahm.
                        Besser funktionieren die USB-Sticks auf SSD-Basis z.B. SanDisk Extreme PRO.
                        Aktuell funktioniert das auch super mit dem Raspi-PoE-Hat.

                        Hattest du neu installiert und ein Restore gemacht oder alles per dd verschoben?

                        LG
                        Luxi

                        F 1 Reply Last reply Reply Quote 0
                        • Thomas Braun
                          Thomas Braun Most Active @Foradh 0 last edited by

                          @foradh-0 sagte in Raspberry Pi3+ SSD + SWAP:

                          Nach etwas Überprüfung stelle ich fest, dass wenn ich die SWAP Funktion deaktiviere alles wieder ganz normal läuft.

                          Naja, dann würde ich mir dringend anschauen was da falsch läuft. Bei 1GB RAM würde ich Swap auch auf Minimum 1GB setzen, eher 1,5.

                          1 Reply Last reply Reply Quote 0
                          • BananaJoe
                            BananaJoe Most Active @Foradh 0 last edited by BananaJoe

                            @foradh-0 ich hoffe diese Anleitung funktioniert noch:

                            https://znil.net/index.php?title=Raspbian_-_Swap_File_verschieben_und_vergrößern

                            Sieh zu das das Swapfile dann auf der SSD liegt ... liegt die aber schon, oder?
                            Aber als Partition?

                            1 Reply Last reply Reply Quote 0
                            • F
                              Foradh 0 last edited by

                              Vielen dank für euren Input. Ich hatte zuvor auf der SD Karte die Swap auf 1GB gestellt und das hat auch wunderbar funktioniert. Nur eben seit der Umstellung nicht mehr.
                              @BananaJoe
                              ich habe den Pfad bei /var/swap belassen. Da nur noch die SSD angeschlossen ist sollte das auch auf der SSD als Datei abgelegt sein.
                              Als Partition hab ich das ganze nicht laufen

                              1 Reply Last reply Reply Quote 0
                              • F
                                Foradh 0 @Luxi last edited by

                                @luxi
                                Ich habe das System per Win23 disk imager von SD gesichert und auf die SSD zurückgespielt.
                                Dann mit raspi-config die Partition erweitert

                                L 1 Reply Last reply Reply Quote 0
                                • L
                                  Luxi @Foradh 0 last edited by

                                  @foradh-0
                                  da könnte der Hund begraben sein.
                                  Dann können dir hier vielleicht die Linux-Profis helfen.

                                  Ich hatte deswegen damals einfach iobroker neu installiert und aus dem Backup wiederhergestellt.
                                  Bei Grafana geht das ähnlich.

                                  LG
                                  Luxi

                                  1 Reply Last reply Reply Quote 0
                                  • M
                                    mading last edited by

                                    Setze auch einen rpi4 mit ssd ein. Hatte eine USB Verlängerung verwendet, die einen Wackel hatte. Direkt eingesteckt __> läuft problemlos

                                    F 1 Reply Last reply Reply Quote 0
                                    • F
                                      Foradh 0 @mading last edited by

                                      @mading
                                      Das kann ich in meinem Fall eigentlich auch ausschließen. Es läuft ja tatsächlich stabil wenn ich Swap deaktiviere. Die Probleme treten nur mit aktiviertem Swap auf

                                      Homoran 1 Reply Last reply Reply Quote 0
                                      • Homoran
                                        Homoran Global Moderator Administrators @Foradh 0 last edited by

                                        @foradh-0 sagte in Raspberry Pi3+ SSD + SWAP:

                                        Die Probleme treten nur mit aktiviertem Swap auf

                                        also bei vielen Schreibzugriffen.
                                        klingt fast nach USB3

                                        F 1 Reply Last reply Reply Quote 0
                                        • F
                                          Foradh 0 @Homoran last edited by

                                          @homoran
                                          Meinst du ein bekanntes Problem mit USB3?

                                          Es wird folgende Hardware verwendet.
                                          SSD = Kingston A400 240GB
                                          StarTech 2.5″ SATA adapter USB 3.0

                                          1 Reply Last reply Reply Quote 0
                                          • F
                                            Foradh 0 last edited by

                                            Ich habe mein Problem nun mit dem Tool Zram umgehen können.
                                            Mit Zram kann man einen Teil des Arbeitsspeicher als Swap nutzen und den Inhalt darin komprimieren.
                                            Ich habe 25% (227MB) für Zram reserviert und mit dem Faktor 3 komprimiert, dadurch erhalte ich 682MB Swap auf dem Arbeitsspeicher.

                                            sudo cat /proc/swaps
                                            Filename                                Type            Size            Used            Priority
                                            /dev/zram0                              partition       698592          353024          75
                                            
                                            free -h
                                                           total        used        free      shared  buff/cache   available
                                            Mem:           909Mi       694Mi        55Mi       0.0Ki       160Mi       160Mi
                                            Swap:          682Mi       344Mi       337Mi
                                            
                                            

                                            Nun kann ich wieder alle Adapter nutzen und der RPI läuft stabil.
                                            Mich würde natürlich trotzdem interessieren warum der Swap auf der SSD nicht funktioniert.

                                            Y 1 Reply Last reply Reply Quote 0
                                            • First post
                                              Last post

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate
                                            FAQ Cloud / IOT
                                            HowTo: Node.js-Update
                                            HowTo: Backup/Restore
                                            Downloads
                                            BLOG

                                            871
                                            Online

                                            31.7k
                                            Users

                                            79.6k
                                            Topics

                                            1.3m
                                            Posts

                                            11
                                            47
                                            2764
                                            Loading More Posts
                                            • Oldest to Newest
                                            • Newest to Oldest
                                            • Most Votes
                                            Reply
                                            • Reply as topic
                                            Log in to reply
                                            Community
                                            Impressum | Datenschutz-Bestimmungen | Nutzungsbedingungen
                                            The ioBroker Community 2014-2023
                                            logo