]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/pnfsdscopymr/pnfsdscopymr.8
bhnd(9): Fix a few mandoc related issues
[FreeBSD/FreeBSD.git] / usr.sbin / pnfsdscopymr / pnfsdscopymr.8
1 .\" Copyright (c) 2018 Rick Macklem
2 .\"
3 .\" Redistribution and use in source and binary forms, with or without
4 .\" modification, are permitted provided that the following conditions
5 .\" are met:
6 .\" 1. Redistributions of source code must retain the above copyright
7 .\"    notice, this list of conditions and the following disclaimer.
8 .\" 2. Redistributions in binary form must reproduce the above copyright
9 .\"    notice, this list of conditions and the following disclaimer in the
10 .\"    documentation and/or other materials provided with the distribution.
11 .\"
12 .\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
13 .\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
14 .\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
15 .\" ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
16 .\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
17 .\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
18 .\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
19 .\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
20 .\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
21 .\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
22 .\" SUCH DAMAGE.
23 .\"
24 .\" $FreeBSD$
25 .\"
26 .Dd June 2, 2018
27 .Dt PNFSDSCOPYMR 8
28 .Os
29 .Sh NAME
30 .Nm pnfsdscopymr
31 .Nd
32 copy or move a data storage file for a MDS file to a different DS
33 .Sh SYNOPSIS
34 .Nm
35 .Op Fl r Ar mounted-on-DS-dir
36 .Op Fl m Ar source-mounted-on-DS-dir destination-mounted-on-DS-dir
37 .Ar mdsfile
38 .Sh DESCRIPTION
39 The
40 .Nm
41 command copies a data storage file for an MDS file from one DS to another DS.
42 It is normally used to recover data files onto a repaired DS, but can also
43 be used to manually migrate a data storage file from one DS to a different one.
44 By default, the command will copy the data storage file for
45 .Dq mdsfile
46 to one of the other DSs to create a mirror of it.
47 This might be done if the file was created before mirroring was enabled on
48 the pNFS service and now needs to be mirrored.
49 .Pp
50 The following options are available:
51 .Bl -tag -width Ds
52 .It Fl r Ar mounted-on-DS-dir
53 This option indicates that the data storage file should be created on the DS
54 that is mounted on the directory
55 .Dq mounted-on-DS-dir .
56 It will only do the copy if there is an entry in the pnfsd.dsfile extended
57 attribute that has an IP address of 0.0.0.0.
58 See
59 .Xr pnfsdsfile 1
60 for how to do this.
61 This is normally done for all regular files via
62 .Xr find 1
63 in order to recover the data
64 storage files onto a repaired DS.
65 .It Fl m Ar source-mounted-on-DS-dir destination-mounted-on-DS-dir
66 This option indicates that the data storage file is to be migrated from
67 the source DS mounted on the diectory
68 .Dq source-mounted-on-DS-dir
69 to the DS mounted on the directory
70 .Dq destination-mounted-on-DS-dir .
71 In this case, the data storage file will be removed from the source DS
72 when the copy is completed.
73 .El
74 If the copy/migration is already done, the command will simply exit(0),
75 so that it can safely be used on all regular files in the exported directory
76 tree on the MDS.
77 .Pp
78 This command must be run on the MDS and a typical usage would be as an
79 argument for
80 .Xr find 1
81 for all regular files.
82 .sp
83 For example, if the repaired DS is mounted on /data3 and files previously
84 stored on the repaired DS have had the DS's IP address set to 0.0.0.0:
85 .br
86 # cd <top-level-exported-directory-on-the-MDS>
87 .br
88 # find . -type f -exec pnfsdscopymr -r /data3 {} \\;
89 .Sh SEE ALSO
90 .Xr find 1 ,
91 .Xr nfsv4 4 ,
92 .Xr pnfs 4 ,
93 .Xr nfsd 8 ,
94 .Xr pnfsdsfile 8 ,
95 .Xr pnfsdskill 8
96 .Sh HISTORY
97 The
98 .Nm
99 command first appeared in
100 .Fx 12.0 .