summaryrefslogtreecommitdiffstats
path: root/cddl
diff options
context:
space:
mode:
authormav <mav@FreeBSD.org>2014-05-08 13:12:24 +0000
committermav <mav@FreeBSD.org>2014-05-08 13:12:24 +0000
commit44963562b00b94a91a0e5a1a5f7173128348f394 (patch)
tree941360281cc19f7cc53d5d9312c218c2235ad503 /cddl
parentda286974ab2c76c57f866ef9a57c31eb57f904c3 (diff)
downloadFreeBSD-src-44963562b00b94a91a0e5a1a5f7173128348f394.zip
FreeBSD-src-44963562b00b94a91a0e5a1a5f7173128348f394.tar.gz
MFC r264145:
Add property and sysctl to control how ZVOLs are exposed to OS. New ZFS property volmode and sysctl vfs.zfs.vol.mode allow switching ZVOL between three modes: geom -- existing fully functional behavior (default); dev -- exposing volumes only as raw disk device file in devfs; none -- not exposing volumes outside ZFS. The "dev" mode is less functional (can't be partitioned, mounted, etc), but it is faster, and in some scenarios with untrusted consumers safer. It can be useful for NAS, VM block storages, etc. The "none" mode may be convenient for backup servers, etc. that don't need direct data access. Due to the way ZVOL is integrated with main ZFS code, those property and sysctl are checked only during pool import and volume creation.
Diffstat (limited to 'cddl')
-rw-r--r--cddl/contrib/opensolaris/cmd/zfs/zfs.834
1 files changed, 33 insertions, 1 deletions
diff --git a/cddl/contrib/opensolaris/cmd/zfs/zfs.8 b/cddl/contrib/opensolaris/cmd/zfs/zfs.8
index 8fac48a..d14ce13 100644
--- a/cddl/contrib/opensolaris/cmd/zfs/zfs.8
+++ b/cddl/contrib/opensolaris/cmd/zfs/zfs.8
@@ -30,7 +30,7 @@
.\"
.\" $FreeBSD$
.\"
-.Dd March 20, 2014
+.Dd April 5, 2014
.Dt ZFS 8
.Os
.Sh NAME
@@ -1306,6 +1306,38 @@ Consequently, writes to a sparse volume can fail with
when the pool is low on space. For a sparse volume, changes to
.Sy volsize
are not reflected in the reservation.
+.It Sy volmode Ns = Ns Cm default | geom | dev | none
+This property specifies how volumes should be exposed to the OS.
+Setting it to
+.Sy geom
+exposes volumes as
+.Xr geom 4
+providers, providing maximal functionality.
+Setting it to
+.Sy dev
+exposes volumes only as cdev device in devfs.
+Such volumes can be accessed only as raw disk device files, i.e. they
+can not be partitioned, mounted, participate in RAIDs, etc, but they
+are faster, and in some use scenarios with untrusted consumer, such as
+NAS or VM storage, can be more safe.
+Volumes with property set to
+.Sy none
+are not exposed outside ZFS, but can be snapshoted, cloned, replicated, etc,
+that can be suitable for backup purposes.
+Value
+.Sy default
+means that volumes exposition is controlled by system-wide sysctl/tunable
+.Va vfs.zfs.vol.mode ,
+where
+.Sy geom ,
+.Sy dev
+and
+.Sy none
+are encoded as 1, 2 and 3 respectively.
+The default values is
+.Sy geom .
+This property can be changed any time, but so far it is processed only
+during volume creation and pool import.
.It Sy vscan Ns = Ns Cm off | on
The
.Sy vscan
OpenPOWER on IntegriCloud