Difference between revisions of "ZFS"
From HackerNet
Helikopter (talk | contribs) (Created page with "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/st...") |
Helikopter (talk | contribs) |
||
Line 1: | Line 1: | ||
− | ZFS är filsystem kombinerat med volymhanterare. Det körs främst på BSD men finns även till Linux. | + | ZFS är filsystem kombinerat med volymhanterare. Det körs främst på BSD men finns även till [http://zfsonlinux.org/ Linux]. |
=Installation= | =Installation= | ||
Line 5: | Line 5: | ||
sudo apt-add-repository -y ppa:zfs-native/stable | sudo apt-add-repository -y ppa:zfs-native/stable | ||
sudo apt-get update && sudo apt-get -y install ubuntu-zfs | 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= | =Konfiguration= | ||
− | + | ===Pool=== | |
zpool create POOL raidz1 \ | 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 \ | + | /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 | -o ashift=12 -o failmode=continue | ||
+ | Lägg till -f om det inte finns någon EFI label. | ||
+ | |||
zfs set atime=off POOL | zfs set atime=off POOL | ||
+ | |||
Show | Show | ||
zpool list | zpool list | ||
zpool status | 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 | zfs create POOL/test | ||
Compression | Compression | ||
Line 25: | Line 38: | ||
zfs set dedup=on POOL/test | 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 | zpool scrub | ||
''IO intensive'' | ''IO intensive'' | ||
[[Category:Guider]] | [[Category:Guider]] |
Revision as of 22:56, 2 January 2016
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