'\" te .\" Copyright (c) 2004, Sun Microsystems, Inc. All Rights Reserved .\" 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 usr/src/OPENSOLARIS.LICENSE or http://www.opensolaris.org/os/licensing. See the License for the specific language governing permissions and limitations under the License. .\" When distributing Covered Code, include this CDDL HEADER in each file and include the License file at usr/src/OPENSOLARIS.LICENSE. If applicable, add the following below this CDDL HEADER, with the fields enclosed by brackets "[]" replaced with your own identifying information: Portions Copyright [yyyy] [name of copyright owner] .TH METASYNC 1M "Mar 27, 2006" .SH NAME metasync \- handle metadevice resync during reboot .SH SYNOPSIS .LP .nf \fB/usr/sbin/metasync\fR \fB-h\fR .fi .LP .nf \fB/usr/sbin/metasync\fR [\fB-s\fR \fIsetname\fR] [\fIbuffer_size\fR] \fImetadevice\fR .fi .LP .nf \fB/usr/sbin/metasync\fR [\fB-s\fR \fIsetname\fR] \fB-r\fR [\fIbuffer_size\fR] .fi .LP .nf \fB/usr/sbin/metasync\fR \fB-p\fR \fImetadevice\fR .fi .LP .nf \fB/usr/sbin/metasync\fR \fB-c\fR \fImetadevice\fR .fi .SH DESCRIPTION .sp .LP The \fBmetasync\fR command starts a resync operation on the specified \fImetadevice\fR. All components that need to be resynced are resynced. If the system crashes during a RAID5 initialization, or during a RAID5 resync, either an initialization or resync restarts when the system reboots. .sp .LP Applications are free to access a metadevice at the same time that it is being resynced by \fBmetasync\fR. Also, \fBmetasync\fR performs the copy operations from inside the kernel, which makes the utility more efficient. .sp .LP Use the \fB-r\fR option in boot scripts to resync all possible submirrors. .SH OPTIONS .sp .LP The following options are supported: .sp .ne 2 .na \fB\fB-c\fR \fImetadevice\fR\fR .ad .RS 17n Cancels the resync that is in progress on the specified metadevice. The resync will be stopped at its current point and can be resumed by running the "\fBmetasync metadevice\fR" command. This option only applies to RAID1 volumes. .RE .sp .ne 2 .na \fB\fB-h\fR\fR .ad .RS 17n Displays usage message. .RE .sp .ne 2 .na \fB\fB-p\fR \fImetadevice\fR\fR .ad .RS 17n Regenerates parity information for RAID5 metadevices. .RE .sp .ne 2 .na \fB\fB-s\fR \fB\fIsetname\fR\fR\fR .ad .RS 17n Specifies the name of the diskset on which \fBmetasync\fR will work. Using the \fB-s\fR option will cause the command to perform its administrative function within the specified diskset. Without this option, the command will perform its function on local metadevices. .RE .sp .ne 2 .na \fB\fB-r\fR\fR .ad .RS 17n Specifies that the \fBmetasync\fR command handle special resync requirements during a system reboot. \fBmetasync\fR \fB-r\fR should only be invoked from the \fBsvc:/system/mdmonitor\fR service. The \fBmetasync\fR command only resyncs those metadevices that need to be resynced. \fBmetasync\fR schedules all the mirror resyncs according to their pass numbers. .sp To override the default buffer_size value used by the \fBsvc:/system/mdmonitor\fR service, you can edit \fB/etc/system\fR to specify: .sp .in +2 .nf set md_mirror:md_resync_bufsz = 2048 .fi .in -2 .sp so that resyncs occur as quickly as possible. .RE .SH OPERANDS .sp .ne 2 .na \fB\fIbuffer_size\fR\fR .ad .RS 15n Specifies the size (number of 512-byte disk blocks) of the internal copy buffer for the mirror resync. The size defaults to 1024 512-byte disk blocks. It can be no more than 2048 blocks. For best performance (quickest completion of the resync), 2048 blocks is the recommended size. .RE .SH EXIT STATUS .sp .LP The following exit values are returned: .sp .ne 2 .na \fB\fB0\fR\fR .ad .RS 6n Successful completion. .RE .sp .ne 2 .na \fB\fB>0\fR\fR .ad .RS 6n An error occurred. .RE .SH SEE ALSO .sp .LP \fBmdmonitord\fR(1M), \fBmetaclear\fR(1M), \fBmetadb\fR(1M), \fBmetadetach\fR(1M), \fBmetahs\fR(1M), \fBmetainit\fR(1M), \fBmetaoffline\fR(1M), \fBmetaonline\fR(1M), \fBmetaparam\fR(1M), \fBmetarecover\fR(1M), \fBmetarename\fR(1M), \fBmetareplace\fR(1M), \fBmetaroot\fR(1M), \fBmetaset\fR(1M), \fBmetassist\fR(1M), \fBmetastat\fR(1M), \fBmetattach\fR(1M), \fBmd.tab\fR(4), \fBmd.cf\fR(4), \fBmddb.cf\fR(4), \fBmd.tab\fR(4), \fBattributes\fR(5), \fBmd\fR(7D) .sp .LP \fI\fR .SH NOTES .sp .LP The \fBmetasync\fR service is managed by the service management facility, \fBsmf\fR(5), under the service identifier: .sp .in +2 .nf svc:/system/mdmonitor .fi .in -2 .sp .sp .LP Administrative actions on this service, such as enabling, disabling, or requesting restart, can be performed using \fBsvcadm\fR(1M). The service's status can be queried using the \fBsvcs\fR(1) command.