Remove ZIL/L2ARC device

joulester

Member
May 1, 2017
26
3
23
36
Hi! I have an ssd that i want to remove from my zfs pool. It is configured as ZIL/L2ARC device.
How do I do? Is it possible?
 
Yes, very simple with just a remove command:

Code:
root@proxmox /tmp > ls -lh zil l2arc raidz1_disk*
-rw-r--r-- 1 root root 256M Okt 23 08:55 l2arc
-rw-r--r-- 1 root root 256M Okt 23 08:55 raidz1_disk1
-rw-r--r-- 1 root root 256M Okt 23 08:54 raidz1_disk2
-rw-r--r-- 1 root root 256M Okt 23 08:55 raidz1_disk3
-rw-r--r-- 1 root root 256M Okt 23 08:55 zil

root@proxmox /tmp > zpool create test raidz1 /tmp/raidz1_disk* log /tmp/zil cache /tmp/l2arc

root@proxmox /tmp > zpool status -v test
  pool: test
 state: ONLINE
  scan: none requested
config:

    NAME                   STATE     READ WRITE CKSUM
    test                   ONLINE       0     0     0
      raidz1-0             ONLINE       0     0     0
        /tmp/raidz1_disk1  ONLINE       0     0     0
        /tmp/raidz1_disk2  ONLINE       0     0     0
        /tmp/raidz1_disk3  ONLINE       0     0     0
    logs
      /tmp/zil             ONLINE       0     0     0
    cache
      /tmp/l2arc           ONLINE       0     0     0

errors: No known data errors

root@proxmox /tmp > zpool remove test /tmp/zil
root@proxmox /tmp > zpool remove test /tmp/l2arc

root@proxmox /tmp > zpool status -v test
  pool: test
 state: ONLINE
  scan: none requested
config:

    NAME                   STATE     READ WRITE CKSUM
    test                   ONLINE       0     0     0
      raidz1-0             ONLINE       0     0     0
        /tmp/raidz1_disk1  ONLINE       0     0     0
        /tmp/raidz1_disk2  ONLINE       0     0     0
        /tmp/raidz1_disk3  ONLINE       0     0     0

errors: No known data errors
 
I did remove the l2arc but I cant remove the zil. Why cant I do that?

Code:
root@r710nr2:~# zpool status
  pool: rpool
 state: ONLINE
status: Some supported features are not enabled on the pool. The pool can
        still be used, but some features are unavailable.
action: Enable all features using 'zpool upgrade'. Once this is done,
        the pool may no longer be accessible by software that does not support
        the features. See zpool-features(5) for details.
  scan: scrub repaired 0B in 21h18m with 0 errors on Sun Dec  9 21:42:54 2018
config:

        NAME        STATE     READ WRITE CKSUM
        rpool       ONLINE       0     0     0
          raidz1-0  ONLINE       0     0     0
            sdb2    ONLINE       0     0     0
            sdc2    ONLINE       0     0     0
            sdd2    ONLINE       0     0     0
            sde2    ONLINE       0     0     0
            sdf2    ONLINE       0     0     0
          sda1      ONLINE       0     0     0

errors: No known data errors
root@r710nr2:~# zpool remove rpool sda1
cannot remove sda1: only inactive hot spares, cache, or log devices can be removed
 
For joulester or anyone else who sees this in the future, it looks like sda1 isn't actually a zil given that it's not under a "log" line like in LnxBil's example. It seems to actually be part of the pool as a data storage drive instead, and therefore can't be removed.
 
  • Like
Reactions: bencarr

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!