ZFS

From HackerNet
Revision as of 22:56, 2 January 2016 by Helikopter (talk | contribs)
Jump to: navigation, search

ZFS är filsystem kombinerat med volymhanterare. Det körs främst på BSD men finns även till Linux.

Installation

Ubuntu

sudo apt-add-repository -y ppa:zfs-native/stable
sudo apt-get update && sudo apt-get -y install ubuntu-zfs

Fedora

sudo dnf install --nogpgcheck http://archive.zfsonlinux.org/fedora/zfs-release$(rpm -E %dist).noarch.rpm
sudo dnf install kernel-devel zfs 
sudo /sbin/modprobe zfs

Konfiguration

Pool

zpool create POOL raidz1 \
        /dev/disk/by-id/ata-WDC_WD.. \
        /dev/disk/by-id/ata-WDC_WD.. \
        /dev/disk/by-id/ata-WDC_WD.. \
        -o ashift=12 -o failmode=continue

Lägg till -f om det inte finns någon EFI label.

 zfs set atime=off POOL

Show

zpool list
zpool status
zfs get all
zpool iostat -v POOL

Mount point

zfs set mountpoint=/path/pool POOL
chown -R user:user /path/pool

Dataset

zfs create POOL/test

Compression

zfs set compression=on POOL/test

Dedup

zfs set dedup=on POOL/test

SSD

Read och write

zpool add -f POOL cache sdf
zpool add -f POOL log sdg

Scrub

zpool scrub

IO intensive