Implemented zpool sync command

This addition will enable us to sync an open TXG to the main pool
on demand. The functionality is similar to 'sync(2)' but 'zpool sync'
will return when data has hit the main storage instead of potentially
just the ZIL as is the case with the 'sync(2)' cmd.

Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Reviewed by: Matthew Ahrens <mahrens@delphix.com>
Signed-off-by: Alek Pinchuk <apinchuk@datto.com>
Closes #6122
This commit is contained in:
Alek P
2017-05-19 12:33:11 -07:00
committed by Brian Behlendorf
parent 4a283c7f77
commit bec1067d54
20 changed files with 396 additions and 69 deletions
+21 -1
View File
@@ -3,6 +3,7 @@
.\" Copyright 2011 Nexenta Systems, Inc. All rights reserved.
.\" Copyright (c) 2013 by Delphix. All rights reserved.
.\" Copyright (c) 2012 Cyril Plisko. All Rights Reserved.
.\" Copyright (c) 2017 Datto Inc.
.\" The contents of this file are subject to the terms of the Common Development
.\" and Distribution License (the "License"). You may not use this file except
.\" in compliance with the License. You can obtain a copy of the license at
@@ -15,7 +16,7 @@
.\" CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your
.\" own identifying information:
.\" Portions Copyright [yyyy] [name of copyright owner]
.TH zpool 8 "May 11, 2016" "ZFS pool 28, filesystem 5" "System Administration Commands"
.TH zpool 8 "April 12, 2017" "ZFS pool 28, filesystem 5" "System Administration Commands"
.SH NAME
zpool \- configures ZFS storage pools
.SH SYNOPSIS
@@ -162,6 +163,11 @@ zpool \- configures ZFS storage pools
\fBzpool status\fR [\fB-c\fR \fBSCRIPT\fR] [\fB-gLPvxD\fR] [\fB-T\fR d | u] [\fIpool\fR] ... [\fIinterval\fR [\fIcount\fR]]
.fi
.LP
.nf
\fBzpool sync\fR [\fBpool\fR] ...
.fi
.LP
.nf
\fBzpool upgrade\fR
@@ -2240,6 +2246,20 @@ Specify \fBu\fR for a printed representation of the internal representation of t
.RE
.sp
.ne 2
.na
\fB\fBzpool sync\fR\fR [\fBpool\fR] ...
.ad
.sp .6
.RS 4n
This command forces all in-core dirty data to be written to the primary pool
storage and not the ZIL. It will also update administrative information
including quota reporting.
Without arguments, \fBzpool sync\fR will sync all pools on the system.
Otherwise, it will sync only the specified pool(s).
.RE
.sp
.ne 2
.na