ZFS: Warum dreimal ID und zweimal DevName?

Dec 19, 2012
481
14
83
Hallo.
Ich habe per WebGUI einen ZFS-Pool erzeugt. Wenn ich nun zpool status verwende, erhalte ich:

Code:
 zpool status
  pool: rpool
 state: ONLINE
  scan: resilvered 92K in 0h0m with 0 errors on Thu May 23 19:44:17 2019
config:

        NAME                        STATE     READ WRITE CKSUM
        rpool                       ONLINE       0     0     0
          raidz2-0                  ONLINE       0     0     0
            wwn-0x5000cca02c65dd28  ONLINE       0     0     0
            wwn-0x5000cca02c1b7a44  ONLINE       0     0     0
            wwn-0x5000cca02c1b1c10  ONLINE       0     0     0
            sdi                     ONLINE       0     0     0
        cache
          sde                       ONLINE       0     0     0

errors: No known data errors

Warum ist das uneinheitlich? Dreimal per ID und zweimal per dev-Name?
Wie kann ich das ändern, so dass ich nur per IDs arbeite?

Ich habe es schon so versucht:
Code:
zpool remove rpool sdi
cannot remove sdi: only inactive hot spares, cache, or log devices can be removed
und so:
Code:
zpool replace rpool sdi wwn-0x5000cca02c0c77d0
invalid vdev specification
use '-f' to override the following errors:
/dev/disk/by-id/wwn-0x5000cca02c0c77d0-part1 is part of active pool 'rpool'
(auch mit der -f Option)
Hat alles nicht geklappt.
Ideen?

Danke!
 
Ich habe es hiermit versucht (wie in dem Thread vorgeschlagen).
Code:
zpool detach rpool sdi
cannot detach sdi: only applicable to mirror and replacing vdevs
Es ist ein RAID-Z2

Ich habe aber gerade noch den anderen Weg ausprobiert und unter
ZPOOL_IMPORT_PATH="/dev/disk/by-id"
gesetzt ... mal sehen...

Kann ich auch so vorgehen: Die Platte sdi offline nehmen, rausziehen und in einem anderen Rechner z.B. eine neue UID erzeugen und dann wieder einsetzen?
 
Last edited:
Ich habe es hiermit versucht (wie in dem Thread vorgeschlagen).
Code:
zpool detach rpool sdi
cannot detach sdi: only applicable to mirror and replacing vdevs
Es ist ein RAID-Z2

Ich habe aber gerade noch den anderen Weg ausprobiert und unter
ZPOOL_IMPORT_PATH="/dev/disk/by-id"
gesetzt ... mal sehen...

Kann ich auch so vorgehen: Die Platte sdi offline nehmen, rausziehen und in einem anderen Rechner z.B. eine neue UID erzeugen und dann wieder einsetzen?

Das mit dem ZPOOL_IMPORT_PATH="/dev/disk/by-id" funktioniert auch nicht immer. Funktioniert hat
Code:
zpool export poolname
Wurde der Pool per Proxmox(GUI) erzeugt, folgt der import automatisch und die Disks werden dann mit wwn angezeig (der Wert von ZPOOL_IMPORT_PATH ist dabei übrigens nicht von Bedeutung).

Leider ist der zfs Mechanismus hier nicht so transparent. Wie auch immer: welche Bezeichnung in den Abfragen von der Command Line ausgewiesen werden hat auf die Funktion keinen Einfluss, daher scheinen mir auch Versuche, die Platte auszubauen oder auch nur per Software aus dem Pool zu nehmen nicht wert.
 
Ich habe mittlerweile dieses Mini-HowTo gefunden:

Code:
Strategy to replace failed disk in RAIDZ2 array
The "correct" order is:
    zpool offline <poolname> <diskname>
    Physically remove the drive from the system
    Physically add the new drive to the system
    Partition the drive as needed; label the partitions as needed
    zpool replace <poolname> <olddiskname> <newdiskname>

Es bleibt die Frage, wie die Partitionierung und das Label "as needed" auszusehen hat?
 

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!