Navigation

    Logo
    • Register
    • Login
    • Search
    • Recent
    • Tags
    • Unread
    • Categories
    • Unreplied
    • Popular
    • GitHub
    • Docu
    • Hilfe
    1. Home
    2. Deutsch
    3. Off Topic
    4. MariaDb verschieben

    NEWS

    • Neuer Blog: Fotos und Eindrücke aus Solingen

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

    • ioBroker goes Matter ... Matter Adapter in Stable

    MariaDb verschieben

    This topic has been deleted. Only users with topic management privileges can see it.
    • Thomas Braun
      Thomas Braun Most Active @Mark last edited by

      @mark

      Ich würde da anders herangehen. Die Daten aus der Datenbank auf den Stick kopieren und den dann nahtlos an der Stelle wo die Daten liegen sollen per fstab einhängen. So ändern sich die Pfade nicht.

      M 1 Reply Last reply Reply Quote 0
      • M
        Mark @Thomas Braun last edited by

        @thomas-braun Das hört sich an, als ob es wesentlich einfächer wäre... 👍
        Ich kenne aber bisher nur die Möglichkeit, per mount meine Gesamte Platte (sda1) einzuhängen. Gibt es eine möglichkeit den Mountpunkt der Platte zu lassen wie er ist (/media/pi/RaspData) und nur das folgende Verzeichnis einzuhängen?

        die kopierten Daten der Datenbank liegen auf sd1, eingehängt als /media/pi/RaspData im Verzeichnis mysql

        /var/lib/mysql hab ich gesichert und gelöscht, danach neu erstellt (um einen leeren Mountpunkt zu haben)
        Wie hänge ich nun mein /media/pi/RaspData/mysql ein?

        pi@raspberrypi:/var/lib $ sudo mount mysql /media/pi/RaspData/mariadb/mysql
        mount: /media/pi/RaspData/mariadb/mysql: /var/lib/mysql is not a block device.
        

        Sorry, wie gesagt, bin Anfänger was den Rasperry angeht.

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

          @mark

          Der Befehl macht so keinen Sinn.

          mount | sort
          

          sagt im Moment?

          M 1 Reply Last reply Reply Quote 0
          • M
            Mark @Thomas Braun last edited by Mark

            @thomas-braun Er sagt:

            bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
            cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
            configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
            debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
            /dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
            /dev/mmcblk0p2 on / type ext4 (rw,noatime,commit=600)
            devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
            /dev/sda1 on /media/pi/RaspData type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
            devtmpfs on /dev type devtmpfs (rw,relatime,size=340548k,nr_inodes=85137,mode=755)
            fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
            gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
            mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
            proc on /proc type proc (rw,relatime)
            pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
            securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
            sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
            sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
            systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
            tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
            tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
            tmpfs on /run type tmpfs (rw,nosuid,nodev,size=188856k,nr_inodes=819200,mode=755)
            tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=94424k,nr_inodes=23606,mode=700,uid=1000,gid=1000)
            tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
            
            
            Thomas Braun 1 Reply Last reply Reply Quote 0
            • Thomas Braun
              Thomas Braun Most Active @Mark last edited by Thomas Braun

              @mark

              blkid
              

              sagt?

              Und läuft da ein Desktop? Mit Sicherheit...

              M 1 Reply Last reply Reply Quote 0
              • M
                Mark @Thomas Braun last edited by

                @thomas-braun blkid

                /dev/mmcblk0p1: LABEL_FATBOOT="bootfs" LABEL="bootfs" UUID="F462-D399" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="c8b33886-01"
                /dev/mmcblk0p2: LABEL="rootfs" UUID="4e83f684-f415-4ed1-99cb-f7413924ef28" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="c8b33886-02"
                /dev/sda1: LABEL="backup_raspi" BLOCK_SIZE="512" UUID="70B3DCCC271C41EA" TYPE="ntfs" PARTUUID="214b0981-01"
                
                

                Am Raspi befinden sich 2 Hitachii Leseköpfe die im ioBroker eingerichtet sind sowie die Festplatte, auf der ich gerne die Datenbank hätte.
                Zugriff hab ich nur über SSH, da der pi im Zählerkasten im Keller ist.

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

                  @mark sagte in MariaDb verschieben:

                  TYPE="ntfs"

                  Den Stick würde ich zunächst mit einem Linux-Dateisystem formatieren, z. B. ext4. Da haste bedeutend weniger Trouble mit den unix-Dateirechten. Die kennt ntfs nämlich nicht.

                  M 1 Reply Last reply Reply Quote 0
                  • M
                    Mark @Thomas Braun last edited by

                    @thomas-braun ok, hab ich gemacht und neu gestartet.

                    blkid
                    /dev/mmcblk0p1: LABEL_FATBOOT="bootfs" LABEL="bootfs" UUID="F462-D399" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="c8b33886-01"
                    /dev/mmcblk0p2: LABEL="rootfs" UUID="4e83f684-f415-4ed1-99cb-f7413924ef28" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="c8b33886-02"
                    
                    

                    hier fehlt die Platte aber

                    blkid -o device
                    /dev/mmcblk0p1
                    /dev/mmcblk0p2
                    /dev/ram0
                    /dev/ram1
                    /dev/ram2
                    /dev/ram3
                    /dev/ram4
                    /dev/ram5
                    /dev/ram6
                    /dev/ram7
                    /dev/ram8
                    /dev/ram9
                    /dev/ram10
                    /dev/ram11
                    /dev/ram12
                    /dev/ram13
                    /dev/ram14
                    /dev/ram15
                    /dev/sda1
                    

                    und hier ist sie gelistet

                    lsblk
                    NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
                    sda           8:0    0 931,5G  0 disk
                    └─sda1        8:1    0 931,5G  0 part /media/pi/RaspData
                    mmcblk0     179:0    0  58,2G  0 disk
                    ├─mmcblk0p1 179:1    0   256M  0 part /boot
                    └─mmcblk0p2 179:2    0    58G  0 part /
                    
                    

                    und am gleichen Punkt eingehängt.

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

                      @mark

                      mount | sort
                      

                      Und nochmal die Frage, ob da ein Desktop herumrumpelt.

                      M 1 Reply Last reply Reply Quote 0
                      • M
                        Mark @Thomas Braun last edited by

                        @thomas-braun Wenn du mit Desktop meinst, dass da ein Bildschirm und Tastatur dranhängt: nein
                        Auf der SD-Karte ist aber "ubuntu-22.10-desktop-amd64" installiert, insofern: ja

                        pi@raspberrypi:/media/pi/RaspData/mariadb $ mount | sort
                        bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
                        cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
                        configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
                        debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
                        /dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
                        /dev/mmcblk0p2 on / type ext4 (rw,noatime,commit=600)
                        devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
                        /dev/sda1 on /media/pi/RaspData type fuseblk (rw,nosuid,nodev,relatime,user_id=0,group_id=0,default_permissions,allow_other,blksize=4096,uhelper=udisks2)
                        devtmpfs on /dev type devtmpfs (rw,relatime,size=340548k,nr_inodes=85137,mode=755)
                        fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
                        gvfsd-fuse on /run/user/1000/gvfs type fuse.gvfsd-fuse (rw,nosuid,nodev,relatime,user_id=1000,group_id=1000)
                        mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
                        proc on /proc type proc (rw,relatime)
                        pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
                        securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
                        sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
                        sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
                        systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=29,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
                        tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
                        tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
                        tmpfs on /run type tmpfs (rw,nosuid,nodev,size=188856k,nr_inodes=819200,mode=755)
                        tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=94424k,nr_inodes=23606,mode=700,uid=1000,gid=1000)
                        tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
                        
                        
                        Thomas Braun 1 Reply Last reply Reply Quote 0
                        • Thomas Braun
                          Thomas Braun Most Active @Mark last edited by Thomas Braun

                          @mark sagte in MariaDb verschieben:

                          "ubuntu-22.10-desktop-amd64"

                          Und das ganze Ding spuckt dir jetzt per Automount da rein.
                          Ubuntu 22.10 verwendet man eh nicht sondern die aktuelle Ubuntu-LTS-Version. (Wenn es denn unbedingt Ubuntu sein muss. Ich würde da ein Debian empfehlen).
                          Warum installiert man da einen Desktop, wenn weder Bildschirm noch Tastatur dranhängt? Komplett sinnfrei.

                          M D 2 Replies Last reply Reply Quote 0
                          • M
                            Mark @Thomas Braun last edited by

                            @thomas-braun ok, dann sind wir ja schon einen Schritt weiter. Ich hatte ja bereits erwähnt, dass ich blutiger Anfänger bin. Die installierte Version hab ich drauf gemacht, als das Ding noch bei mir im Hobbyraum mit Bildschirm und Tastatur lag. Danach hab ich einige Anleitungen ausprobiert und versucht mich etwas einzuarbeiten. Daraufhin hab ich iobroker installiert und den Raspy in den Keller gepackt. Von da an ging es nur noch per SSH.
                            Du hast mit Sicherheit recht mit dem was du sagst, das bedeutet aber, dass ich jetzt erstmal eine andere Karte suchen muss, Debian installiere, iobroker und adapter drauf, alles wieder neu einrichten und dann aber vermutlich am gleichen Punkt wieder stehe und die Datenbank bzw das Verzeichnis nicht hinbekomme. (Wobei ich auch gleich mit der Datenbank beginnen könnte...)

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

                              @mark

                              Wenn alles 'frisch neu', dann könntest du direkt bei der Installation den Stick in den richtigen Mountpunkt hängen.

                              Wobei ich auf einen Raspberry auch ein RaspberryOS installieren würde.

                              M 1 Reply Last reply Reply Quote 0
                              • M
                                Mark @Thomas Braun last edited by

                                @thomas-braun Hey Thomas, vielen Dank für Deine Hilfe! War wohl echt das einfachste mit dem neu aufsetzten. Bin begeistert, wie schnell und einfach das jetzt so funktioniert hat.

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

                                  @mark

                                  Ja, mein Reden. GUIs stehen eigentlich immer nur im Weg herum, wenn man wirklich MIT/AN einem Server-System arbeiten möchte.

                                  M 1 Reply Last reply Reply Quote 0
                                  • M
                                    Mark @Thomas Braun last edited by

                                    @thomas-braun zu früh gefreut!
                                    Hat alles super funktioniert. Auf einmal war 'sda' weg und tauchte als 'sdb' wieder auf. Der Mountpunkt ist dadurch auch weg.
                                    Hab dann sdb per mount ins richtige Verzeichnis eingebunden und mariadb neu gestartet (mit passworteingabe). Dann funktionierte es wieder.
                                    Kurze Zeit später das selbe. sdb weg, sdc da?!
                                    Was läuft hier schief?

                                    ich habe auch versucht die Platte per in etc/fstab mit
                                    PARTUUID=c378a661-7bf4-47b7-bdc0-c3b144fbf629 /var/lib/mysql ext4 defaults 0 2
                                    einzubinden. (weiß aber nicht, ob das so stimmt)

                                    lsblk
                                    NAME        MAJ:MIN RM   SIZE RO TYPE MOUNTPOINT
                                    sdb           8:16   0 931.5G  0 disk
                                    └─sdb1        8:17   0 931.5G  0 part
                                    mmcblk0     179:0    0  29.7G  0 disk
                                    ├─mmcblk0p1 179:1    0   256M  0 part /boot
                                    └─mmcblk0p2 179:2    0  29.5G  0 part /
                                    
                                    
                                    blkid
                                    /dev/mmcblk0p1: LABEL_FATBOOT="bootfs" LABEL="bootfs" UUID="37CA-39EC" BLOCK_SIZE="512" TYPE="vfat" PARTUUID="6af5191f-01"
                                    /dev/mmcblk0p2: LABEL="rootfs" UUID="a4af13c6-d165-4cbd-a9f6-c961fef8255d" BLOCK_SIZE="4096" TYPE="ext4" PARTUUID="6af5191f-02"
                                    
                                    mount | sort
                                    bpf on /sys/fs/bpf type bpf (rw,nosuid,nodev,noexec,relatime,mode=700)
                                    cgroup2 on /sys/fs/cgroup type cgroup2 (rw,nosuid,nodev,noexec,relatime,nsdelegate,memory_recursiveprot)
                                    configfs on /sys/kernel/config type configfs (rw,nosuid,nodev,noexec,relatime)
                                    debugfs on /sys/kernel/debug type debugfs (rw,nosuid,nodev,noexec,relatime)
                                    /dev/mmcblk0p1 on /boot type vfat (rw,relatime,fmask=0022,dmask=0022,codepage=437,iocharset=ascii,shortname=mixed,errors=remount-ro)
                                    /dev/mmcblk0p2 on / type ext4 (rw,noatime)
                                    devpts on /dev/pts type devpts (rw,nosuid,noexec,relatime,gid=5,mode=620,ptmxmode=000)
                                    /dev/sda1 on /var/lib/mysql type ext4 (rw,relatime)
                                    devtmpfs on /dev type devtmpfs (rw,relatime,size=332768k,nr_inodes=83192,mode=755)
                                    fusectl on /sys/fs/fuse/connections type fusectl (rw,nosuid,nodev,noexec,relatime)
                                    mqueue on /dev/mqueue type mqueue (rw,nosuid,nodev,noexec,relatime)
                                    proc on /proc type proc (rw,relatime)
                                    pstore on /sys/fs/pstore type pstore (rw,nosuid,nodev,noexec,relatime)
                                    securityfs on /sys/kernel/security type securityfs (rw,nosuid,nodev,noexec,relatime)
                                    sunrpc on /run/rpc_pipefs type rpc_pipefs (rw,relatime)
                                    sysfs on /sys type sysfs (rw,nosuid,nodev,noexec,relatime)
                                    systemd-1 on /proc/sys/fs/binfmt_misc type autofs (rw,relatime,fd=30,pgrp=1,timeout=0,minproto=5,maxproto=5,direct)
                                    tmpfs on /dev/shm type tmpfs (rw,nosuid,nodev)
                                    tmpfs on /run/lock type tmpfs (rw,nosuid,nodev,noexec,relatime,size=5120k)
                                    tmpfs on /run type tmpfs (rw,nosuid,nodev,size=186292k,nr_inodes=819200,mode=755)
                                    tmpfs on /run/user/1000 type tmpfs (rw,nosuid,nodev,relatime,size=93144k,nr_inodes=23286,mode=700,uid=1000,gid=1000)
                                    tracefs on /sys/kernel/tracing type tracefs (rw,nosuid,nodev,noexec,relatime)
                                    
                                    sudo blkid /dev/sdb1
                                    /dev/sdb1: UUID="708ae917-260f-4c93-b41b-1da779cb715a" BLOCK_SIZE="4096" TYPE="ext4" PARTLABEL="Basic data partition" PARTUUID="c378a661-7bf4-47b7-bdc0-c3b144fbf629"
                                    
                                    Thomas Braun 1 Reply Last reply Reply Quote 0
                                    • D
                                      diwoma @Thomas Braun last edited by

                                      @thomas-braun said in MariaDb verschieben:

                                      Warum installiert man da einen Desktop, wenn weder Bildschirm noch Tastatur dranhängt? Komplett sinnfrei.

                                      Weil man dann mit VNC rauf kann?

                                      Homoran Thomas Braun 2 Replies Last reply Reply Quote 0
                                      • Homoran
                                        Homoran Global Moderator Administrators @diwoma last edited by Homoran

                                        @diwoma sagte in MariaDb verschieben:

                                        Weil man dann mit VNC rauf kann?

                                        und wofür braucht man vnc auf einem Server?
                                        zum Öffnen der Konsole?
                                        Server werden per Fernkonsole administriert.

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

                                          @diwoma sagte in MariaDb verschieben:

                                          Weil man dann mit VNC rauf kann?

                                          Auch komplett sinnfrei. Das Terminal schaut über VNC auch nicht anders aus.

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

                                            @mark

                                            Mounte über die
                                            UUID="708ae917-260f-4c93-b41b-1da779cb715a"
                                            dann rutscht das Device auch nicht auf /dev/sdX

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

                                            Support us

                                            ioBroker
                                            Community Adapters
                                            Donate

                                            750
                                            Online

                                            31.7k
                                            Users

                                            79.8k
                                            Topics

                                            1.3m
                                            Posts

                                            5
                                            33
                                            1159
                                            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