OpenZFS on Linux and FreeBSD
Go to file
Brian Behlendorf c6c24585cc Merge branch 'linux-unused' into refs/top-bases/linux-zfs-branch 2010-05-21 16:00:31 -07:00
cmd Merge branch 'linux-events' into refs/top-bases/linux-zfs-branch 2010-05-21 15:35:53 -07:00
config Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-05-20 10:24:05 -07:00
etc Remove promise example config replace with a supermicro config 2010-03-11 14:04:12 -08:00
lib Merge branch 'linux-user-util' into refs/top-bases/linux-zfs-branch 2010-05-21 10:49:47 -07:00
man Add man pages to the build system and packages. 2009-12-11 16:49:25 -08:00
module Merge branch 'linux-kernel-disk' into refs/top-bases/linux-zfs-branch 2010-05-21 15:31:38 -07:00
patches Add e2fsprogs patch for detecting ZFS uberblocks until it appears upstream. 2009-11-02 15:04:43 -08:00
scripts Merge branch 'linux-have-mntent' into refs/top-bases/linux-zfs-branch 2010-05-18 16:22:46 -07:00
.gitignore Ignore unsigned module build products 2010-03-09 14:14:09 -08:00
.topdeps Add linux-user-util topic branch. 2010-05-21 10:47:59 -07:00
.topmsg Add linux-user-util topic branch. 2010-05-21 10:47:59 -07:00
AUTHORS Add AUTHORS to master branch 2010-05-18 14:55:01 -07:00
COPYING Revert accidental change to COPYING, move authors to master branch. 2010-05-18 14:41:47 -07:00
COPYRIGHT Update COPYRIGHT to reference zpios CDDL exceptions. 2010-05-18 14:25:28 -07:00
ChangeLog Prep for 0.4.9 tag update META, README, ChangeLog. 2010-05-21 15:11:49 -07:00
DISCLAIMER Resolve conflict 2010-05-18 10:42:54 -07:00
GIT Refresh type in topgit git://* reference 2009-01-26 21:58:32 -08:00
META Prep for 0.4.9 tag update META, README, ChangeLog. 2010-05-21 15:11:49 -07:00
Makefile.am Allow zfs_config.h to be included by dependant packages (updated) 2010-03-22 16:42:18 -07:00
OPENSOLARIS.LICENSE Add CDDL license file 2008-12-01 14:49:34 -08:00
README Prep for 0.4.9 tag update META, README, ChangeLog. 2010-05-21 15:11:49 -07:00
ZFS.RELEASE Rebase master to b121 2009-08-18 11:43:27 -07:00
autogen.sh Core target arch support for conditional compilation of SUBDIRs 2009-06-08 16:07:43 -07:00
configure.ac Merge branch 'linux-docs' into refs/top-bases/linux-zfs-branch 2010-03-26 15:47:25 -07:00
zfs-modules.spec.in Minor spec file cleanup for RHEL6 package dependency. 2010-05-21 15:08:08 -07:00
zfs.spec.in Remove TODO file for spec file. 2010-05-21 15:40:24 -07:00

README

============================ ZFS QUICK START ============================

1) Build the SPL (Solaris Porting Layer) and install it.  This package
   provides several Solaris APIs used by ZFS and is a required dependency.
   Before building ZFS build this package and install the resulting rpms.

> tar -xzf spl-x.y.z.tgz
> cd spl-x.y.z
> ./configure --with-linux=<kernel src>
> make
> make rpm

> sudo rpm -Uvh *.<arch>.rpm
Preparing...                ########################################### [100%]
   1:spl                    ########################################### [ 33%]
   2:spl-modules-devel      ########################################### [ 67%]
   3:spl-modules            ########################################### [100%]


2) Build ZFS and install it.  This package provides the native port of
   ZFS for Linux including all kernel modules and command line utilities.
   Note it is important that you have installed spl-module-devel package
   from step 1) before attempting to build ZFS.

> tar -xzf zfs-x.y.z.tgz
> cd zfs-x.y.z
> ./configure --with-linux=<kernel src>
> make
> make rpm

> sudo rpm -Uvh *.<arch>.rpm
Preparing...                ########################################### [100%]
   1:zfs                    ########################################### [ 20%]
   2:zfs-test               ########################################### [ 40%]
   3:zfs-modules-devel      ########################################### [ 60%]
   4:zfs-modules            ########################################### [ 80%]


3) Enjoy ZFS on Linux!  Currently only the ZVOL is fully functional
   but work on the ZPL is underway.  Why is just having the ZVOL still
   useful you ask?  Well here's an example of what you can do today using
   just the ZVOL:

> # Create the 'tank' zpool containing a raidz vdev spread over 4 devices.
> zpool create tank raidz /dev/sdb /dev/sdc /dev/sdd /dev/sde
> zpool list
NAME   SIZE   USED  AVAIL    CAP  HEALTH  ALTROOT
tank  1.81T   132K  1.81T     0%  ONLINE  -

> # Create a 100G block device named 'fish' in the 'tank' zpool.
> zfs create -V 100G tank/fish
> zfs list
NAME        USED  AVAIL  REFER  MOUNTPOINT
tank        100G  1.24T  26.9K  /tank
tank/fish   100G  1.33T  23.9K  -

> # Partition 'tank/fish' as if it were a normal block device.
> sfdisk /dev/tank/fish << EOF
0,
EOF
> sfdisk -l /dev/tank/fish

Disk /dev/tank/fish: 208050 cylinders, 16 heads, 63 sectors/track
Units = cylinders of 516096 bytes, blocks of 1024 bytes, counting from 0

   Device Boot Start     End   #cyls    #blocks   Id  System
/dev/tank/fish1          0+ 208049  208050- 104857199+  83  Linux
/dev/tank/fish2          0       -       0          0    0  Empty
/dev/tank/fish3          0       -       0          0    0  Empty
/dev/tank/fish4          0       -       0          0    0  Empty

> # Format the new /dev/tank/fish1 partition with ext2 and mount it.
> mkfs.ext2 -q /dev/tank/fish1
> mkdir -p /mnt/tank/fish1
> mount /dev/tank/fish1 /mnt/tank/fish1
> ls /mnt/tank/fish1
lost+found

> # Take a snapshot of the pristine ext2 filesystem and mount it read-only.
> zfs snapshot tank/fish@pristine
> mkdir /mnt/tank/fish@pristine1
> mount /dev/tank/fish@pristine1 /mnt/tank/fish@pristine1
> ls /mnt/tank/fish\@pristine1
lost+found

> # Changes made to tank/fish1 do not appear in tank/fish@pristine1
> touch /mnt/tank/fish1/foo
> ls /mnt/tank/fish1/
foo  lost+found
> ls /mnt/tank/fish\@pristine1
lost+found


Enjoy,
Brian Behlendorf <behlendorf1@llnl.gov>