[SOLVED] ZFS Cachedevice nach reboot vertauscht

fireon

Distinguished Member
Oct 25, 2010
4,135
390
153
42
Austria/Graz
iteas.at
Hallo Leute,

hab hier ne ganz seltsame Geschichte. Proxmox 6.2 mit ZFS. Ein Pool mit HDD's und einer SSD' mit Partitionen als Cache und Log. Nach nem Reboot sah das ganze im Zpool so aus:
Code:
NAME                                                   STATE     READ WRITE CKSUM
        v-machines                                             ONLINE       0     0     0
          mirror-0                                             ONLINE       0     0     0
            ata-WDC_WD2001FFSX-68JNUN0_WD-WMC5C0D0AZMA         ONLINE       0     0     0
            ata-WDC_WD2001FFSX-68JNUN0_WD-WMC5C0D0KRWP         ONLINE       0     0     0
          mirror-1                                             ONLINE       0     0     0
            ata-WDC_WD2001FFSX-68JNUN0_WD-WMC5C0D688XW         ONLINE       0     0     0
            ata-WDC_WD2001FFSX-68JNUN0_WD-WMC5C0D63WM0         ONLINE       0     0     0
          mirror-2                                             ONLINE       0     0     0
            ata-WDC_WD2001FFSX-68JNUN0_WD-WMC5C0D6KCJD         ONLINE       0     0     0
            ata-WDC_WD2001FFSX-68JNUN0_WD-WMC5C0D8180T         ONLINE       0     0     0
          mirror-3                                             ONLINE       0     0     0
            ata-WDC_WD2001FFSX-68JNUN0_WD-WMC5C0D912K9         ONLINE       0     0     0
            ata-WDC_WD2001FFSX-68JNUN0_WD-WMC5C0D5PTE0         ONLINE       0     0     0
          mirror-5                                             ONLINE       0     0     0
            ata-WDC_WD2002FFSX-68PF8N0_WD-WMC6N0L2RXKP         ONLINE       0     0     0
            ata-WDC_WD2002FFSX-68PF8N0_WD-WMC6N0L59MSJ         ONLINE       0     0     0
        logs
          ata-SAMSUNG_MZ7KM240HAGR-00005_S2HRNXAH300789-part1  ONLINE       0     0     0
        cache
          sdq3                                                 UNAVAIL      0     0     0

Nur wie kommt das System überhaupt auf sdq3. Hatte ja alles mit den ID's konfiguriert. Und sdq ist ne HDD. Na jedefalls ist das Cachedevice da. Ist ja auch das Log da. Dies ist die SSD:
Code:
partx -s /dev/disk/by-id/ata-SAMSUNG_MZ7KM240HAGR-00005_S2HRNXAH300789             
NR    START       END   SECTORS   SIZE NAME UUID
 1     2048  20973567  20971520    10G      48c4e73d-e67e-4d9f-8b5f-ee6a6102d812
 2 20973568  54527999  33554432    16G      bedad66e-9d67-434e-b2c1-edcb3d62c8d6
 3 54528000 468862094 414334095 197.6G      7263184a-b98d-4654-8328-fe9dca5cca56
Wenn ich nun das Device wieder einbinden möchte:
Code:
zpool replace v-machines sdq3 ata-SAMSUNG_MZ7KM240HAGR-00005_S2HRNXAH300789-part3 -f
cannot replace sdq3 with ata-SAMSUNG_MZ7KM240HAGR-00005_S2HRNXAH300789-part3: device is in use as a cache
Lässt mich das System nicht. Wie bereinige ich so eine Situation? Wie kommt sowas überhaupt zu Stande?

Danke und glg
 
Hmm, wieso ist eine spannende Frage. Das cachefile Property für den pool ist gesetzt?

Du kannst versuchen das cache Device zu detachen und dann neu hinzuzufügen.
 
Spannend deswegen, weil es nach nem Reboot einfach weg war. Sowas sollte nun doch nicht passieren, so ganz ohne Grund. Ich versuch das was du mir vorgeschlagen hast.
 
Das cachefile Property für den pool ist gesetzt?
Nein.
Code:
zpool get cachefile v-machines                                                 
NAME        PROPERTY   VALUE      SOURCE
v-machines cachefile - default
Funktioniert hat nun das:
Code:
zpool remove v-machines sdq3
zpool add v-machines cache ata-SAMSUNG_MZ7KM240HAGR-00005_S2HRNXAH300789-part3
 

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!