THERE WAS A BUG IN THE SERVER THAT MADE ME LOST THIS POST. THIS IS THE RETRIEVED VERSION THAT I BACK UP.

It’s obvious that I speed write and take everything from guide. As I said before, writing this in Bahasa Indonesia kind of hard for me. So, I write this as I do in parallel.

Setup Filesystem

Disable ZFS file-level prefetch as in the guide:

cat >> /etc/modprobe.d/zfs.conf << .
options zfs zfs_prefetch_disable=1
.

That would be last on the next reboot, but for now disable:

echo 1 | sudo tee /sys/module/zfs/parameters/zfs_prefetch_disable

Create the dataset and the optimizations:

zfs create -o mountpoint=/var/lib/mysql rpool/MARIADB
zfs set primarycache=metadata rpool/MARIADB
zfs set recordsize=16k rpool/MARIADB

It is optimized to use cache for metadata only if we are going to use INNODB. Its chunk is 16k, so we set it also in ZFS. In the guide we are told that MariaDB log is a 128k chunk — default chunk in ZFS.

Remember that ZFSOnLinux Bug early on? Yeah, we should regenerate Ramdisk everytime we’ve done something to /etc/zfs/zpool.cache. To be honest, I don’t know if any of the operation we did earlier warrant such action. But, just do that for precaution.

update-initramfs -d -k `uname -r`
update-initramfs -c -k `uname -r`

And now, we go with installing MariaDB server.

Installing Database Server

According to MariaDB Repository configuration page, let’s set MariaDB:

cat >> /etc/apt/sources.list.d/mariadb.list << .
# MariaDB 10.1 repository list - created 2016-05-03 08:05 UTC
# http://mariadb.org/mariadb/repositories/
deb [arch=amd64,i386] http://kartolo.sby.datautama.net.id/mariadb/repo/10.1/debian jessie main
deb-src http://kartolo.sby.datautama.net.id/mariadb/repo/10.1/debian jessie main
.

Import its key and update our list:

sudo apt-key adv --recv-keys --keyserver keyserver.ubuntu.com 0xcbcb082a1bb943db
sudo apt-get update

Install MariaDB server:

sudo apt-get install mariadb-server

Disable MariaDB server double buffer by add a line (mine, vanilla at line 142) with:

skip-innodb_doublewrite

And restart MariaDB server:

sudo systemctl restart mysql

From this onward, we are ready to install WordPress, NGINX and such.

Bacaan Lebih Lanjut