[SOLVED] Partition vermisst nach RAID-Z2 rebuild

r4dh4l

Active Member
Feb 5, 2018
88
7
28
Hallo zusammen,

ich habe meinen Heim-Server kürzlich auf Proxmox umgezogen und musste sogleich das eingerichtete RAID-Z2 wieherstellen, da /dev/sda ausfiel. Nach der Wiederherstellung entsprechend Wiki-Artikel hatte ich folgende Partitionen:

# lsblk
NAME MAJ:MIN RM SIZE RO TYPE MOUNTPOINT
sda 8:0 0 2.7T 0 disk
├─sda1 8:1 0 2.7T 0 part
└─sda9 8:9 0 8M 0 part
sdb 8:16 0 2.7T 0 disk
├─sdb1 8:17 0 1007K 0 part
├─sdb2 8:18 0 2.7T 0 part
└─sdb9 8:25 0 8M 0 part
sdc 8:32 0 2.7T 0 disk
├─sdc1 8:33 0 1007K 0 part
├─sdc2 8:34 0 2.7T 0 part
└─sdc9 8:41 0 8M 0 part
sdd 8:48 0 2.7T 0 disk
├─sdd1 8:49 0 1007K 0 part
├─sdd2 8:50 0 2.7T 0 part
└─sdd9 8:57 0 8M 0 part
zd0 230:0 0 7G 0 disk [SWAP]
zd16 230:16 0 4.5G 0 disk
zd32 230:32 0 4.5G 0 disk
zd48 230:48 0 8G 0 disk
├─zd48p1 230:49 0 243M 0 part
├─zd48p2 230:50 0 1K 0 part
└─zd48p5 230:53 0 7.8G 0 part
zd64 230:64 0 4.5G 0 disk
zd80 230:80 0 4.5G 0 disk
zd96 230:96 0 4.5G 0 disk
zd112 230:112 0 3.5T 0 disk
zd128 230:128 0 8G 0 disk
├─zd128p1 230:129 0 243M 0 part
├─zd128p2 230:130 0 1K 0 part
└─zd128p5 230:133 0 7.8G 0 part​

...warum fehlt "sda1"?

Laut meiner history hatte ich zur Wiederherstellung folgende Befehle eingegeben:

sgdisk --replicate=/dev/sda /dev/sdb
sgdisk --randomize-guids /dev/sda
grub-install /dev/sda
zpool replace rpool 13327852728749845485 /dev/sda​

Habe ich hier etwas vergessen?

Danke!
r4dh4l
 
Hi,
zpool replace rpool 13327852728749845485 /dev/sda
damit hast du dir wieder alles überschrieben.

Code:
zpool replace rpool 13327852728749845485 /dev/sda2
musst man hier verwenden verwenden.
 
  • Like
Reactions: r4dh4l
:facepalm: ...danke wolfgang!
 
(Danke für den Hinweis fireon.)

Ich wollte heute morgen /dev/sda(2) nochmal "ordentlich" rebuilden. Leider ging das ziemlich daneben, obwohl ich dachte, alles "nach Anleitung" gemacht zu haben. Im Moment fahr ich auf "Notstrom" und musste 2/4 Platten aus dem RAID-Z2 abziehen, damit Proxmox überhaupt noch bootet.

Ich bitte im Voraus um Entschuldigung: ich habe meine Eingaben und die Ausgaben protokolliert, weswegen der Post jetzt etwas länger wird, was aber hoffentlich zumindest hilft, um einen Hinweis zu bekommen, wie ich den Karren jetzt wieder aus dem Dreck ziehen könnte.

Zur Erinnerung: los ging es mein damit, dass ich beim ersten Rebuild statt
Code:
zpool replace rpool 13327852728749845485 /dev/sda2
fälschlicherweise
Code:
zpool replace rpool 13327852728749845485 /dev/sda
genommen hatte. Der Status war also:

Code:
# zpool status -v
  pool: rpool
 state: ONLINE
  scan: scrub repaired 0B in 18h27m with 0 errors on Sun Feb 11 18:51:27 2018
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          raidz2-0  ONLINE       0     0     0
            sda     ONLINE       0     0     0
            sdb2    ONLINE       0     0     0
            sdc2    ONLINE       0     0     0
            sdd2    ONLINE       0     0     0

errors: No known data errors

Nun habe ich entsprechend Wiki versucht, /dev/sda so zu ersetzen versucht als wäre /dev/sda tatsächlich defekt, also in Reihefolge der eingegebenen Befehle:

Code:
# zpool offline rpool /dev/sda && zpool status -v
  pool: rpool
 state: DEGRADED
status: One or more devices has been taken offline by the administrator.
        Sufficient replicas exist for the pool to continue functioning in a
        degraded state.
action: Online the device using 'zpool online' or replace the device with
        'zpool replace'.
  scan: scrub repaired 0B in 18h27m with 0 errors on Sun Feb 11 18:51:27 2018
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       DEGRADED     0     0     0
          raidz2-0  DEGRADED     0     0     0
            sda     OFFLINE      0     0     0
            sdb2    ONLINE       0     0     0
            sdc2    ONLINE       0     0     0
            sdd2    ONLINE       0     0     0

errors: No known data errors

# dd if=/dev/urandom of=/dev/sda bs=64K status=progress
1047789568 bytes (1.0 GB, 999 MiB) copied, 23 s, 45.6 MB/s    ^C
16267+0 records in
16266+0 records out
1066008576 bytes (1.1 GB, 1017 MiB) copied, 25.622 s, 41.6 MB/s

# shutdown -h now

(Bevor die Frage kommt, was das dd-Kommando sollte: bei meinem ersten rebuild-Versuch damals meckerte ZFS, dass die Platte nicht ZFS-formatiert sei (was zum damaligen Zeitpunkt auch stimmte), weswegen mir damals half, ein bisschen Datenmüll auf der Platte zu verteilen, damit ZFS sie annimmt - ist jetzt hier nur der Vollständigkeit aufgeführt, da ich den Befehl noch "im Kochbuch" und deswegen auch hier (wahrscheinlich unsinnig) genutzt hatte)

Jedenfalls: jetzt habe ich die Platte "hinter" /dev/sda (Platte 1von4) aus dem Server gezogen, diesen wieder hochgefahren und die Platte 1von4 wieder eingeschoben.

Code:
# sgdisk --replicate=/dev/sda /dev/sdb
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.

# sgdisk --randomize-guids /dev/sda
Warning: The kernel is still using the old partition table.
The new table will be used at the next reboot or after you
run partprobe(8) or kpartx(8)
The operation has completed successfully.

# grub-install /dev/sda
Installing for i386-pc platform.
Installation finished. No error reported.

Etwas verwundert über die Warnungen hatte ich mich an dieser Stelle vergewissert, dass die Zuordnungen so waren wie erwartet, was dem Anschein nach auch so war:

Code:
# zdb | less
rpool:
    version: 5000
    name: 'rpool'
    state: 0
    txg: 426942
    pool_guid: 9973961061107860467
    errata: 0
    hostid: 656640
    hostname: 'proxmox-server'
    com.delphix:has_per_vdev_zaps
    vdev_children: 1
    vdev_tree:
        type: 'root'
        id: 0
        guid: 9973961061107860467
        children[0]:
            type: 'raidz'
            id: 0
            guid: 10834227445461462896
            nparity: 2
            metaslab_array: 128
            metaslab_shift: 36
            ashift: 12
            asize: 12002313371648
            is_log: 0
            create_txg: 4
            com.delphix:vdev_zap_top: 66
            children[0]:
                type: 'disk'
                id: 0
                guid: 3746872896469901947
                path: '/dev/sda1'
                devid: 'ata-WDC_WD30EFRX-68EUZN0_WD-WCC4ND0PVXEA-part1'
                phys_path: 'pci-0000:01:00.0-ata-1'
                whole_disk: 1
                DTL: 28
                create_txg: 4
                com.delphix:vdev_zap_leaf: 26
                offline: 1
            children[1]:
                type: 'disk'
                id: 1
                guid: 1020653270431596650
                path: '/dev/sdb2'
                whole_disk: 0
                DTL: 79
                create_txg: 4
                com.delphix:vdev_zap_leaf: 68
            children[2]:
                type: 'disk'
                id: 2
                guid: 1321917959934574704
                path: '/dev/sdc2'
                whole_disk: 0
                DTL: 78
                create_txg: 4
                com.delphix:vdev_zap_leaf: 69
            children[3]:
                type: 'disk'
                id: 3
                guid: 14728949233396094063
                path: '/dev/sdd2'
                whole_disk: 0
                DTL: 31
                create_txg: 4
                com.delphix:vdev_zap_leaf: 70
    features_for_read:
        com.delphix:hole_birth
        com.delphix:embedded_data

Da ich laut zdb-Ausgabe davon ausging, dass alle 4 Platten vom Server an die richtige Stelle verortet wurden, wollte ich nun mit dem Rebuild von /dev/sda2 fortfahren, was ZFS leider mit folgenden Fehlermeldungen permanent verweigerte:

Code:
# zpool replace rpool 3746872896469901947 /dev/sda2
invalid vdev specification
use '-f' to override the following errors:
/dev/sda2 is part of active pool 'rpool'

Wahrscheinlich habe ich dann mit folgendem Befehl einen kritischen Fehler begangen. Ich wollte entsprechend der vorigen Fehlermeldung sicherstellen, dass /dev/sda2 wirklich offline ist. Fragt mich nicht, warum ich vorher nicht nochmal "zpool status" aufgerufen habe. Jedenfalls:

Code:
# zpool offline rpool /dev/sda2

# zpool replace rpool 3746872896469901947 /dev/sda2
invalid vdev specification
use '-f' to override the following errors:
/dev/sda2 is part of active pool 'rpool'

# zpool replace -f rpool 3746872896469901947 /dev/sda2
invalid vdev specification
the following errors must be manually repaired:
/dev/sda2 is part of active pool 'rpool'

# zpool replace rpool /dev/sda2
invalid vdev specification
use '-f' to override the following errors:
/dev/sda2 is part of active pool 'rpool'

# zpool replace -f rpool /dev/sda2
invalid vdev specification
the following errors must be manually repaired:
/dev/sda2 is part of active pool 'rpool'

"zpool status" kam mir leider zu spät in den Sinn, wahrscheinlich war die Zuordnung der Platten doch nicht so wie erwartet:

Code:
# zpool status -v
  pool: rpool
 state: DEGRADED
status: One or more devices has been taken offline by the administrator.
        Sufficient replicas exist for the pool to continue functioning in a
        degraded state.
action: Online the device using 'zpool online' or replace the device with
        'zpool replace'.
  scan: resilvered 196K in 0h0m with 0 errors on Mon Feb 12 09:23:16 2018
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       DEGRADED     0     0     0
          raidz2-0  DEGRADED     0     0     0
            sda     OFFLINE      0     0     0
            sda2    OFFLINE      0     0     0
            sdb2    ONLINE       0     0     0
            sdc2    ONLINE       0     0     0

"zdb" gab ab diesem Zeitpunkt entsprechend auch etwas anderes aus als beim ersten Mal:

Code:
# zdb | less
rpool:
    version: 5000
    name: 'rpool'
    state: 0
    txg: 427286
    pool_guid: 9973961061107860467
    errata: 0
    hostid: 656640
    hostname: 'proxmox-server'
    com.delphix:has_per_vdev_zaps
    vdev_children: 1
    vdev_tree:
        type: 'root'
        id: 0
        guid: 9973961061107860467
        children[0]:
            type: 'raidz'
            id: 0
            guid: 10834227445461462896
            nparity: 2
            metaslab_array: 128
            metaslab_shift: 36
            ashift: 12
            asize: 12002313371648
            is_log: 0
            create_txg: 4
            com.delphix:vdev_zap_top: 66
            children[0]:
                type: 'disk'
                id: 0
                guid: 3746872896469901947
                path: '/dev/sda1'
                devid: 'ata-WDC_WD30EFRX-68EUZN0_WD-WCC4ND0PVXEA-part1'
                phys_path: 'pci-0000:01:00.0-ata-1'
                whole_disk: 1
                DTL: 28
                create_txg: 4
                com.delphix:vdev_zap_leaf: 26
                offline: 1
            children[1]:
                type: 'disk'
                id: 1
                guid: 1020653270431596650
                path: '/dev/sda2'
                whole_disk: 0
                DTL: 79
                create_txg: 4
                com.delphix:vdev_zap_leaf: 68
                offline: 1
            children[2]:
                type: 'disk'
                id: 2
                guid: 1321917959934574704
                path: '/dev/sdb2'
                whole_disk: 0
                DTL: 78
                create_txg: 4
                com.delphix:vdev_zap_leaf: 69
            children[3]:
                type: 'disk'
                id: 3
                guid: 14728949233396094063
                path: '/dev/sdc2'
                whole_disk: 0
                DTL: 31
                create_txg: 4
                com.delphix:vdev_zap_leaf: 70
    features_for_read:
        com.delphix:hole_birth
        com.delphix:embedded_data

In der Hoffnung, eine dev-Zuordnung entsprechend der physischen 4 HDD-Slots (sda-sdd) wieder zu erlangen, habe ich den Server nun runtergefahren, Platte 1von4 herausgezogen, den Server wieder gestartet, worauf mich "grub rescue" begrüßte:

Code:
error: checksum verification failed.
Entering rescue mode...
grub rescue>_

Da auf dem Server ein Matrix-Node für meine Familie läuft, konnte ich ihn jetzt nicht Mitten am Tag länger offline nehmen und hab im Vertrauen auf RAID-Z2 den Server runtergfahren, Platte 1von4 und 2von4 abgezogen, worauf Proxmox zumindest wieder bootete:

Code:
# lsblk
NAME      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda         8:0    0  2.7T  0 disk
├─sda1      8:1    0 1007K  0 part
├─sda2      8:2    0  2.7T  0 part
└─sda9      8:9    0    8M  0 part
sdb         8:16   0  2.7T  0 disk
├─sdb1      8:17   0 1007K  0 part
├─sdb2      8:18   0  2.7T  0 part
└─sdb9      8:25   0    8M  0 part
zd0       230:0    0    7G  0 disk [SWAP]
zd16      230:16   0  4.5G  0 disk
zd32      230:32   0    8G  0 disk
├─zd32p1  230:33   0  243M  0 part
├─zd32p2  230:34   0    1K  0 part
└─zd32p5  230:37   0  7.8G  0 part
zd48      230:48   0  4.5G  0 disk
zd64      230:64   0  4.5G  0 disk
zd80      230:80   0  3.5T  0 disk
zd96      230:96   0  4.5G  0 disk
zd112     230:112  0  4.5G  0 disk
zd128     230:128  0    8G  0 disk
├─zd128p1 230:129  0  243M  0 part
├─zd128p2 230:130  0    1K  0 part
└─zd128p5 230:133  0  7.8G  0 part

# zpool status -v
  pool: rpool
 state: DEGRADED
status: One or more devices has been taken offline by the administrator.
        Sufficient replicas exist for the pool to continue functioning in a
        degraded state.
action: Online the device using 'zpool online' or replace the device with
        'zpool replace'.
  scan: resilvered 196K in 0h0m with 0 errors on Mon Feb 12 09:23:16 2018
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       DEGRADED     0     0     0
          raidz2-0  DEGRADED     0     0     0
            sda     OFFLINE      0     0     0
            sda2    OFFLINE      0     0     0
            sda2    ONLINE       0     0     0
            sdb2    ONLINE       0     0     0

errors: No known data errors

# zdb | less
rpool:
    version: 5000
    name: 'rpool'
    state: 0
    txg: 427286
    pool_guid: 9973961061107860467
    errata: 0
    hostid: 656640
    hostname: 'proxmox-server'
    com.delphix:has_per_vdev_zaps
    vdev_children: 1
    vdev_tree:
        type: 'root'
        id: 0
        guid: 9973961061107860467
        children[0]:
            type: 'raidz'
            id: 0
            guid: 10834227445461462896
            nparity: 2
            metaslab_array: 128
            metaslab_shift: 36
            ashift: 12
            asize: 12002313371648
            is_log: 0
            create_txg: 4
            com.delphix:vdev_zap_top: 66
            children[0]:
                type: 'disk'
                id: 0
                guid: 3746872896469901947
                path: '/dev/sda1'
                devid: 'ata-WDC_WD30EFRX-68EUZN0_WD-WCC4ND0PVXEA-part1'
                phys_path: 'pci-0000:01:00.0-ata-1'
                whole_disk: 1
                DTL: 28
                create_txg: 4
                com.delphix:vdev_zap_leaf: 26
                offline: 1
            children[1]:
                type: 'disk'
                id: 1
                guid: 1020653270431596650
                path: '/dev/sda2'
                whole_disk: 0
                DTL: 79
                create_txg: 4
                com.delphix:vdev_zap_leaf: 68
                offline: 1
            children[2]:
                type: 'disk'
                id: 2
                guid: 1321917959934574704
                path: '/dev/sdb2'
                whole_disk: 0
                DTL: 78
                create_txg: 4
                com.delphix:vdev_zap_leaf: 69
            children[3]:
                type: 'disk'
                id: 3
                guid: 14728949233396094063
                path: '/dev/sdc2'
                whole_disk: 0
                DTL: 31
                create_txg: 4
                com.delphix:vdev_zap_leaf: 70
    features_for_read:
        com.delphix:hole_birth
        com.delphix:embedded_data

Aktuell vermute ich Folgendes:

Platte 1von4 und 2von4 (die, die mal /dev/sda und /dev/sdb waren) hab ich wohl irgendwie zerschossen.

Hätte jemand einen Hinweis, wie ich jetzt vorgehen sollte, damit nicht nur die Zurodnung (Platte 1von4 = /dev/sda, Platte 2von4 = /dev/sdb) wieder stimmt, sondern auch das RAID-Z2 komplett wiederhergestellt wird?

Danke für jeden Hinweis und Verzeihung für die lange Fehlerbeschreibung!
 
Hi,

ändere die Names Auflösung damit du nach Path genau weist welche Plate du ersetzen kannst.

im File /etc/default/zfs
unkommntiere diese Zeile
Code:
ZPOOL_IMPORT_PATH="/dev/disk/by-vdev:/dev/disk/by-id"

dann ein
Code:
update-grub

reboot und dann alles von vorne.
 
Danke! Rebooten konnte ich allerdings nach wie vor nur mit 2 von 4 Platten (phys. Platte 3 und 4). Der Versuch, Platte 2 wieder online zu nehmen endete mit:

Code:
# zpool online rpool 1020653270431596650
warning: device '1020653270431596650' onlined, but remains in faulted state
use 'zpool replace' to replace devices that are no longer present

# zpool status -v
  pool: rpool
 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: http://zfsonlinux.org/msg/ZFS-8000-4J
  scan: scrub in progress since Mon Feb 12 17:09:49 2018
        5.41G scanned out of 7.79T at 56.5M/s, 40h6m to go
        0B repaired, 0.07% done
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       DEGRADED     0     0     0
          raidz2-0  DEGRADED     0     0     0
            sda     OFFLINE      0     0     0
            sda2    FAULTED      0     0     0  corrupted data
            sdb2    ONLINE       0     0     0
            sdc2    ONLINE       0     0     0

errors: No known data errors

1. Gehe ich richtig in der Annahme, dass ich Platte 1 und 2 rebuilden muss?
2. falls 1. richtig: Platte 2 offline nehmen, dann entsprechend Wiki zuerst Platte 1 rebuilden (und mit GUIDs arbeiten), danach mit Platte 2 fortfahren? Angenommen, Platte 1 bekomme ich so als /dev/sda2 wieder hin, kollidiert dann das Wiederherstellen von Platte 2 als /dev/sdb2 nicht mit dem bestehenden /dev/sdb2 (das eigentlich /dev/sdc2 sein sollte)?
 
Last edited:
Ich weis nicht welchen Status deinen Platen haben,
deswegen würde ich davon ausgehen das du sie rebuilden musst.
 
Danke für Deine Rückmeldung, wolfgang.

Was sich mir nach wie vor nicht erschließt ist, warum "zpool status" eine andere Platten-Zuordnung anzeigt als "lsblk" und "zdb" zwei Platten an sda2 "bindet":

Code:
# zpool status -v
  pool: rpool
 state: DEGRADED
[...]
        NAME        STATE     READ WRITE CKSUM
        rpool       DEGRADED     0     0     0
          raidz2-0  DEGRADED     0     0     0
            sda     OFFLINE      0     0     0
            sda2    FAULTED      0     0     0  corrupted data
            sdb2    ONLINE       0     0     0
            sdc2    ONLINE       0     0     0
[...]

# lsblk
NAME      MAJ:MIN RM  SIZE RO TYPE MOUNTPOINT
sda         8:0    0  2.7T  0 disk
├─sda1      8:1    0 1007K  0 part
├─sda2      8:2    0  2.7T  0 part
└─sda9      8:9    0    8M  0 part
sdb         8:16   0  2.7T  0 disk
├─sdb1      8:17   0 1007K  0 part
├─sdb2      8:18   0  2.7T  0 part
└─sdb9      8:25   0    8M  0 part
sdc         8:32   0  2.7T  0 disk
├─sdc1      8:33   0 1007K  0 part
├─sdc2      8:34   0  2.7T  0 part
└─sdc9      8:41   0    8M  0 part
sdd         8:48   0  2.7T  0 disk
├─sdd1      8:49   0 1007K  0 part
├─sdd2      8:50   0  2.7T  0 part
└─sdd9      8:57   0    8M  0 part
zd0       230:0    0    7G  0 disk [SWAP]
zd16      230:16   0  4.5G  0 disk
zd32      230:32   0    8G  0 disk
├─zd32p1  230:33   0  243M  0 part
├─zd32p2  230:34   0    1K  0 part
└─zd32p5  230:37   0  7.8G  0 part
zd48      230:48   0  4.5G  0 disk
zd64      230:64   0  4.5G  0 disk
zd80      230:80   0  3.5T  0 disk
zd96      230:96   0  4.5G  0 disk
zd112     230:112  0  4.5G  0 disk
zd128     230:128  0    8G  0 disk
├─zd128p1 230:129  0  243M  0 part
├─zd128p2 230:130  0    1K  0 part
└─zd128p5 230:133  0  7.8G  0 part

# zdb | less
rpool:
[...]
            children[0]:
                type: 'disk'
                id: 0
                guid: 3746872896469901947
                path: '/dev/sda2' <-----------------------------------------------------------------------\
                devid: 'ata-WDC_WD30EFRX-68EUZN0_WD-WCC4ND0PVXEA-part2'  |
[...]                                                                                                                                  |
            children[1]:                                                                                                         | ?
                type: 'disk'                                                                                                      |
                id: 1                                                                                                                |
                guid: 1020653270431596650                                                                        |
                path: '/dev/sda2' <-----------------------------------------------------------------------/
[...]
            children[2]:
                type: 'disk'
                id: 2
                guid: 1321917959934574704
                path: '/dev/sdb2'
[...]
            children[3]:
                type: 'disk'
                id: 3
                guid: 14728949233396094063
                path: '/dev/sdc2'
[...]

Warum nimmt ZFS nicht die Zuordnungen wie in lsblk aufgeführt und wie gehe beim Rebuilden vor, wenn sda eigentlich sda2 sein sollte und sda2 eigentlich sdb2 (wobei das aktuelle sdb2 ja ursprünglich mal sdc2, und sdc2 mal sdd2 war)?
 
Bitte schick mir mal das Mapping

Code:
sgdisk --print /dev/sd<a-c>2
[Code]
 
Danke. sda2-sdc2:

Code:
# sgdisk --print /dev/sda2
Creating new GPT entries.
Disk /dev/sda2: 5860514702 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): 9FEDE679-25BD-414A-9B33-B65B0FD087EC
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860514668
Partitions will be aligned on 2048-sector boundaries
Total free space is 5860514635 sectors (2.7 TiB)

Number  Start (sector)    End (sector)  Size       Code  Name

# sgdisk --print /dev/sdb2
Creating new GPT entries.
Disk /dev/sdb2: 5860514702 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): AC383F09-22AD-4364-8E7E-F11F2124C3C1
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860514668
Partitions will be aligned on 2048-sector boundaries
Total free space is 5860514635 sectors (2.7 TiB)

Number  Start (sector)    End (sector)  Size       Code  Name

# sgdisk --print /dev/sdc2
Creating new GPT entries.
Disk /dev/sdc2: 5860514702 sectors, 2.7 TiB
Logical sector size: 512 bytes
Disk identifier (GUID): B26D95B6-A264-4235-A11F-621C29ED5D4B
Partition table holds up to 128 entries
First usable sector is 34, last usable sector is 5860514668
Partitions will be aligned on 2048-sector boundaries
Total free space is 5860514635 sectors (2.7 TiB)

Number  Start (sector)    End (sector)  Size       Code  Name

Edit: ...die GUID ändert sich bei jedem Aufruf - macht das Sinn?
 
Sorry mein Fehler sgdisk kann auf Partitionebene nicht richtig lesen.

Code:
lsblk -f
 
Danke, wieder was gelernt:

Code:
# lsblk -f
NAME      FSTYPE     LABEL UUID                                 MOUNTPOINT
sda                                                             
├─sda1                                                         
├─sda2    zfs_member rpool 9973961061107860467                 
└─sda9                                                         
sdb                                                             
├─sdb1                                                         
├─sdb2    zfs_member rpool 9973961061107860467                 
└─sdb9                                                         
sdc                                                             
├─sdc1                                                         
├─sdc2    zfs_member rpool 9973961061107860467                 
└─sdc9                                                         
sdd                                                             
├─sdd1                                                         
├─sdd2    zfs_member rpool 9973961061107860467                 
└─sdd9                                                         
zd0                                                             [SWAP]
zd16                                                           
zd32                                                           
├─zd32p1                                                       
├─zd32p2                                                       
└─zd32p5                                                       
zd48                                                           
zd64                                                           
zd80                                                           
zd96                                                           
zd112                                                           
zd128                                                           
├─zd128p1                                                       
├─zd128p2                                                       
└─zd128p5
 
Sorry nochmal einmal ich brauche die sub UUID fuer die das Mapping.

Code:
blkid
 
Kein Problem, danke für jede Hilfe:

Code:
# blkid | less
/dev/sda2: LABEL="rpool" UUID="9973961061107860467" UUID_SUB="3746872896469901947" TYPE="zfs_member" PARTLABEL="zfs" PARTUUID="efe9bd9d-1c2e-4049-9025-477e48b7706b"
/dev/sdb2: LABEL="rpool" UUID="9973961061107860467" UUID_SUB="1321917959934574704" TYPE="zfs_member" PARTLABEL="zfs" PARTUUID="7736d425-ea52-495e-b1f9-049675c77374"
/dev/sdc2: LABEL="rpool" UUID="9973961061107860467" UUID_SUB="14728949233396094063" TYPE="zfs_member" PARTLABEL="zfs" PARTUUID="13c960a5-b62a-412e-810c-d6075fffe28a"
/dev/zd0: UUID="e5da7fd2-666c-47fd-bb92-d6d240fd3765" TYPE="swap"
/dev/zd32p1: UUID="46e5a07d-b4b6-45f6-8017-063774842f42" TYPE="ext2" PARTUUID="ea8a27ed-01"
/dev/zd32p5: UUID="jSddmO-1Z7l-GGxb-aETI-3jPg-rTU1-UBhGtw" TYPE="LVM2_member" PARTUUID="ea8a27ed-05"
/dev/zd80: UUID="f5255bd3-60ef-4889-b6b4-91170b652755" TYPE="crypto_LUKS"
/dev/zd128p1: UUID="46e5a07d-b4b6-45f6-8017-063774842f42" TYPE="ext2" PARTUUID="ea8a27ed-01"
/dev/zd128p5: UUID="jSddmO-1Z7l-GGxb-aETI-3jPg-rTU1-UBhGtw" TYPE="LVM2_member" PARTUUID="ea8a27ed-05"
/dev/sdd2: LABEL="rpool" UUID="9973961061107860467" UUID_SUB="1020653270431596650" TYPE="zfs_member" PARTLABEL="zfs" PARTUUID="d9c3a9ca-cf56-43ae-a209-eb6f001bc3ce"
/dev/sda1: PARTUUID="74de145e-5369-4539-be44-9e8c33ae3b2b"
/dev/sda9: PARTUUID="892388f6-7102-4d88-8270-128d291a2d25"
/dev/sdb1: PARTUUID="2ddebef9-19fb-4c36-b18f-1ae8e4039685"
/dev/sdb9: PARTUUID="4e9be946-f966-4739-a284-0b3afef4bfe3"
/dev/sdc1: PARTUUID="f0fabc35-29e8-43fc-b446-af41f7f16186"
/dev/sdc9: PARTUUID="f6693a61-d245-4e42-86ff-68441f4796de"
/dev/zd32: PTUUID="ea8a27ed" PTTYPE="dos"
/dev/zd128: PTUUID="ea8a27ed" PTTYPE="dos"
/dev/sdd1: PARTUUID="b89843a3-7e14-4ce7-92e3-f2932ad5063e"
/dev/sdd9: PARTUUID="dcf71c8e-937e-4d17-80d7-0cc2fece435e"
 
Wir fangen mit der Platte "/dev/sdd" an da sie momentan nicht verwendet wird.

Code:
dd if=/dev/zero of=/dev/sdd bs=1M count=512
sgdisk --replicate=/dev/sdd /dev/sdc
sgdisk --randomize-guids /dev/sdd
grub-install /dev/sdd
zpool replace rpool /dev/sda /dev/sdd2

Dann warten bis zpool status sagt es ist alles ok.
Dann machen wir weiter.
 
Ging alles gut, bis auf den letzten Befehl:

Code:
# zpool status -v
  pool: rpool
 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: http://zfsonlinux.org/msg/ZFS-8000-4J
  scan: scrub repaired 0B in 13h29m with 0 errors on Tue Feb 13 06:39:12 2018
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       DEGRADED     0     0     0
          raidz2-0  DEGRADED     0     0     0
            sda     OFFLINE      0     0     0
            sda2    FAULTED      0     0     0  corrupted data
            sdb2    ONLINE       0     0     0
            sdc2    ONLINE       0     0     0

errors: No known data errors

# dd if=/dev/zero of=/dev/sdd bs=1M count=512
512+0 records in
512+0 records out
536870912 bytes (537 MB, 512 MiB) copied, 4.35228 s, 123 MB/s

# sgdisk --replicate=/dev/sdd /dev/sdc
The operation has completed successfully.

# sgdisk --randomize-guids /dev/sdd
The operation has completed successfully.

# grub-install /dev/sdd
Installing for i386-pc platform.
Installation finished. No error reported.

# zpool replace rpool /dev/sda /dev/sdd2
invalid vdev specification
use '-f' to override the following errors:
/dev/sdd2 is part of active pool 'rpool'

Nochmal mit
Code:
zpool replace -f rpool /dev/sda /dev/sdd2
?
 
Das Heist er erkennt die Daten wieder
mal schauen wie er es jetzt sieht.

Code:
zpool status
zdb
blkid
[Code]
 
Achso? Also die gewünschten Befehle geben, soweit ich es sehe, keine neuen Ausgaben:

Code:
# zpool status
  pool: rpool
 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: http://zfsonlinux.org/msg/ZFS-8000-4J
  scan: scrub repaired 0B in 13h29m with 0 errors on Tue Feb 13 06:39:12 2018
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       DEGRADED     0     0     0
          raidz2-0  DEGRADED     0     0     0
            sda     OFFLINE      0     0     0
            sda2    FAULTED      0     0     0  corrupted data
            sdb2    ONLINE       0     0     0
            sdc2    ONLINE       0     0     0

errors: No known data errors

# zdb | less
rpool:
    version: 5000
    name: 'rpool'
    state: 0
    txg: 432576
    pool_guid: 9973961061107860467
    errata: 0
    hostid: 656640
    hostname: 'proxmox-server'
    com.delphix:has_per_vdev_zaps
    vdev_children: 1
    vdev_tree:
        type: 'root'
        id: 0
        guid: 9973961061107860467
        children[0]:
            type: 'raidz'
            id: 0
            guid: 10834227445461462896
            nparity: 2
            metaslab_array: 128
            metaslab_shift: 36
            ashift: 12
            asize: 12002313371648
            is_log: 0
            create_txg: 4
            com.delphix:vdev_zap_top: 66
            children[0]:
                type: 'disk'
                id: 0
                guid: 3746872896469901947
                path: '/dev/sda2'
                devid: 'ata-WDC_WD30EFRX-68EUZN0_WD-WCC4ND0PVXEA-part2'
                phys_path: 'pci-0000:01:00.0-ata-1'
                whole_disk: 1
                DTL: 28
                create_txg: 4
                com.delphix:vdev_zap_leaf: 26
                offline: 1
            children[1]:
                type: 'disk'
                id: 1
                guid: 1020653270431596650
                path: '/dev/sda2'
                whole_disk: 0
                DTL: 79
                create_txg: 4
                com.delphix:vdev_zap_leaf: 68
            children[2]:
                type: 'disk'
                id: 2
                guid: 1321917959934574704
                path: '/dev/sdb2'
                whole_disk: 0
                DTL: 78
                create_txg: 4
                com.delphix:vdev_zap_leaf: 69
            children[3]:
                type: 'disk'
                id: 3
                guid: 14728949233396094063
                path: '/dev/sdc2'
                whole_disk: 0
                DTL: 31
                create_txg: 4
                com.delphix:vdev_zap_leaf: 70
    features_for_read:
        com.delphix:hole_birth
        com.delphix:embedded_data

# blkid
/dev/sda2: LABEL="rpool" UUID="9973961061107860467" UUID_SUB="3746872896469901947" TYPE="zfs_member" PARTLABEL="zfs" PARTUUID="efe9bd9d-1c2e-4049-9025-477e48b7706b"
/dev/sdb2: LABEL="rpool" UUID="9973961061107860467" UUID_SUB="1321917959934574704" TYPE="zfs_member" PARTLABEL="zfs" PARTUUID="7736d425-ea52-495e-b1f9-049675c77374"
/dev/sdc2: LABEL="rpool" UUID="9973961061107860467" UUID_SUB="14728949233396094063" TYPE="zfs_member" PARTLABEL="zfs" PARTUUID="13c960a5-b62a-412e-810c-d6075fffe28a"
/dev/zd0: UUID="e5da7fd2-666c-47fd-bb92-d6d240fd3765" TYPE="swap"
/dev/zd32p1: UUID="46e5a07d-b4b6-45f6-8017-063774842f42" TYPE="ext2" PARTUUID="ea8a27ed-01"
/dev/zd32p5: UUID="jSddmO-1Z7l-GGxb-aETI-3jPg-rTU1-UBhGtw" TYPE="LVM2_member" PARTUUID="ea8a27ed-05"
/dev/zd80: UUID="f5255bd3-60ef-4889-b6b4-91170b652755" TYPE="crypto_LUKS"
/dev/zd128p1: UUID="46e5a07d-b4b6-45f6-8017-063774842f42" TYPE="ext2" PARTUUID="ea8a27ed-01"
/dev/zd128p5: UUID="jSddmO-1Z7l-GGxb-aETI-3jPg-rTU1-UBhGtw" TYPE="LVM2_member" PARTUUID="ea8a27ed-05"
/dev/sdd2: LABEL="rpool" UUID="9973961061107860467" UUID_SUB="1020653270431596650" TYPE="zfs_member" PARTLABEL="zfs" PARTUUID="1b01b6a8-2b0a-4db3-8ce3-beb353cea948"
/dev/sda1: PARTUUID="74de145e-5369-4539-be44-9e8c33ae3b2b"
/dev/sda9: PARTUUID="892388f6-7102-4d88-8270-128d291a2d25"
/dev/sdb1: PARTUUID="2ddebef9-19fb-4c36-b18f-1ae8e4039685"
/dev/sdb9: PARTUUID="4e9be946-f966-4739-a284-0b3afef4bfe3"
/dev/sdc1: PARTUUID="f0fabc35-29e8-43fc-b446-af41f7f16186"
/dev/sdc9: PARTUUID="f6693a61-d245-4e42-86ff-68441f4796de"
/dev/zd32: PTUUID="ea8a27ed" PTTYPE="dos"
/dev/zd128: PTUUID="ea8a27ed" PTTYPE="dos"
/dev/sdd1: PARTUUID="b813bbbe-a615-45e6-a5b2-1b1c665aac9c"
/dev/sdd9: PARTUUID="19c35a84-d8c9-456c-a3a4-c2bc281bc1f7"
 
Probier sda mal wieder online zu nehmen

Code:
zpool online rpool /dev/disk/by-id/ata-WDC_WD30EFRX-68EUZN0_WD-WCC4ND0PVXEA-part2
 

About

The Proxmox community has been around for many years and offers help and support for Proxmox VE, Proxmox Backup Server, and Proxmox Mail Gateway.
We think our community is one of the best thanks to people like you!

Get your subscription!

The Proxmox team works very hard to make sure you are running the best software and getting stable updates and security enhancements, as well as quick enterprise support. Tens of thousands of happy customers have a Proxmox subscription. Get yours easily in our online shop.

Buy now!