[TUTORIAL] Troubleshooting faulty zfs.config

inDane

Active Member
Jan 11, 2019
34
1
28
34
I've made a mistake today.

I was trying to modify l2arc_write_max and l2arc_write_boost.

What i did was: CAREFUL THIS IS WRONG
Code:
options zfs l2arc_write_max 67108864
options zfs l2arc_write_boost 134217728

it should be
Code:
options zfs l2arc_write_max=67108864
options zfs l2arc_write_boost=134217728


Reboot resulted in some error that said zfs module couldnt be loaded and there are invalid parameters...
My root is ony the ZFS.

Here is what I did to recover my system:
Code:
vi /etc/modprobe.d/zfs.conf
Press "i" to change to insert mode, edit the faulty lines and save the file via (ESC) -> :wq

Code:
mkdir /mnttmp
modprobe zfs
zpool import rpool
zfs set mountpoint=/mnttmp rpool/ROOT/pve-1
zpool export rpool 
# I had to do this several times; once for every subvolume. I dont know why. The message said it couldt be unmounted. Ignore it.
zpool import rpool
vi /mnttmp/etc/modprobe.d/zfs.conf
# Edit it like above.
zfs set mountpoint=/ rpool/ROOT/pve-1
zfs export rpool

Then I rebooted the machine and it worked again.

I hope this helps. I dont want to reproduce this right now to double check, but I think this was what I did.
 

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!