Skip to content

ZFS-Pool - Do not use (sda & sdb) to create a pool!

Linux
  • Was ist passiert?

    root@pve:~# zpool status
      pool: ZFS-Pool
     state: DEGRADED
    status: One or more devices could not be used because the label is missing or
    	invalid.  Sufficient replicas exist for the pool to continue
    	functioning in a degraded state.
    action: Replace the device using 'zpool replace'.
       see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-4J
      scan: resilvered 841G in 01:52:53 with 0 errors on Sun Oct 17 10:18:42 2021
    config:
    
    	NAME                                          STATE     READ WRITE CKSUM
    	ZFS-Pool                                      DEGRADED     0     0     0
    	  mirror-0                                    DEGRADED     0     0     0
    	    ata-WDC_WD40EZRZ-00GXCB0_WD-WCC7K6XD2C26  ONLINE       0     0     0
    	    8992518921607088473                       UNAVAIL      0     0     0  was /dev/sdb1
    
    errors: No known data errors
    

    Ich hatte die Tage den ZFS-Pool für meinen Proxmox mit einer Devicebezeichnung /dev/sdb angelegt. Wie ich schon kurz danach begriffen hatte, keine gute Idee. Ich war aber in der Annahme, das das nicht so häufig passiert, das die Laufwerksbezeichnungen sich verschieben.

    Da ich heute das Gehäuse komplett fertig montiert habe, Laufwerke festgemacht usw. , habe ich bewusst kein SATA-Kabel angefasst, ausgesteckt usw. Es hat nichts geholfen, nach einen Neustart des Proxmox waren die Laufwerksbezeichnungen durcheinander.

    dev.png

    Ich habe zwei ZFS_Pools, der ZFS-Pool für den Proxmox und einen Pool, der an eine VM durchgereicht wird. Den hatte ich korrekt mit den IDs aus /dev/disk/by-id angelegt. Darum ist der auch noch intakt.

    root@debian1:~# zpool status
      pool: NAS
     state: ONLINE
      scan: resilvered 232K in 00:00:01 with 0 errors on Sun Oct 17 16:38:46 2021
    config:
    
    	NAME                                      STATE     READ WRITE CKSUM
    	NAS                                       ONLINE       0     0     0
    	  mirror-0                                ONLINE       0     0     0
    	    scsi-0QEMU_QEMU_HARDDISK_drive-scsi1  ONLINE       0     0     0
    	    scsi-0QEMU_QEMU_HARDDISK_drive-scsi2  ONLINE       0     0     0
    
    errors: No known data errors
    

    Ok, wie bekommen wir das gefixt? Der Fehler schreibt ja genau, was zu machen ist.

    ZFS zeigt uns genau die Ursache

    status: One or more devices could not be used because the label is missing or
        	invalid.  Sufficient replicas exist for the pool to continue
        	functioning in a degraded state.
    

    und das was man machen soll.

    action: Replace the device using 'zpool replace'.
           see: https://openzfs.github.io/openzfs-docs/msg/ZFS-8000-4J
    

    Ich habe mich dafür entschieden, das hier zu machen.

     zpool replace test c0t0d1
    

    Ok, was brauche ich? Die ID der Platte.

    root@pve:/dev/disk/by-id# ls -lha
    total 0
    drwxr-xr-x 2 root root 860 Oct 18 09:03 .
    drwxr-xr-x 8 root root 160 Oct 18 09:03 ..
    lrwxrwxrwx 1 root root   9 Oct 18 09:03 ata-WDC_WD40EZRZ-00GXCB0_WD-WCC7K5PPSH52 -> ../../sdc
    lrwxrwxrwx 1 root root  10 Oct 18 09:03 ata-WDC_WD40EZRZ-00GXCB0_WD-WCC7K5PPSH52-part1 -> ../../sdc1
    lrwxrwxrwx 1 root root  10 Oct 18 09:03 ata-WDC_WD40EZRZ-00GXCB0_WD-WCC7K5PPSH52-part9 -> ../../sdc9
    lrwxrwxrwx 1 root root   9 Oct 18 09:03 ata-WDC_WD40EZRZ-00GXCB0_WD-WCC7K6XD2C26 -> ../../sda
    lrwxrwxrwx 1 root root  10 Oct 18 09:03 ata-WDC_WD40EZRZ-00GXCB0_WD-WCC7K6XD2C26-part1 -> ../../sda1
    lrwxrwxrwx 1 root root  10 Oct 18 09:03 ata-WDC_WD40EZRZ-00GXCB0_WD-WCC7K6XD2C26-part9 -> ../../sda9
    [..gekürzt..]
    

    zpool status zeigt mir an, welche Platte im Pool intakt ist.

    ata-WDC_WD40EZRZ-00GXCB0_WD-WCC7K6XD2C26
    

    Ok, dann brauche ich jetzt die andere

    ata-WDC_WD40EZRZ-00GXCB0_WD-WCC7K5PPSH52
    

    Soweit die Theorie. Nasse Hände? Ein wenig 🙂 Dann mal los....

    zpool replace ZFS-Pool ata-WDC_WD40EZRZ-00GXCB0_WD-WCC7K5PPSH52
    

    Ok, geht nicht.

    root@pve:/dev/disk/by-id# zpool replace ZFS-Pool ata-WDC_WD40EZRZ-00GXCB0_WD-WCC7K5PPSH52
    invalid vdev specification
    use '-f' to override the following errors:
    /dev/disk/by-id/ata-WDC_WD40EZRZ-00GXCB0_WD-WCC7K5PPSH52-part1 is part of active pool 'ZFS-Pool'
    

    Hmm, also nachdenken. Das Laufwerk muss raus aus dem Pool, also das hier 8992518921607088473

    root@pve:~# zpool detach ZFS-Pool 8992518921607088473
    

    Status danach

    root@pve:~# zpool status
      pool: ZFS-Pool
     state: ONLINE
      scan: resilvered 841G in 01:52:53 with 0 errors on Sun Oct 17 10:18:42 2021
    config:
    
    	NAME                                        STATE     READ WRITE CKSUM
    	ZFS-Pool                                    ONLINE       0     0     0
    	  ata-WDC_WD40EZRZ-00GXCB0_WD-WCC7K6XD2C26  ONLINE       0     0     0
    
    errors: No known data errors
    

    Gut, jetzt die richtige Platte wieder hinzufügen. Ich hatte erst noch einen Replace probiert, aber er meckert, logisch, über eine nicht vorhandene Platte im Pool. Also, wieder hinzufügen, so wie ich das am Anfang gemacht habe. Aber diesmal mit der richtigen ID.

    zpool attach ZFS-Pool ata-WDC_WD40EZRZ-00GXCB0_WD-WCC7K6XD2C26 ata-WDC_WD40EZRZ-00GXCB0_WD-WCC7K5PPSH52
    

    Kam nix, kein Fehler. Juhu! Kontrolle...

    root@pve:~# zpool status
      pool: ZFS-Pool
     state: ONLINE
    status: One or more devices is currently being resilvered.  The pool will
    	continue to function, possibly in a degraded state.
    action: Wait for the resilver to complete.
      scan: resilver in progress since Mon Oct 18 15:32:05 2021
    	52.7G scanned at 5.85G/s, 324K issued at 36K/s, 1.19T total
    	0B resilvered, 0.00% done, no estimated completion time
    config:
    
    	NAME                                          STATE     READ WRITE CKSUM
    	ZFS-Pool                                      ONLINE       0     0     0
    	  mirror-0                                    ONLINE       0     0     0
    	    ata-WDC_WD40EZRZ-00GXCB0_WD-WCC7K6XD2C26  ONLINE       0     0     0
    	    ata-WDC_WD40EZRZ-00GXCB0_WD-WCC7K5PPSH52  ONLINE       0     0     0
    
    errors: No known data errors
    

    Ok, der Pool wird wieder neu gespiegelt oder was auch immer 🙂 Fertig!!

    Merksatz

    NIE, NIE einen ZPoll mit Laufwerksbezeichnungen anlegen. Auch wenn das hunderte Webseiten so im Netz zeigen. NIEMALS! Immer die IDs benutzen!!

  • Hier kurz vor dem Abschluss der Spiegelung.

    d54abd23-aa52-482d-b9e1-52ece09106ec-grafik.png

    Und alles wieder gut und eine Menge gelernt 🤓

    594b6283-bbbe-4cec-8401-d57cce52012b-grafik.png

  • ufw - Die einfache Firewall

    Linux
    3
    0 Stimmen
    3 Beiträge
    129 Aufrufe
    FrankMF

    Beispiel um eingehend einen Port für eine IP-Adresse zu erlauben.

    ufw allow from 1.1.1.1 to any port 8000
  • Proxmox - Backup Server WakeOnLan

    Proxmox
    1
    0 Stimmen
    1 Beiträge
    567 Aufrufe
    Niemand hat geantwortet
  • Node.js - Security Update

    Linux
    1
    0 Stimmen
    1 Beiträge
    197 Aufrufe
    Niemand hat geantwortet
  • Proxmox - Neue HDD hinzufügen

    Verschoben Proxmox
    2
    0 Stimmen
    2 Beiträge
    3k Aufrufe
    FrankMF

    Hoppla, da passt was nicht.

    root@frank-mankel:~# pvesm status Name Type Status Total Used Available % VM lvmthin active 488136704 23284120 464852583 4.77% backup dir active 57278576 3501916 50837372 6.11% local dir active 57278576 3501916 50837372 6.11% local-lvm lvmthin active 147275776 0 147275776 0.00%

    Hier sieht man, das backup ca. 50GB groß ist. Da die Partition deutlich größer ist, fehlt da was!?? Kurz mal nachgedacht und gesucht..... 😉

    Der Eintrag in /etc/fstab muss natürlich auch vorhanden sein, so wie gewohnt. Danach

    root@frank-mankel:~# pvesm status Name Type Status Total Used Available % VM lvmthin active 488136704 23284120 464852583 4.77% backup dir active 1921797220 77856 1824027568 0.00% local dir active 57278576 3502984 50836304 6.12% local-lvm lvmthin active 147275776 0 147275776 0.00%

    e9b52dbe-dc81-4bec-a4e8-a26885f57d84-grafik.png

    Mein vorhin erstelltes Backup war weg. Also aufpassen!!

  • Proxmox - TOTP

    Verschoben Proxmox
    2
    0 Stimmen
    2 Beiträge
    339 Aufrufe
    FrankMF

    Als Ergänzung, nein das darf nicht die einzige Maßnahme sein.

    Firewall fail2ban usw.
  • Projekt Ryzen7 & X570 Mainboard

    Linux
    25
    0 Stimmen
    25 Beiträge
    2k Aufrufe
    FrankMF

    Nach sehr langer Zeit, habe ich heute mal wieder ein aktuelles BIOS geflashed.

    9f33e13e-92f8-452e-b238-5469bdc6d571-grafik.png

    Link Preview Image MPG X570 GAMING PLUS

    Satisfying gamers with what they really need, MPG X570 GAMING PLUS is equipped with Extended Heatsink Design, Frozr Heatsink Design, Core boost, Lightning Gen4 M.2, M.2 Shield Frozr accessory, Game Boost, Turbo USB and MSI latest Dragon Center. Black and

    favicon

    (de.msi.com)

    20220409_084823.jpg

    20220409_084852.jpg

    Danach Neustart, bootet wie es soll. Damit wäre mein Mainboard kompatibel für den wohl letzten Prozessor auf dem AM4 basierenden Board.

    Ryzen 7 5800X3D

    Gamestar schreibt dazu

    AMD möchte mit einem neuen Prozessor noch einmal ein Spitzenmodell für Spieler bringen, welches auf dem aktuellen Sockel AM4 basiert. Künftige Modelle werden auf einen neuen Sockel namens AM5 setzen. Der wohl letzte Prozessor für mit AM4 und damit auch die Zen-3-Architektur bringt aber noch eine Besonderheit mit sich.
    Quelle: https://www.gamestar.de/artikel/ryzen-7-5800x3d-tests-spieler,3379594.html

    Das PC Magazin schreibt zu Preis und Verfügbarkeit

    Am 15. März hat AMD den Preis und die Verfügbarkeit des Ryzen 7 5800X3D bekannt gegeben. Demnach wird die neue CPU mit 3D V-Cache am 20. April zu einer UVP von 449 US-Dollar ( rund 408 Euro) erscheinen.
    Quelle: https://www.pc-magazin.de/ratgeber/amd-ryzen-7-5800-prozessor-cpu-infos-preis-release-specs-3202912.html

    Ich bin sehe gespannt, ob der USB-Bug endlich behoben wurde. Ihr erinnert Euch? Wenn ich komplett neu starte, dann kann ich keine Eingabe machen. Tastatur und Maus ohne Funktion.

    Ich verrate Euch sicherlich nicht zu viel, wenn ich aktuell eine Neuanschaffung plane, so ein AM5 Brett würde mich schon reizen 🙂 Denke, das war der letzte Beitrag zu diesem Projekt 😉

  • Node.js installieren

    Linux
    1
    0 Stimmen
    1 Beiträge
    289 Aufrufe
    Niemand hat geantwortet
  • Installation von Grav & NGinx & PHP7.2

    Angeheftet Verschoben Grav
    2
    0 Stimmen
    2 Beiträge
    1k Aufrufe
    FrankMF

    Nachdem ich den ROCKPro64 jetzt auf den Mainline umgestellt habe, lief meine Testinstallation von Grav nicht mehr.

    Hilfreiche Sache um das Problem zu lösen -> https://gist.github.com/GhazanfarMir/03bd1f1f770a3834d47274586d46ea62

    Ich bekam immer 502 Bad Gateway, Grund war ein nicht korrekt gestarteter php-pfm Service.

    rock64@rockpro64v2_0:/usr/local/bin$ sudo service php7.2-fpm start rock64@rockpro64v2_0:/usr/local/bin$ sudo service php7.2-fpm status ● php7.2-fpm.service - The PHP 7.2 FastCGI Process Manager Loaded: loaded (/lib/systemd/system/php7.2-fpm.service; enabled; vendor preset: enabled) Active: active (running) since Thu 2018-08-16 20:15:20 CEST; 21s ago Docs: man:php-fpm7.2(8) Main PID: 3206 (php-fpm7.2) Status: "Processes active: 0, idle: 2, Requests: 3, slow: 0, Traffic: 0.2req/sec" Tasks: 3 (limit: 4622) CGroup: /system.slice/php7.2-fpm.service ├─3206 php-fpm: master process (/etc/php/7.2/fpm/php-fpm.conf) ├─3207 php-fpm: pool www └─3208 php-fpm: pool www Aug 16 20:15:19 rockpro64v2_0 systemd[1]: Starting The PHP 7.2 FastCGI Process Manager... Aug 16 20:15:20 rockpro64v2_0 systemd[1]: Started The PHP 7.2 FastCGI Process Manager.