ZFS secondarycache option beeing "ignored"

efeu

Renowned Member
Nov 6, 2015
91
8
73
Hi,
I added a cache drive to my pool which has secondarycache=none attribute.

Code:
  pool: spinning
 state: ONLINE
  scan: scrub repaired 0B in 04:40:29 with 0 errors on Sun Oct  9 05:04:31 2022
config:

    NAME                                             STATE     READ WRITE CKSUM
    spinning                                         ONLINE       0     0     0
      raidz1-0                                       ONLINE       0     0     0
        scsi-35000c5008407606f                       ONLINE       0     0     0
        scsi-35000c50083ef05f7                       ONLINE       0     0     0
        scsi-35000c5008407449f                       ONLINE       0     0     0
        scsi-35000cca05821a80c                       ONLINE       0     0     0
    cache
      ata-Samsung_SSD_850_PRO_512GB_S250NXAG930772J  ONLINE       0     0     0
    spares
      sdd                                            AVAIL   

errors: No known data errors

Code:
zfs get -r secondarycache spinning
NAME                                                           PROPERTY        VALUE           SOURCE
spinning                                                       secondarycache  none            local
spinning/backup                                                secondarycache  none            inherited from spinning
spinning/backup/vm-100-disk-0                                  secondarycache  none            inherited from spinning
spinning/backup/vm-100-disk-0@rep_kvm-win_2021-07-15_13:19:14  secondarycache  none            inherited from spinning
spinning/backup/vm-100-disk-1                                  secondarycache  none            inherited from spinning
spinning/backup/vm-100-disk-1@rep_kvm-win_2021-07-15_13:19:14  secondarycache  none            inherited from spinning
spinning/opnsense                                              secondarycache  none            inherited from spinning
spinning/subvol-117-disk-0                                     secondarycache  none            inherited from spinning
spinning/vm-100-disk-0                                         secondarycache  none            inherited from spinning
spinning/vm-100-disk-0@bfnvme                                  secondarycache  none            inherited from spinning
spinning/vm-100-disk-0@next_try                                secondarycache  none            inherited from spinning
spinning/vm-1000-disk-0                                        secondarycache  none            inherited from spinning
spinning/vm-104-disk-0-old                                     secondarycache  none            inherited from spinning
spinning/vm-104-disk-1                                         secondarycache  none            inherited from spinning
spinning/vm-206-disk-0                                         secondarycache  none            inherited from spinning
spinning/vm-207-disk-0                                         secondarycache  none            inherited from spinning

Code:
ZFS Subsystem Report                            Tue Oct 18 10:58:14 2022
Linux 5.15.39-4-pve                                           2.1.5-pve1
Machine: proxmox (x86_64)                                     2.1.5-pve1

L2ARC status:                                                    HEALTHY
        Low memory aborts:                                             0
        Free on write:                                                 0
        R/W clashes:                                                   0
        Bad checksums:                                                 0
        I/O errors:                                                    0

L2ARC size (adaptive):                                           8.6 GiB
        Compressed:                                    87.6 %    7.6 GiB
        Header size:                                    0.0 %    0 Bytes
        MFU allocated size:                            47.6 %    3.6 GiB
        MRU allocated size:                            53.0 %    4.0 GiB
        Prefetch allocated size:                      < 0.1 %    1.2 MiB
        Data (buffer content) allocated size:          97.8 %    7.4 GiB
        Metadata (buffer content) allocated size:       2.8 %  215.4 MiB

L2ARC breakdown:                                                      14
        Hit ratio:                                      0.0 %          0
        Miss ratio:                                   100.0 %         14
        Feeds:                                                      1.2k

L2ARC writes:
        Writes sent:                                    100 %        534

L2ARC evicts:
        Lock retries:                                                  0
        Upon reading:                                                  0

But as you see, "secondarycache=none" is beeing ignored and L2ARC is beeing written/filled.

And no there does not exist any other pool with an l2arc.
 
I can confirm this behavior on:
pve-manager/7.4-3/9002ab8a (running kernel: 5.15.107-2-pve)
zfs-2.1.11-pve1
zfs-kmod-2.1.11-pve1

secondarycache "none" or "metadata" is ignored
 

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!