]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/blob - usr.sbin/pnfsdscopymr/pnfsdscopymr.8
zfs: merge openzfs/zfs@8f2f6cd2a
[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 .Dd June 2, 2018
25 .Dt PNFSDSCOPYMR 8
26 .Os
27 .Sh NAME
28 .Nm pnfsdscopymr
29 .Nd
30 copy or move a data storage file for a MDS file to a different DS
31 .Sh SYNOPSIS
32 .Nm
33 .Op Fl r Ar mounted-on-DS-dir
34 .Op Fl m Ar source-mounted-on-DS-dir destination-mounted-on-DS-dir
35 .Ar mdsfile
36 .Sh DESCRIPTION
37 The
38 .Nm
39 command copies a data storage file for an MDS file from one DS to another DS.
40 It is normally used to recover data files onto a repaired DS, but can also
41 be used to manually migrate a data storage file from one DS to a different one.
42 By default, the command will copy the data storage file for
43 .Dq mdsfile
44 to one of the other DSs to create a mirror of it.
45 This might be done if the file was created before mirroring was enabled on
46 the pNFS service and now needs to be mirrored.
47 .Pp
48 The following options are available:
49 .Bl -tag -width Ds
50 .It Fl r Ar mounted-on-DS-dir
51 This option indicates that the data storage file should be created on the DS
52 that is mounted on the directory
53 .Dq mounted-on-DS-dir .
54 It will only do the copy if there is an entry in the pnfsd.dsfile extended
55 attribute that has an IP address of 0.0.0.0.
56 See
57 .Xr pnfsdsfile 1
58 for how to do this.
59 This is normally done for all regular files via
60 .Xr find 1
61 in order to recover the data
62 storage files onto a repaired DS.
63 .It Fl m Ar source-mounted-on-DS-dir destination-mounted-on-DS-dir
64 This option indicates that the data storage file is to be migrated from
65 the source DS mounted on the diectory
66 .Dq source-mounted-on-DS-dir
67 to the DS mounted on the directory
68 .Dq destination-mounted-on-DS-dir .
69 In this case, the data storage file will be removed from the source DS
70 when the copy is completed.
71 .El
72 If the copy/migration is already done, the command will simply exit(0),
73 so that it can safely be used on all regular files in the exported directory
74 tree on the MDS.
75 .Pp
76 This command must be run on the MDS and a typical usage would be as an
77 argument for
78 .Xr find 1
79 for all regular files.
80 .sp
81 For example, if the repaired DS is mounted on /data3 and files previously
82 stored on the repaired DS have had the DS's IP address set to 0.0.0.0:
83 .br
84 # cd <top-level-exported-directory-on-the-MDS>
85 .br
86 # find . -type f -exec pnfsdscopymr -r /data3 {} \\;
87 .Sh SEE ALSO
88 .Xr find 1 ,
89 .Xr nfsv4 4 ,
90 .Xr pnfs 4 ,
91 .Xr nfsd 8 ,
92 .Xr pnfsdsfile 8 ,
93 .Xr pnfsdskill 8
94 .Sh HISTORY
95 The
96 .Nm
97 command first appeared in
98 .Fx 12.0 .