Permalink
Browse files

Enable lz4 compression on ZFS root

  • Loading branch information...
1 parent f4533dc commit 8a5b8ec636dcf49c149dbfeca966a8d423972b03 @kmoore134 kmoore134 committed Mar 19, 2014
@@ -280,7 +280,7 @@ bool Installer::autoGenPartitionLayout(QString target, bool isDisk)
if ( Arch == "amd64" ) {
// Add the main zfs pool with standard partitions
fsType= "ZFS";
- fileSystem << targetDisk << targetSlice << "/,/tmp(compress=lz4),/usr(canmount=off),/usr/home(compress=lz4),/usr/jails(compress=lz4),/usr/obj(compress=lz4),/usr/pbi(compress=lz4),/usr/ports(compress=lz4),/usr/ports/distfiles(compress=off),/usr/src(compress=lz4),/var(canmount=off),/var/audit(compress=lz4),/var/log(compress=lz4),/var/tmp(compress=lz4)" << fsType << tmp.setNum(totalSize) << "" << "";
+ fileSystem << targetDisk << targetSlice << "/(compress=lz4),/tmp(compress=lz4),/usr(canmount=off),/usr/home(compress=lz4),/usr/jails(compress=lz4),/usr/obj(compress=lz4),/usr/pbi(compress=lz4),/usr/ports(compress=lz4),/usr/ports/distfiles(compress=off),/usr/src(compress=lz4),/var(canmount=off),/var/audit(compress=lz4),/var/log(compress=lz4),/var/tmp(compress=lz4)" << fsType << tmp.setNum(totalSize) << "" << "";
sysFinalDiskLayout << fileSystem;
fileSystem.clear();
@@ -420,7 +420,9 @@ void wizardDisk::generateDiskLayout()
QString rootOpts="";
if ( checkSSD->isChecked() )
- rootOpts="(atime=off)";
+ rootOpts="(compress=lz4|atime=off)";
+ else
+ rootOpts="(compress=lz4)";
// This lets the user do nifty stuff like a mirror/raid post-install with a single zpool command
fileSystem << targetDisk << targetSlice << "/" + rootOpts + ",/tmp(compress=lz4),/usr(canmount=off),/usr/home(compress=lz4),/usr/jails(compress=lz4),/usr/obj(compress=lz4),/usr/pbi(compress=lz4),/usr/ports(compress=lz4),/usr/ports/distfiles(compress=lz4),/usr/src(compress=lz4),/var(canmount=off),/var/audit(compress=lz4),/var/log(compress=lz4),/var/tmp(compress=lz4)" << fsType << tmp.setNum(totalSize) << "" << tmpPass;
@@ -15,7 +15,7 @@ TITLE="PC-BSD Install Dialog"
CFGFILE="/tmp/sys-install.cfg"
# Default ZFS layout
-ZFSLAYOUT="/,/root(compress=lz4),/tmp(compress=lz4),/usr(canmount=off),/usr/home(compress=lz4),/usr/jails(compress=lz4),/usr/obj(compress=lz4),/usr/pbi(compress=lz4),/usr/ports(compress=lz4),/usr/ports/distfiles(compress=off),/usr/src(compress=lz4),/var(canmount=off),/var/audit(compress=lz4),/var/log(compress=lz4),/var/tmp(compress=lz4)"
+ZFSLAYOUT="/(compress=lz4),/root(compress=lz4),/tmp(compress=lz4),/usr(canmount=off),/usr/home(compress=lz4),/usr/jails(compress=lz4),/usr/obj(compress=lz4),/usr/pbi(compress=lz4),/usr/ports(compress=lz4),/usr/ports/distfiles(compress=off),/usr/src(compress=lz4),/var(canmount=off),/var/audit(compress=lz4),/var/log(compress=lz4),/var/tmp(compress=lz4)"
# Ugly master list of settable ZFS properties
ZPROPS="aclinherit(discard|noallow|restricted|passthrough|passthrough-x),aclmode(discard|groupmask|passthrough|restricted),atime(on|off),canmount(on|off|noauto),checksum(on|off|fletcher2|fletcher4|sha256),compress(on|off|lzjb|gzip|zle|lz4),copies(1|2|3),dedup(on|off|verify|sha256),exec(on|off),primarycache(all|none|metadata),readonly(on|off),secondarycache(all|none|metadata),setuid(on|off),sharenfs(on|off),logbias(latency|throughput),snapdir(hidden|visible),sync(standard|always|disabled),jailed(off|on)"

0 comments on commit 8a5b8ec

Please sign in to comment.