Article 6GHSJ simple non-root openzfs

simple non-root openzfs

by
lazardo
from LinuxQuestions.org on (#6GHSJ)
Long time mdraid experience and the recent mixed licensing thread resulted in a desire to experiment with zfs without too much initial investment. First build+install openzfs from slackbuilds.org, then:

Create '/etc/modprobe.d/zfs.conf' with Code:softdep zfs pre: spl
options zfs zfs_arc_max=4294967296This will get modules loaded early enough to use traditional mounting without requiring an initrd, and limit main memory consumption to 4GB (or some other value) Code:GB=4; echo $(( $GB * 1024 * 1024 * 1024 ))
4294967296During boot, the modules are loaded after ACPI and before usb discovery.

Jumpstart without reboot: Code:sudo /etc/rc.d/rc.zfs startCreate a simple mirror pool. Two whole disks or two partitions or even files can be used for experiments, I had two 400M unused partitions on one nvme.Code:sudo zpool create -m legacy -o ashift=12 zfs_test mirror /dev/nvme0n1p4 /dev/nvme0n1p6
zpool status
zpool listIf the disks/partitions had mdraid or a file system use 'wipefs' before 'zpool create'.

Create a mount point and /etc/fstab entry: Code:zfs_test /mnt/test zfs defaults,lazytime,noatime,_netdev 0 0Mount it: Code:sudo mount -avCreate a /etc/rc.d/rc.local entry for next boot: Code:zpool import zfs_test; zpool list -H; mount -v /mnt/testYou now have a fully functional zfs mirror for the current running kernel. For any kernel change (rebuild or booting to a different kernel) you must rebuild the SBo package.

Cheers,
External Content
Source RSS or Atom Feed
Feed Location https://feeds.feedburner.com/linuxquestions/latest
Feed Title LinuxQuestions.org
Feed Link https://www.linuxquestions.org/questions/
Reply 0 comments