OpenZFS on Linux and FreeBSD
Go to file
Christian Kohlschütter df30f56639 Add "ashift" property to zpool create
Some disks with internal sectors larger than 512 bytes (e.g., 4k) can
suffer from bad write performance when ashift is not configured
correctly.  This is caused by the disk not reporting its actual sector
size, but a sector size of 512 bytes.  The drive may behave this way
for compatibility reasons.  For example, the WDC WD20EARS disks are
known to exhibit this behavior.

When creating a zpool, ZFS takes that wrong sector size and sets the
"ashift" property accordingly (to 9: 1<<9=512), whereas it should be
set to 12 for 4k sectors (1<<12=4096).

This patch allows an adminstrator to manual specify the known correct
ashift size at 'zpool create' time.  This can significantly improve
performance in certain cases.  However, it will have an impact on your
total pool capacity.  See the updated ashift property description
in the zpool.8 man page for additional details.

Valid values for the ashift property range from 9 to 17 (512B-128KB).
Additionally, you may set the ashift to 0 if you wish to auto-detect
the sector size based on what the disk reports, this is the default
behavior.  The most common ashift values are 9 and 12.

  Example:
  zpool create -o ashift=12 tank raidz2 sda sdb sdc sdd

Closes #280

Original-patch-by: Richard Laager <rlaager@wiktel.com>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
2011-06-17 16:35:49 -07:00
cmd Add "ashift" property to zpool create 2011-06-17 16:35:49 -07:00
config Always check -Wno-unused-but-set-variable gcc support 2011-06-14 16:40:35 -07:00
dracut Autogen refresh. 2011-06-17 13:24:44 -07:00
etc Autogen refresh. 2011-06-17 13:24:44 -07:00
include Add "ashift" property to zpool create 2011-06-17 16:35:49 -07:00
lib Add "ashift" property to zpool create 2011-06-17 16:35:49 -07:00
man Add "ashift" property to zpool create 2011-06-17 16:35:49 -07:00
module Add "ashift" property to zpool create 2011-06-17 16:35:49 -07:00
patches Add build system 2010-08-31 13:41:27 -07:00
scripts Always check -Wno-unused-but-set-variable gcc support 2011-06-14 16:40:35 -07:00
.gitignore Ignore unsigned module build products 2010-03-09 14:14:09 -08:00
AUTHORS Add "ashift" property to zpool create 2011-06-17 16:35:49 -07:00
COPYING Relocate COPYING+COPYRIGHT, remove README cruft 2008-12-01 15:34:53 -08:00
COPYRIGHT Update COPYRIGHT to reference zpios CDDL exceptions. 2010-05-18 14:25:28 -07:00
ChangeLog Add build system 2010-08-31 13:41:27 -07:00
DISCLAIMER Update COPYRIGHT and DISCLAIMER. 2010-05-18 10:32:23 -07:00
META Prep zfs-0.6.0-rc4 tag 2011-05-03 10:29:05 -07:00
Makefile.am Add dracut support 2011-03-17 16:52:04 -07:00
Makefile.in Always check -Wno-unused-but-set-variable gcc support 2011-06-14 16:40:35 -07:00
OPENSOLARIS.LICENSE Add CDDL license file 2008-12-01 14:49:34 -08:00
README.markdown Fix markdown rendering 2010-09-15 09:09:37 -07:00
ZFS.RELEASE Update to onnv_147 2010-08-26 14:24:34 -07:00
autogen.sh Minor packaging fixes 2010-09-01 15:42:32 -07:00
configure Autogen refresh. 2011-06-17 13:24:44 -07:00
configure.ac Fix autoconf variable substitution in udev rules. 2011-06-17 10:11:29 -07:00
zfs-modules.spec.in Fix rebuildable RPMs for el6/ch5 2011-04-08 10:22:42 -07:00
zfs-script-config.sh.in Unconditionally load core kernel modules 2010-11-11 11:38:25 -08:00
zfs.spec.in Update rpm/deb packages to be FHS compliant 2011-06-17 13:36:16 -07:00
zfs_config.h.in Fix 'zfs set volsize=N pool/dataset' 2011-05-02 08:54:40 -07:00

README.markdown

Native ZFS for Linux! ZFS is an advanced file system and volume manager which was originally developed for Solaris. It has been successfully ported to FreeBSD and now there is a functional Linux ZFS kernel port too. The port currently includes a fully functional and stable SPA, DMU, and ZVOL with a ZFS Posix Layer (ZPL) on the way!

$ ./configure
$ make pkg

Full documentation for building, configuring, and using ZFS can be found at: http://zfsonlinux.org