Configure zfs to start before proxmox or openstack

Configure zfs to start before proxmox or openstack

If you followed my previous articles: Native ZFS for Linux on Proxmox or Native ZFS for Linux on Openstack and encountered some problem that daemons seems fail to start on server boot up, it could be that the zfs mounting process starting to late. In this article i will explain you how to Configure zfs to start before proxmox or openstack.

This effect causing services accessing the zfs mounts won’t start properly.

Your zfs init script have to be fixed to run really before all other init scripts getting executed.

So this is what we gonna do now.

Prerequisites:

  • /etc/init.d/zfs lsb script
  • text editor to modify lsb script
  • command insserv

 

Modify your /etc/init.d/zfs with your favored text editor that it look like this:

### BEGIN INIT INFO
# Provides: zfs
# Required-Start: mountkernfs $local_fs
# Required-Stop: $local_fs
# X-Start-Before: console-setup networking
# Default-Start:     S
# Default-Stop:      0 6
# Should-Stop:
# Short-Description: Mount/umount the zfs filesystems
# Description: ZFS is an advanced filesystem designed to simplify managing
#              and protecting your data.  This service mounts the ZFS
#              filesystems and starts all related zfs services.
### END INIT INFO

Some notes: I’ve added the required-start mountkernfs $local_fs changed the required-stop $local_host the x-start-before: console-setup networking
Most important change is the default-start to value: S and default-stop to value: 0 6
so zfs init will execute in a very early stage of booting before all the network and console stuff.

After you have fixed the lines you need to reinit the lsb script by running:

insserv zfs

And that should do it.

Finally restart your system to see if the script is starting correct.

Jules

Jules is the owner and author of ISPIRE.ME. He's a Linux System Engineer, Tech fanatic and an Open Source fan.

Recent Posts

HTTP/2 SSL Offloading with Hitch and Varnish

HTTP/2 SSL Offloading with Hitch and Varnish Since Chrome browsers showing you insecure warning on…

7 years ago

File changed as we read it GlusterFS issue

File changed as we read it GlusterFS issue Recently i had trouble running Backups of…

7 years ago

Running multiple instances of varnish using systemd

Running multiple instances of varnish using systemd If you have not yet found a complete…

7 years ago

HTTP/2 SSL Offloading with Haproxy and Nginx

HTTP/2 SSL Offloading with Haproxy and Nginx After HTTP/2 becoming more an more prominent regarding SSL…

7 years ago

Get Real IP with Haproxy Tomcat Jira Confluence using x-forwarded-for

Get Real IP with Haproxy Tomcat Jira Confluence using x-forwarded-for Everyone knows the Problem. Get…

7 years ago

Review TDS2 How to backtest using tick data with Metatrader 4

Review TDS2 How to backtest using tick data with Metatrader 4 in this Review TDS2…

8 years ago

This website uses cookies.