mirror_zfs/cmd
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
..
mount_zfs Handle /etc/mtab -> /proc/mounts symlink 2011-06-14 16:48:38 -07:00
zdb Always check -Wno-unused-but-set-variable gcc support 2011-06-14 16:40:35 -07:00
zfs Always check -Wno-unused-but-set-variable gcc support 2011-06-14 16:40:35 -07:00
zinject Always check -Wno-unused-but-set-variable gcc support 2011-06-14 16:40:35 -07:00
zpios Always check -Wno-unused-but-set-variable gcc support 2011-06-14 16:40:35 -07:00
zpool Add "ashift" property to zpool create 2011-06-17 16:35:49 -07:00
zpool_id Always check -Wno-unused-but-set-variable gcc support 2011-06-14 16:40:35 -07:00
zpool_layout Always check -Wno-unused-but-set-variable gcc support 2011-06-14 16:40:35 -07:00
ztest Always check -Wno-unused-but-set-variable gcc support 2011-06-14 16:40:35 -07:00
zvol_id Always check -Wno-unused-but-set-variable gcc support 2011-06-14 16:40:35 -07:00
Makefile.am Fix mount helper 2011-03-09 15:26:48 -08:00
Makefile.in Always check -Wno-unused-but-set-variable gcc support 2011-06-14 16:40:35 -07:00