Adding ZIL Device

matthew

Renowned Member
Jul 28, 2011
210
5
83
I have a simple install of Proxmox on four SATA drives in a raid z2 array. As I understand adding an SSD based ZIL device will greatly improve write speeds?

How do I add the device?

Is this correct assuming default ZFS setup was used when installed?
zpool add rpool log /dev/sde

If I later want to remove it how do I remove it?

What happens if the ZIL device fails and how do I recover from that?
 
Looking here:

https://pve.proxmox.com/wiki/ZFS_on_Linux

Assuming the ssd drive is sdc.

# parted /dev/sdc
(parted) rm 1 # removed all partitions from ssd one by one if any
(parted) mktable gpt
(parted) mkpart logical
File system type? [ext2]?
Start? 0%
End? 16G
(parted) quit
# ls -la /dev/disk/by-uuid/
# zpool add -f rpool log [uuid of sdc1]

Does this seem right?

Then to remove it:

zpool offline rpool [uuid]
zpool remove rpool [uuid]
 
It will improve only write speeds for synchronous writes.

Seems correct, except for the filesystem part. I usually use cfdisk or fdisk and just create a partition type FreeBSD ZFS.
root@p25:~# fdisk -l /dev/sdc
Disk /dev/sdc: 74.5 GiB, 80026361856 bytes, 156301488 sectors
Units: sectors of 1 * 512 = 512 bytes
Sector size (logical/physical): 512 bytes / 4096 bytes
I/O size (minimum/optimal): 4096 bytes / 4096 bytes
Disklabel type: gpt
Disk identifier: 475CBB72-E0E8-4E52-8BBC-3B0541531694

Device Start End Sectors Size Type
/dev/sdc1 2048 25167871 25165824 12G FreeBSD ZFS
/dev/sdc2 25167872 46139391 20971520 10G FreeBSD ZFS
/dev/sdc3 46139392 62916607 16777216 8G Linux RAID

I also use device names not UUIDs, but your solution might be better.

If external ZIL (or SLOG) dies while the rest of the system is still working fine, there will be no problems except for slowdown.
 

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!