is a file system created by Sun Microsystems for Solaris
in 2005. ZFS
combines concepts of filesystem and volume management. The name ZFS
originally means 'Zetabyte File System' but now is some kind of pseudo acronym.
is integrated and operational in Solaris 10 and OpenSolaris
in particular all distributions.
ZFS on FUSE
Suns CDDL licence makes porting of ZFS
to Linux complicated, but there is an ZFS
implementation for the Linux FUSE
apt-get install fuse-utils libfuse2 libfuse-dev
Make sure that fuse module is loaded.
is easy! Basicly you just need two commands for managing your filesystem.
Storage is managed in zpools, in which the filesystems are created and shared in an abstract way. Creation is easy, e.g.
zpool create mypool hda1 hda2
zpool add -f mypool mirror hda3 hda4
creates a pool named mypool
of two devices and then adds a mirror of two discs. Devices - or vdevs - can be blockdevices, mirror, raidz(1,2) or files. The -f
flag may be used to override warnings of existing filesystems on specified devices.
By default checksums are used by zfs to verify data integrity. The zpool scrub
command is used to detect and correct errors in the filesystem.
Important commands for examining zpools:
1. Lists zpools with health and usage overview
1. Health status for pool
zpool status mypool
1. Device usage
zpool iostat -v mypool
In a zpool the zfs filesystems are created. Purportedly creating of filesystems in zfs is a quick and easy thing, thus the user is encouraged doing that more often then in traditional filesystems. Filesystems are mounted automatically by ZFS
- no need editing fstab etc.
zfs create mypool/home
zfs create mypool/home/sebastian
zfs create mypool/test
Set filesystem properties (e.g. checksum, compression, quota, reservation...) and inherit the features recursivly from parent:
zfs set compression=on mypool/home
zfs set quota=100MB mypool/home/sebastian
zfs inherit -r mypool/home
1. List of all filesystems
1. List filesystems properties
zfs get all mypool/home/sebastian
supports snapshots in which the changes of the filesystem are stored - so creating a snapshot initially is fast and wastes no space.
zfs snapshot mypool/home/sebastian@snap1
zfs rollback mypool/home/sebastian@snap1
zfs destroy mypool/home/sebastian@snap1
1. Clone a certain filesystem:
zfs clone tank/home/sebastian@snap2 mypool/testcopy