Note
The Funtoo Linux project
has transitioned to "Hobby Mode"
and this wiki is now read-only.
Export translations
Jump to navigation
Jump to search
Settings
Group
32 bit chroot environment for Wine
32-bit Chroot
Applications/Editors
Btrfs
Emerge
Funtoo Linux First Steps
Funtoo Linux Kernels
Funtoo Linux Localization
Funtoo Profiles
Funtoo:Metro
Gentoo Linux
Gentoo Minimal Installation CD
GNOME First Steps
Install
Install/Bootloader
Install/Chroot
Install/Configuration Files
Install/Creating Filesystems
Install/Done
Install/Download and Extract Stage3
Install/Download LiveCD
Install/Download Portage Tree
Install/Finishing
Install/Get Acquainted
Install/GPT Partitioning
Install/Introducing Portage
Install/Introduction
Install/Kernel
Install/MBR Partitioning
Install/Mounting Filesystems
Install/Network
Install/Prepare Disk
Install/Profiles
Install/Setting the Date
InstallPrintable
LXD
Make.conf
MATE Desktop Environment
Package:Xfce4-meta
Support Matrix
Template:VMwareBlurb
Upgrade Instructions/1.2-release
Upgrade Instructions/1.3-release
Wolf Pack Philosophy
X Window System
ZFS
Language
aa - Afar
ab - Abkhazian
abs - Ambonese Malay
ace - Achinese
ady - Adyghe
ady-cyrl - Adyghe (Cyrillic script)
aeb - Tunisian Arabic
aeb-arab - Tunisian Arabic (Arabic script)
aeb-latn - Tunisian Arabic (Latin script)
af - Afrikaans
ak - Akan
aln - Gheg Albanian
alt - Southern Altai
am - Amharic
ami - Amis
an - Aragonese
ang - Old English
anp - Angika
ar - Arabic
arc - Aramaic
arn - Mapuche
arq - Algerian Arabic
ary - Moroccan Arabic
arz - Egyptian Arabic
as - Assamese
ase - American Sign Language
ast - Asturian
atj - Atikamekw
av - Avaric
avk - Kotava
awa - Awadhi
ay - Aymara
az - Azerbaijani
azb - South Azerbaijani
ba - Bashkir
ban - Balinese
ban-bali - ᬩᬲᬩᬮᬶ
bar - Bavarian
bbc - Batak Toba
bbc-latn - Batak Toba (Latin script)
bcc - Southern Balochi
bcl - Central Bikol
be - Belarusian
be-tarask - Belarusian (Taraškievica orthography)
bg - Bulgarian
bgn - Western Balochi
bh - Bhojpuri
bho - Bhojpuri
bi - Bislama
bjn - Banjar
bm - Bambara
bn - Bangla
bo - Tibetan
bpy - Bishnupriya
bqi - Bakhtiari
br - Breton
brh - Brahui
bs - Bosnian
btm - Batak Mandailing
bto - Iriga Bicolano
bug - Buginese
bxr - Russia Buriat
ca - Catalan
cbk-zam - Chavacano
cdo - Min Dong Chinese
ce - Chechen
ceb - Cebuano
ch - Chamorro
cho - Choctaw
chr - Cherokee
chy - Cheyenne
ckb - Central Kurdish
co - Corsican
cps - Capiznon
cr - Cree
crh - Crimean Tatar
crh-cyrl - Crimean Tatar (Cyrillic script)
crh-latn - Crimean Tatar (Latin script)
cs - Czech
csb - Kashubian
cu - Church Slavic
cv - Chuvash
cy - Welsh
da - Danish
de - German
de-at - Austrian German
de-ch - Swiss High German
de-formal - German (formal address)
din - Dinka
diq - Zazaki
dsb - Lower Sorbian
dtp - Central Dusun
dty - Doteli
dv - Divehi
dz - Dzongkha
ee - Ewe
egl - Emilian
el - Greek
eml - Emiliano-Romagnolo
en - English
en-ca - Canadian English
en-gb - British English
eo - Esperanto
es - Spanish
es-419 - Latin American Spanish
es-formal - Spanish (formal address)
et - Estonian
eu - Basque
ext - Extremaduran
fa - Persian
ff - Fulah
fi - Finnish
fit - Tornedalen Finnish
fj - Fijian
fo - Faroese
fr - French
frc - Cajun French
frp - Arpitan
frr - Northern Frisian
fur - Friulian
fy - Western Frisian
ga - Irish
gag - Gagauz
gan - Gan Chinese
gan-hans - Gan (Simplified)
gan-hant - Gan (Traditional)
gcr - Guianan Creole
gd - Scottish Gaelic
gl - Galician
glk - Gilaki
gn - Guarani
gom - Goan Konkani
gom-deva - Goan Konkani (Devanagari script)
gom-latn - Goan Konkani (Latin script)
gor - Gorontalo
got - Gothic
grc - Ancient Greek
gsw - Swiss German
gu - Gujarati
guc - Wayuu
gv - Manx
ha - Hausa
hak - Hakka Chinese
haw - Hawaiian
he - Hebrew
hi - Hindi
hif - Fiji Hindi
hif-latn - Fiji Hindi (Latin script)
hil - Hiligaynon
ho - Hiri Motu
hr - Croatian
hrx - Hunsrik
hsb - Upper Sorbian
ht - Haitian Creole
hu - Hungarian
hu-formal - Hungarian (formal address)
hy - Armenian
hyw - Western Armenian
hz - Herero
ia - Interlingua
id - Indonesian
ie - Interlingue
ig - Igbo
ii - Sichuan Yi
ik - Inupiaq
ike-cans - Eastern Canadian (Aboriginal syllabics)
ike-latn - Eastern Canadian (Latin script)
ilo - Iloko
inh - Ingush
io - Ido
is - Icelandic
it - Italian
iu - Inuktitut
ja - Japanese
jam - Jamaican Creole English
jbo - Lojban
jut - Jutish
jv - Javanese
ka - Georgian
kaa - Kara-Kalpak
kab - Kabyle
kbd - Kabardian
kbd-cyrl - Kabardian (Cyrillic script)
kbp - Kabiye
kcg - Tyap
kg - Kongo
khw - Khowar
ki - Kikuyu
kiu - Kirmanjki
kj - Kuanyama
kjp - Eastern Pwo
kk - Kazakh
kk-arab - Kazakh (Arabic script)
kk-cn - Kazakh (China)
kk-cyrl - Kazakh (Cyrillic script)
kk-kz - Kazakh (Kazakhstan)
kk-latn - Kazakh (Latin script)
kk-tr - Kazakh (Turkey)
kl - Kalaallisut
km - Khmer
kn - Kannada
ko - Korean
ko-kp - Korean (North Korea)
koi - Komi-Permyak
kr - Kanuri
krc - Karachay-Balkar
kri - Krio
krj - Kinaray-a
krl - Karelian
ks - Kashmiri
ks-arab - Kashmiri (Arabic script)
ks-deva - Kashmiri (Devanagari script)
ksh - Colognian
ku - Kurdish
ku-arab - Kurdish (Arabic script)
ku-latn - Kurdish (Latin script)
kum - Kumyk
kv - Komi
kw - Cornish
ky - Kyrgyz
la - Latin
lad - Ladino
lb - Luxembourgish
lbe - Lak
lez - Lezghian
lfn - Lingua Franca Nova
lg - Ganda
li - Limburgish
lij - Ligurian
liv - Livonian
lki - Laki
lld - Ladin
lmo - Lombard
ln - Lingala
lo - Lao
loz - Lozi
lrc - Northern Luri
lt - Lithuanian
ltg - Latgalian
lus - Mizo
luz - Southern Luri
lv - Latvian
lzh - Literary Chinese
lzz - Laz
mad - Madurese
mai - Maithili
map-bms - Basa Banyumasan
mdf - Moksha
mg - Malagasy
mh - Marshallese
mhr - Eastern Mari
mi - Maori
min - Minangkabau
mk - Macedonian
ml - Malayalam
mn - Mongolian
mni - Manipuri
mnw - Mon
mo - Moldovan
mr - Marathi
mrh - Mara
mrj - Western Mari
ms - Malay
mt - Maltese
mus - Muscogee
mwl - Mirandese
my - Burmese
myv - Erzya
mzn - Mazanderani
na - Nauru
nah - Nāhuatl
nan - Min Nan Chinese
nap - Neapolitan
nb - Norwegian Bokmål
nds - Low German
nds-nl - Low Saxon
ne - Nepali
new - Newari
ng - Ndonga
nia - Nias
niu - Niuean
nl - Dutch
nl-informal - Dutch (informal address)
nn - Norwegian Nynorsk
no - Norwegian
nov - Novial
nqo - N’Ko
nrm - Norman
nso - Northern Sotho
nv - Navajo
ny - Nyanja
nys - Nyungar
oc - Occitan
olo - Livvi-Karelian
om - Oromo
or - Odia
os - Ossetic
pa - Punjabi
pag - Pangasinan
pam - Pampanga
pap - Papiamento
pcd - Picard
pdc - Pennsylvania German
pdt - Plautdietsch
pfl - Palatine German
pi - Pali
pih - Norfuk / Pitkern
pl - Polish
pms - Piedmontese
pnb - Western Punjabi
pnt - Pontic
prg - Prussian
ps - Pashto
pt - Portuguese
pt-br - Brazilian Portuguese
qqq - Message documentation
qu - Quechua
qug - Chimborazo Highland Quichua
rgn - Romagnol
rif - Riffian
rm - Romansh
rmy - Vlax Romani
rn - Rundi
ro - Romanian
roa-tara - Tarantino
ru - Russian
rue - Rusyn
rup - Aromanian
ruq - Megleno-Romanian
ruq-cyrl - Megleno-Romanian (Cyrillic script)
ruq-latn - Megleno-Romanian (Latin script)
rw - Kinyarwanda
sa - Sanskrit
sah - Sakha
sat - Santali
sc - Sardinian
scn - Sicilian
sco - Scots
sd - Sindhi
sdc - Sassarese Sardinian
sdh - Southern Kurdish
se - Northern Sami
sei - Seri
ses - Koyraboro Senni
sg - Sango
sgs - Samogitian
sh - Serbo-Croatian
shi - Tachelhit
shi-latn - Tachelhit (Latin script)
shi-tfng - Tachelhit (Tifinagh script)
shn - Shan
shy - Shawiya
shy-latn - Shawiya (Latin script)
si - Sinhala
simple - Simple English
sk - Slovak
skr - Saraiki
skr-arab - Saraiki (Arabic script)
sl - Slovenian
sli - Lower Silesian
sm - Samoan
sma - Southern Sami
smn - Inari Sami
sn - Shona
so - Somali
sq - Albanian
sr - Serbian
sr-ec - Serbian (Cyrillic script)
sr-el - Serbian (Latin script)
srn - Sranan Tongo
ss - Swati
st - Southern Sotho
stq - Saterland Frisian
sty - Siberian Tatar
su - Sundanese
sv - Swedish
sw - Swahili
szl - Silesian
szy - Sakizaya
ta - Tamil
tay - Tayal
tcy - Tulu
te - Telugu
tet - Tetum
tg - Tajik
tg-cyrl - Tajik (Cyrillic script)
tg-latn - Tajik (Latin script)
th - Thai
ti - Tigrinya
tk - Turkmen
tl - Tagalog
tly - Talysh
tly-cyrl - толыши
tn - Tswana
to - Tongan
tpi - Tok Pisin
tr - Turkish
tru - Turoyo
trv - Taroko
ts - Tsonga
tt - Tatar
tt-cyrl - Tatar (Cyrillic script)
tt-latn - Tatar (Latin script)
tum - Tumbuka
tw - Twi
ty - Tahitian
tyv - Tuvinian
tzm - Central Atlas Tamazight
udm - Udmurt
ug - Uyghur
ug-arab - Uyghur (Arabic script)
ug-latn - Uyghur (Latin script)
uk - Ukrainian
ur - Urdu
uz - Uzbek
uz-cyrl - Uzbek (Cyrillic script)
uz-latn - Uzbek (Latin script)
ve - Venda
vec - Venetian
vep - Veps
vi - Vietnamese
vls - West Flemish
vmf - Main-Franconian
vo - Volapük
vot - Votic
vro - Võro
wa - Walloon
war - Waray
wo - Wolof
wuu - Wu Chinese
xal - Kalmyk
xh - Xhosa
xmf - Mingrelian
xsy - Saisiyat
yi - Yiddish
yo - Yoruba
yue - Cantonese
za - Zhuang
zea - Zeelandic
zgh - Standard Moroccan Tamazight
zh - Chinese
zh-cn - Chinese (China)
zh-hans - Simplified Chinese
zh-hant - Traditional Chinese
zh-hk - Chinese (Hong Kong)
zh-mo - Chinese (Macau)
zh-my - Chinese (Malaysia)
zh-sg - Chinese (Singapore)
zh-tw - Chinese (Taiwan)
zu - Zulu
Format
Export for off-line translation
Export in native format
Fetch
<div lang="en" dir="ltr" class="mw-content-ltr"> <languages/> </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ZFS is an advanced filesystem that is available for use in Funtoo Linux, thanks to the ZFS on Linux project. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> It is easy to set up and use ZFS. In this simple introduction, we're going to set up ZFS under Funtoo Linux using an existing {{c|debian-sources}} or {{c|debian-sources-lts}} kernel like the one that comes pre-built for you with Funtoo Linux, and we will also be using our ZFS storage pool for storing data that isn't part of the Funtoo Linux installation itself. This means that we don't need to worry about enabling ZFS support in GRUB, or mounting ZFS to actually boot Funtoo Linux. Funtoo Linux will boot from a non-ZFS filesystem, and as part of the initialization process will initialize our ZFS storage pool and mount it at the location of our choice. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> == Installation == </div> <div lang="en" dir="ltr" class="mw-content-ltr"> To install ZFS, perform the following steps: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> {{console|body= # ##i##emerge zfs }} </div> <div lang="en" dir="ltr" class="mw-content-ltr"> This will emerge the ZFS userspace tools ({{c|zfs}}) as well as ZFS kernel modules ({{c|zfs-kmod}} and {{c|spl}}). Once complete, enable ZFS in your default runlevel as follows: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> {{console|body= # ##i##rc-update add zfs-import default # ##i##rc }} </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ZFS is now initialized and ready for use. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> == ZFS Concepts == </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Unlike traditional filesystems like ext4 and xfs, ZFS is an all-inclusive storage technology that manages its own filesystems without using {{f|/etc/fstab}}. The ZFS concept of ''importing'' volumes and their associated filesystems makes them available for use by the operating system. This will be performed when the system boots via the {{c|zfs-import}} startup script. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> ZFS also generally manages the physical disks that it uses, and physical disks are added to a ZFS storage pool. Then, ZFS can create volumes from the storage pool on which files can be stored. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Unlike traditional Linux filesystems, ZFS filesystems will allocate storage on-demand from the underlying storage pool. Thus, we can set the "size" of a ZFS volume, but this space only actually allocated when files are stored on the filesystem. In contrast, traditional Linux filesystems like ext4 and xfs must be assigned underlying block storage in advance. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> In ZFS terminology, a ZFS ''storage pool'' can hold the following things, all of which are considered to be ''datasets'': </div> <div lang="en" dir="ltr" class="mw-content-ltr"> * ''filesystems'' - these are what get mounted and you store files in. Generally, this is the main thing people use ZFS for. * ''clones'' - a filesystem that is created as a copy of an existing ''snapshot''. * ''snapshots'' - a read-only copy of a filesystem at a given point in time. * ''volume'' - a dataset that acts as a block device, such as a swap device. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> When you inspect the contents of a ZFS storage pool, you will see potentially all these different types of things listed as the contents of the pool, and their names will appear in a {{c|pool/path[@snapshot]}} format. ''Pool'' is the name of the storage pool. ''Path'' is a slash-delimited path name for the component, and the slashes don't represent directories but a logical organizational hierarchy for the dataset in the pool. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> == Creating a Storage Pool == </div> <div lang="en" dir="ltr" class="mw-content-ltr"> To create a basic ZFS storage pool, you will need an extra empty disk. Perform the following steps: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> {{console|body= # ##i##zpool create mypool /dev/sdxy }} </div> <div lang="en" dir="ltr" class="mw-content-ltr"> {{c|/dev/sdxy}} should be an unused disk. You may need to use the following command if this disk contains any pre-existing data on it: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> {{console|body= # ##i##zpool create -f mypool /dev/sdxy }} </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Once your storage pool is created, you can verify its existence with the {{c|zpool status}} command: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> {{console|body= # ##i##zpool status pool: mypool state: ONLINE scan: none requested config: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> NAME STATE READ WRITE CKSUM mypool ONLINE 0 0 0 sdb ONLINE 0 0 0 </div> <div lang="en" dir="ltr" class="mw-content-ltr"> errors: No known data errors # }} </div> <div lang="en" dir="ltr" class="mw-content-ltr"> And if you type {{c|zfs list}}, you will likely see something like this: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> {{console|body= # ##i### zfs list NAME USED AVAIL REFER MOUNTPOINT mypool 2.19G 459G 96K none }} </div> <div lang="en" dir="ltr" class="mw-content-ltr"> Notice the ''mountpoint'' entry of {{c|None}}. While it is possible to mount your storage pool directly and use it as a filesystem, it is best to create a filesystem as a sub-path within your pool's namespace, as follows: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> {{console|body= # ##i##zfs create mypool/home # ##i##zfs list NAME USED AVAIL REFER MOUNTPOINT mypool 2.19G 459G 96K none mypool/home 96K 459G 96K none }} </div> <div lang="en" dir="ltr" class="mw-content-ltr"> As you can see above, although we have created a ZFS filesystem, it is only using 96K of storage on our pool, although there are 459GB available. You can also see that the filesystem is currently not mounted. Rather than use the {{c|mount}} command, let's change that the ZFS way: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> {{console|body= # ##i##mkdir /data/home # ##i##zfs set mountpoint=/data/home mypool/home # ##i##mount ... mypool/home on /data/home type zfs (rw,xattr,posixacl) }} </div> <div lang="en" dir="ltr" class="mw-content-ltr"> We have now set the {{c|mountpoint}} property on our filesystem, and can see that it is now mounted where we want it. ZFS will remember that our {{c|mypool/home}} filesystem gets mounted at {{f|/data/home}}. Most people will want their filesystems to be automatically mounted at boot and will perform the following steps to make this happen: </div> <div lang="en" dir="ltr" class="mw-content-ltr"> {{console|body= # ##i##rc-update add zfs-mount default }} </div> <div lang="en" dir="ltr" class="mw-content-ltr"> You should now be at the point where you can begin to use ZFS for a variety of tasks. While there is a lot more to ZFS than what is covered in this short introduction, you should now have a good understanding of the fundamental concepts on which ZFS is based. </div> <div lang="en" dir="ltr" class="mw-content-ltr"> [[Category:ZFS]] [[Category:Filesystems]] [[Category:HOWTO]] [[Category:Official Documentation]] </div>
Navigation menu
Personal tools
English
Log in
Namespaces
Translate
Variants
Views
Language statistics
Message group statistics
Export
More
Search
foo
Funtoo Linux
Install
Support Matrix
Download
Find your CPU
FAQ
Infrastructure
YouTube Channel
Discord
Report a Bug
Submit Code
Forums
Server Status
Sponsors
Projects
Keychain
Containers
Metro
Misc
Ebuilds
Wiki Editing Guidelines
Development Guide
Categories
Articles
HOWTOs
Tutorials
Networking
Portage
Links
Recent changes
MediaWiki Help
Tools
Special pages
Printable version