FreeBSD src
Go to file
Brian Behlendorf 83bf769d50 Fix 'zpool import' detection issues
This patch addresses multiple 'zpool import' block device
indentification problems which are most likely to occur on a
system configured to use blkid, by_vdev paths, multipath and
failover.  The symptom most commonly observed is the import
uses different path names to import the pool than would
normally be expected.

* When using blkid to identify vdevs the listed devices may
be added to the cache in any order.  In order to apply the
preferred search order heuristic a zfs_path_order() function
was added to calculate the order given full path names.

* Since it's possible to have multiple block devices with
different vdev guids which refer to the same ZPOOL_CONFIG_PATH
the slice cache must be indexed by guid and name.  By avoiding
collisions the preferred ordering can be maintaining even
when multiple block devices claim the same ZPOOL_CONFIG_PATH.
The preferred sorting by partition was never benefitial for
a Linux system and was removed as part of this change.

* When adding entries to the blkid cache avl_find/avl_insert
are used instead of avl_add because collisions are possible
and must be handled gracefully.

* For pools using multipath devices there are, at a minimum,
three devices where a vdev label may be read.  They are the
dm-* device and each underlying /dev/sd* device.  Due to the
way the block cache is implemented each of these devices may
have a different cached copy of the vdev label.  This can
result in "ghost pools" which appear to persist even after
a 'zpool labelclear' has been done to the dm-* device.  In
order to prevent this the vdev label is read with O_DIRECT
in order to bypass any caching to get the on-disk version.

* When opening a block device verify that vdev guid read from
the disk matches the expected vdev guid.  This allows for bad
labels to be filtered out.

Reviewed-by: Tony Hutter <hutter2@llnl.gov>
Signed-off-by: Brian Behlendorf <behlendorf1@llnl.gov>
Closes #5359
2016-11-07 10:28:57 -08:00
cmd Allow autoreplace even when enclosure LED sysfs entries don't exist 2016-11-04 13:34:13 -07:00
config Replace ISAINFO with is_32bit function 2016-11-07 10:26:17 -08:00
contrib Update .gitignore 2016-10-19 14:29:33 -07:00
etc Change /etc/mtab to /proc/self/mounts 2016-09-20 10:07:58 -07:00
include Fix 'zpool import' detection issues 2016-11-07 10:28:57 -08:00
lib Fix 'zpool import' detection issues 2016-11-07 10:28:57 -08:00
man Add parity generation/rebuild using AVX-512 for x86-64 2016-11-02 12:40:23 -07:00
module Allow 16M zio buffers in user space 2016-11-07 10:26:17 -08:00
rpm Process all systemd services through the systemd scriptlets 2016-11-02 10:56:36 -07:00
scripts Add paxcheck make lint target 2016-10-28 16:10:00 -07:00
tests Replace ISAINFO with is_32bit function 2016-11-07 10:26:17 -08:00
udev Allow partition aliases in vdev_id.conf (#5266) 2016-10-14 16:11:16 -07:00
.gitignore Update .gitignore 2016-10-19 14:29:33 -07:00
.gitmodules Add zimport.sh compatibility test script 2014-02-21 12:10:31 -08:00
AUTHORS Add a missing > to AUTHORS 2014-09-02 14:18:53 -07:00
autogen.sh build: do not call boilerplate ourself 2013-04-02 10:55:20 -07:00
configure.ac Add support for O_TMPFILE 2016-11-04 10:46:40 -07:00
copy-builtin Illumos Crypto Port module added to enable native encryption in zfs 2016-07-20 10:43:30 -07:00
COPYRIGHT Update ZED copyright boilerplate 2015-05-11 15:07:00 -07:00
DISCLAIMER Fix minor typos and update marketing copy. 2013-03-21 12:51:06 -07:00
Makefile.am Add paxcheck make lint target 2016-10-28 16:10:00 -07:00
META Tag 0.7.0-rc2 2016-10-26 10:36:33 -07:00
OPENSOLARIS.LICENSE Add CDDL license file 2008-12-01 14:49:34 -08:00
README.markdown Fix minor typos and update marketing copy. 2013-03-21 12:51:06 -07:00
TEST Add the ZFS Test Suite 2016-03-16 13:46:16 -07:00
zfs-script-config.sh.in Introduce tests for python scripts 2016-10-06 13:11:57 -07:00
zfs.release.in Move zfs.release generation to configure step 2012-07-12 12:22:51 -07:00

Native ZFS for Linux!

ZFS is an advanced file system and volume manager which was originally developed for Solaris and is now maintained by the Illumos community.

ZFS on Linux, which is also known as ZoL, is currently feature complete. It includes fully functional and stable SPA, DMU, ZVOL, and ZPL layers.

Full documentation for installing ZoL on your favorite Linux distribution can be found at: http://zfsonlinux.org