1d47b2068SRick Macklem.\" Copyright (c) 2018 Rick Macklem 2d47b2068SRick Macklem.\" 3d47b2068SRick Macklem.\" Redistribution and use in source and binary forms, with or without 4d47b2068SRick Macklem.\" modification, are permitted provided that the following conditions 5d47b2068SRick Macklem.\" are met: 6d47b2068SRick Macklem.\" 1. Redistributions of source code must retain the above copyright 7d47b2068SRick Macklem.\" notice, this list of conditions and the following disclaimer. 8d47b2068SRick Macklem.\" 2. Redistributions in binary form must reproduce the above copyright 9d47b2068SRick Macklem.\" notice, this list of conditions and the following disclaimer in the 10d47b2068SRick Macklem.\" documentation and/or other materials provided with the distribution. 11d47b2068SRick Macklem.\" 12d47b2068SRick Macklem.\" THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 13d47b2068SRick Macklem.\" ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 14d47b2068SRick Macklem.\" IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 15d47b2068SRick Macklem.\" ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 16d47b2068SRick Macklem.\" FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 17d47b2068SRick Macklem.\" DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 18d47b2068SRick Macklem.\" OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 19d47b2068SRick Macklem.\" HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 20d47b2068SRick Macklem.\" LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 21d47b2068SRick Macklem.\" OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 22d47b2068SRick Macklem.\" SUCH DAMAGE. 23d47b2068SRick Macklem.\" 24d47b2068SRick Macklem.\" $FreeBSD$ 25d47b2068SRick Macklem.\" 26*b8ac5c5aSRick Macklem.Dd August 8, 2018 27d47b2068SRick Macklem.Dt PNFSSERVER 4 28d47b2068SRick Macklem.Os 29d47b2068SRick Macklem.Sh NAME 30d47b2068SRick Macklem.Nm pNFSserver 31d47b2068SRick Macklem.Nd NFS Version 4.1 Parallel NFS Protocol Server 32d47b2068SRick Macklem.Sh DESCRIPTION 33d47b2068SRick MacklemA set of FreeBSD servers may be configured to provide a 34d47b2068SRick Macklem.Xr pnfs 4 35d47b2068SRick Macklemservice. 36d47b2068SRick MacklemOne FreeBSD system needs to be configured as a MetaData Server (MDS) and 37d47b2068SRick Macklemat least one additional FreeBSD system needs to be configured as one or 38d47b2068SRick Macklemmore Data Servers (DS)s. 39d47b2068SRick Macklem.Pp 40d47b2068SRick MacklemThese FreeBSD systems are configured to be NFSv4.1 servers, see 41d47b2068SRick Macklem.Xr nfsd 8 42d47b2068SRick Macklemand 43d47b2068SRick Macklem.Xr exports 5 44d47b2068SRick Macklemif you are not familiar with configuring a NFSv4.1 server. 45d47b2068SRick Macklem.Sh DS server configuration 46d47b2068SRick MacklemThe DS(s) need to be configured as NFSv4.1 server(s), with a top level exported 47d47b2068SRick Macklemdirectory used for storage of data files. 48d47b2068SRick MacklemThis directory must be owned by 49d47b2068SRick Macklem.Dq root 50d47b2068SRick Macklemand would normally have a mode of 51d47b2068SRick Macklem.Dq 700 . 52d47b2068SRick MacklemWithin this directory there needs to be additional directories named 53d47b2068SRick Macklemds0,...,dsN (where N is 19 by default) also owned by 54d47b2068SRick Macklem.Dq root 55d47b2068SRick Macklemwith mode 56d47b2068SRick Macklem.Dq 700 . 57d47b2068SRick MacklemThese are the directories where the data files are stored. 58d47b2068SRick MacklemThe following command can be run by root when in the top level exported 59d47b2068SRick Macklemdirectory to create these subdirectories. 60d47b2068SRick Macklem.Bd -literal -offset indent 61d47b2068SRick Macklemjot -w ds 20 0 | xargs mkdir -m 700 62d47b2068SRick Macklem.Ed 63d47b2068SRick Macklem.sp 64d47b2068SRick MacklemNote that 65d47b2068SRick Macklem.Dq 20 66d47b2068SRick Macklemis the default and can be set to a larger value on the MDS as shown below. 67d47b2068SRick Macklem.sp 68d47b2068SRick MacklemThe top level exported directory used for storage of data files must be 69d47b2068SRick Macklemexported to the MDS with the 70d47b2068SRick Macklem.Dq maproot=root sec=sys 71d47b2068SRick Macklemexport options so that the MDS can create entries in these subdirectories. 72d47b2068SRick MacklemIt must also be exported to all pNFS aware clients, but these clients do 73d47b2068SRick Macklemnot require the 74d47b2068SRick Macklem.Dq maproot=root 75d47b2068SRick Macklemexport option and this directory should be exported to them with the same 76d47b2068SRick Macklemoptions as used by the MDS to export file system(s) to the clients. 77d47b2068SRick Macklem.Pp 78d47b2068SRick MacklemIt is possible to have multiple DSs on the same FreeBSD system, but each 79d47b2068SRick Macklemof these DSs must have a separate top level exported directory used for storage 80d47b2068SRick Macklemof data files and each 81d47b2068SRick Macklemof these DSs must be mountable via a separate IP address. 82d47b2068SRick MacklemAlias addresses can be set on the DS server system for a network 83d47b2068SRick Mackleminterface via 84d47b2068SRick Macklem.Xr ifconfig 8 85d47b2068SRick Macklemto create these different IP addresses. 86d47b2068SRick MacklemMultiple DSs on the same server may be useful when data for different file systems 87d47b2068SRick Macklemon the MDS are being stored on different file system volumes on the FreeBSD 88d47b2068SRick MacklemDS system. 89d47b2068SRick Macklem.Sh MDS server configuration 90d47b2068SRick MacklemThe MDS must be a separate FreeBSD system from the FreeBSD DS system(s) and 91d47b2068SRick MacklemNFS clients. 92d47b2068SRick MacklemIt is configured as a NFSv4.1 server with file system(s) exported to 93d47b2068SRick Macklemclients. 94d47b2068SRick MacklemHowever, the 95d47b2068SRick Macklem.Dq -p 96d47b2068SRick Macklemcommand line argument for 97d47b2068SRick Macklem.Xr nfsd 98d47b2068SRick Macklemis used to indicate that it is running as the MDS for a pNFS server. 99d47b2068SRick Macklem.Pp 100d47b2068SRick MacklemThe DS(s) must all be mounted on the MDS using the following mount options: 101d47b2068SRick Macklem.Bd -literal -offset indent 102d47b2068SRick Macklemnfsv4,minorversion=1,soft,retrans=2 103d47b2068SRick Macklem.Ed 104d47b2068SRick Macklem.sp 105d47b2068SRick Macklemso that they can be defined as DSs in the 106d47b2068SRick Macklem.Dq -p 107d47b2068SRick Macklemoption. 108d47b2068SRick MacklemNormally these mounts would be entered in the 109d47b2068SRick Macklem.Xr fstab 5 110d47b2068SRick Macklemon the MDS. 111d47b2068SRick MacklemFor example, if there are four DSs named nfsv4-data[0-3], the 112d47b2068SRick Macklem.Xr fstab 5 113d47b2068SRick Macklemlines might look like: 114d47b2068SRick Macklem.Bd -literal -offset 115d47b2068SRick Macklemnfsv4-data0:/ /data0 nfs rw,nfsv4,minorversion=1,soft,retrans=2 0 0 116d47b2068SRick Macklemnfsv4-data1:/ /data1 nfs rw,nfsv4,minorversion=1,soft,retrans=2 0 0 117d47b2068SRick Macklemnfsv4-data2:/ /data2 nfs rw,nfsv4,minorversion=1,soft,retrans=2 0 0 118d47b2068SRick Macklemnfsv4-data3:/ /data3 nfs rw,nfsv4,minorversion=1,soft,retrans=2 0 0 119d47b2068SRick Macklem.Ed 120d47b2068SRick Macklem.sp 121d47b2068SRick MacklemThe 122d47b2068SRick Macklem.Xr nfsd 8 123d47b2068SRick Macklemcommand line option 124d47b2068SRick Macklem.Dq -p 125d47b2068SRick Macklemindicates that the NFS server is a pNFS MDS and specifies what 126d47b2068SRick MacklemDSs are to be used. 127d47b2068SRick Macklem.br 128d47b2068SRick MacklemFor the above 129d47b2068SRick Macklem.Xr fstab 5 130d47b2068SRick Macklemexample, the 131d47b2068SRick Macklem.Xr nfsd 8 132d47b2068SRick Macklemnfs_server_flags line in your 133d47b2068SRick Macklem.Xr rc.conf 5 134d47b2068SRick Macklemmight look like: 135d47b2068SRick Macklem.Bd -literal -offset 136d47b2068SRick Macklemnfs_server_flags="-u -t -n 128 -p nfsv4-data0:/data0,nfsv4-data1:/data1,nfsv4-data2:/data2,nfsv4-data3:/data3" 137d47b2068SRick Macklem.Ed 138d47b2068SRick Macklem.sp 139d47b2068SRick MacklemThis example specifies that the data files should be distributed over the 140d47b2068SRick Macklemfour DSs and File layouts will be issued to pNFS enabled clients. 141d47b2068SRick MacklemIf issuing Flexible File layouts is desired for this case, setting the sysctl 142d47b2068SRick Macklem.Dq vfs.nfsd.default_flexfile 143d47b2068SRick Macklemnon-zero in your 144d47b2068SRick Macklem.Xr sysctl.conf 5 145d47b2068SRick Macklemfile will make the 146d47b2068SRick Macklem.Nm 147d47b2068SRick Macklemdo that. 148d47b2068SRick Macklem.br 149d47b2068SRick MacklemAlternately, this variant of 150d47b2068SRick Macklem.Dq nfs_server_flags 151d47b2068SRick Macklemwill specify that two way mirroring is to be done, via the 152d47b2068SRick Macklem.Dq -m 153d47b2068SRick Macklemcommand line option. 154d47b2068SRick Macklem.Bd -literal -offset 155d47b2068SRick Macklemnfs_server_flags="-u -t -n 128 -p nfsv4-data0:/data0,nfsv4-data1:/data1,nfsv4-data2:/data2,nfsv4-data3:/data3 -m 2" 156d47b2068SRick Macklem.Ed 157d47b2068SRick Macklem.sp 158d47b2068SRick MacklemWith two way mirroring, the data file for each exported file on the MDS 159d47b2068SRick Macklemwill be stored on two of the DSs. 160d47b2068SRick MacklemWhen mirroring is enabled, the server will always issue Flexible File layouts. 161d47b2068SRick Macklem.Pp 162d47b2068SRick MacklemIt is also possible to specify which DSs are to be used to store data files for 163d47b2068SRick Macklemspecific exported file systems on the MDS. 164d47b2068SRick MacklemFor example, if the MDS has exported two file systems 165d47b2068SRick Macklem.Dq /export1 166d47b2068SRick Macklemand 167d47b2068SRick Macklem.Dq /export2 168d47b2068SRick Macklemto clients, the following variant of 169d47b2068SRick Macklem.Dq nfs_server_flags 170d47b2068SRick Macklemwill specify that data files for 171d47b2068SRick Macklem.Dq /export1 172d47b2068SRick Macklemwill be stored on nfsv4-data0 and nfsv4-data1, whereas the data files for 173d47b2068SRick Macklem.Dq /export2 174d47b2068SRick Macklemwill be store on nfsv4-data2 and nfsv4-data3. 175d47b2068SRick Macklem.Bd -literal -offset 176d47b2068SRick Macklemnfs_server_flags="-u -t -n 128 -p nfsv4-data0:/data0#/export1,nfsv4-data1:/data1#/export1,nfsv4-data2:/data2#/export2,nfsv4-data3:/data3#/export2" 177d47b2068SRick Macklem.Ed 178d47b2068SRick Macklem.sp 179d47b2068SRick MacklemThis can be used by system administrators to control where data files are 180d47b2068SRick Macklemstored and might be useful for control of storage use. 181d47b2068SRick MacklemFor this case, it may be convenient to co-locate more than one of the DSs 182d47b2068SRick Macklemon the same FreeBSD server, using separate file systems on the DS system 183d47b2068SRick Macklemfor storage of the respective DS's data files. 184d47b2068SRick MacklemIf mirroring is desired for this case, the 185d47b2068SRick Macklem.Dq -m 186d47b2068SRick Macklemoption also needs to be specified. 187d47b2068SRick MacklemThere must be enough DSs assigned to each exported file system on the MDS 188d47b2068SRick Macklemto support the level of mirroring. 189d47b2068SRick MacklemThe above example would be fine for two way mirroring, but four way mirroring 190d47b2068SRick Macklemwould not work, since there are only two DSs assigned to each exported file 191d47b2068SRick Macklemsystem on the MDS. 192d47b2068SRick Macklem.Pp 193d47b2068SRick MacklemThe number of subdirectories in each DS is defined by the 194d47b2068SRick Macklem.Dq vfs.nfs.dsdirsize 195d47b2068SRick Macklemsysctl on the MDS. 196d47b2068SRick MacklemThis value can be increased from the default of 20, but only when the 197d47b2068SRick Macklem.Xr nfsd 8 198d47b2068SRick Macklemis not running and after the additional ds20,... subdirectories have been 199d47b2068SRick Macklemcreated on all the DSs. 200d47b2068SRick MacklemFor a service that will store a large number of files this sysctl should be 201d47b2068SRick Macklemset much larger, to avoid the number of entries in a subdirectory from 202d47b2068SRick Macklemgetting too large. 203d47b2068SRick Macklem.Sh Client mounts 204d47b2068SRick MacklemOnce operational, NFSv4.1 FreeBSD client mounts done with the 205d47b2068SRick Macklem.Dq pnfs 206d47b2068SRick Macklemoption should do I/O directly on the DSs. 207d47b2068SRick MacklemThe clients mounting the MDS must be running the 208d47b2068SRick Macklem.Xr nfscbd 209d47b2068SRick Macklemdaemon for pNFS to work. 210d47b2068SRick MacklemSet 211d47b2068SRick Macklem.Bd -literal -offset indent 212d47b2068SRick Macklemnfscbd_enable="YES" 213d47b2068SRick Macklem.Ed 214d47b2068SRick Macklem.sp 215d47b2068SRick Macklemin the 216d47b2068SRick Macklem.Xr rc.conf 5 217d47b2068SRick Macklemon these clients. 218d47b2068SRick MacklemNon-pNFS aware clients or NFSv3 mounts will do all I/O RPCs on the MDS, 219d47b2068SRick Macklemwhich acts as a proxy for the appropriate DS(s). 220d47b2068SRick Macklem.Sh Backing up a pNFS service 221d47b2068SRick MacklemSince the data is separated from the metadata, the simple way to back up 222d47b2068SRick Macklema pNFS service is to do so from an NFS client that has the service mounted 223d47b2068SRick Macklemon it. 224d47b2068SRick MacklemIf you back up the MDS exported file system(s) on the MDS, you must do it 225d47b2068SRick Macklemin such a way that the 226d47b2068SRick Macklem.Dq system 227d47b2068SRick Macklemnamespace extended attributes get backed up. 228d47b2068SRick Macklem.Sh Handling of failed mirrored DSs 229d47b2068SRick MacklemWhen a mirrored DS fails, it can be disabled one of three ways: 230d47b2068SRick Macklem.sp 231d47b2068SRick Macklem1 - The MDS detects a problem when trying to do proxy 232d47b2068SRick Macklemoperations on the DS. 233d47b2068SRick MacklemThis can take a couple of minutes 234d47b2068SRick Macklemafter the DS failure or network partitioning occurs. 235d47b2068SRick Macklem.sp 236d47b2068SRick Macklem2 - A pNFS client can report an I/O error that occurred for a DS to the MDS in 237d47b2068SRick Macklemthe arguments for a LayoutReturn operation. 238d47b2068SRick Macklem.sp 239d47b2068SRick Macklem3 - The system administrator can perform the pnfsdskill(8) command on the MDS 240d47b2068SRick Macklemto disable it. If the system administrator does a pnfsdskill(8) and it fails 241d47b2068SRick Macklemwith ENXIO (Device not configured) that normally means the DS was already 242d47b2068SRick Macklemdisabled via #1 or #2. Since doing this is harmless, once a system 243d47b2068SRick Macklemadministrator knows that there is a problem with a mirrored DS, doing the 244d47b2068SRick Macklemcommand is recommended. 245d47b2068SRick Macklem.sp 246d47b2068SRick MacklemOnce a system administrator knows that a mirrored DS has malfunctioned 247d47b2068SRick Macklemor has been network partitioned, they should do the following as root/su 248d47b2068SRick Macklemon the MDS: 249d47b2068SRick Macklem.Bd -literal -offset indent 250d47b2068SRick Macklem# pnfsdskill <mounted-on-path-of-DS> 251d47b2068SRick Macklem# umount -N <mounted-on-path-of-DS> 252d47b2068SRick Macklem.Ed 253d47b2068SRick Macklem.sp 254d47b2068SRick MacklemNote that the <mounted-on-path-of-DS> must be the exact mounted-on path 255d47b2068SRick Macklemstring used when the DS was mounted on the MDS. 256d47b2068SRick Macklem.Pp 257d47b2068SRick MacklemOnce the mirrored DS has been disabled, the pNFS service should continue to 258d47b2068SRick Macklemfunction, but file updates will only happen on the DS(s) 259d47b2068SRick Macklemthat have not been disabled. Assuming two way mirroring, that implies 260d47b2068SRick Macklemthe one DS of the pair stored in the 261d47b2068SRick Macklem.Dq pnfsd.dsfile 262d47b2068SRick Macklemextended attribute for the file on the MDS, for files stored on the disabled DS. 263d47b2068SRick Macklem.Pp 264d47b2068SRick MacklemThe next step is to clear the IP address in the 265d47b2068SRick Macklem.Dq pnfsd.dsfile 266d47b2068SRick Macklemextended attribute on all files on the MDS for the failed DS. 267d47b2068SRick MacklemThis is done so that, when the disabled DS is repaired and brought back online, 268d47b2068SRick Macklemthe data files on this DS will not be used, since they may be out of date. 269d47b2068SRick MacklemThe command that clears the IP address is 270d47b2068SRick Macklem.Xr pnfsdsfile 8 271d47b2068SRick Macklemwith the 272d47b2068SRick Macklem.Dq -r 273d47b2068SRick Macklemoption. 274d47b2068SRick Macklem.Bd -literal -offset 275d47b2068SRick MacklemFor example: 276d47b2068SRick Macklem# pnfsdsfile -r nfsv4-data3 yyy.c 277d47b2068SRick Macklemyyy.c: nfsv4-data2.home.rick ds0/207508569ff983350c000000ec7c0200e4c57b2e0000000000000000 0.0.0.0 ds0/207508569ff983350c000000ec7c0200e4c57b2e0000000000000000 278d47b2068SRick Macklem.Ed 279d47b2068SRick Macklem.sp 280d47b2068SRick Macklemreplaces nfsv4-data3 with an IPv4 address of 0.0.0.0, so that nfsv4-data3 281d47b2068SRick Macklemwill not get used. 282d47b2068SRick Macklem.Pp 283d47b2068SRick MacklemNormally this will be called within a 284d47b2068SRick Macklem.Xr find 1 285d47b2068SRick Macklemcommand for all regular 286d47b2068SRick Macklemfiles in the exported directory tree and must be done on the MDS. 287d47b2068SRick MacklemWhen used with 288d47b2068SRick Macklem.Xr find 1 , 289d47b2068SRick Macklemyou will probably also want the 290d47b2068SRick Macklem.Dq -q 291d47b2068SRick Macklemoption so that it won't spit out the results for every file. 292d47b2068SRick MacklemIf the disabled/repaired DS is nfsv4-data3, the commands done on the MDS 293d47b2068SRick Macklemwould be: 294d47b2068SRick Macklem.Bd -literal -offset 295d47b2068SRick Macklem# cd <top-level-exported-dir> 296d47b2068SRick Macklem# find . -type f -exec pnfsdsfile -q -r nfsv4-data3 {} \; 297d47b2068SRick Macklem.Ed 298d47b2068SRick Macklem.sp 299d47b2068SRick MacklemThere is a problem with the above command if the file found by 300d47b2068SRick Macklem.Xr find 1 301d47b2068SRick Macklemis renamed or unlinked before the 302d47b2068SRick Macklem.Xr pnfsdsfile 8 303d47b2068SRick Macklemcommand is done on it. 304d47b2068SRick MacklemThis should normally generate an error message. 305d47b2068SRick MacklemA simple unlink is harmless 306d47b2068SRick Macklembut a link/unlink or rename might result in the file not having been processed 307d47b2068SRick Macklemunder its new name. 308d47b2068SRick MacklemTo check that all files have their IP addresses set to 0.0.0.0 these 309d47b2068SRick Macklemcommands can be used (assuming the 310d47b2068SRick Macklem.Xr sh 1 311d47b2068SRick Macklemshell): 312d47b2068SRick Macklem.Bd -literal -offset 313d47b2068SRick Macklem# cd <top-level-exported-dir> 314d47b2068SRick Macklem# find . -type f -exec pnfsdsfile {} \; | sed "/nfsv4-data3/!d" 315d47b2068SRick Macklem.Ed 316d47b2068SRick Macklem.sp 317d47b2068SRick MacklemAny line(s) printed require the 318d47b2068SRick Macklem.Xr pnfsdsfile 8 319d47b2068SRick Macklemwith 320d47b2068SRick Macklem.Dq -r 321d47b2068SRick Macklemto be done again. 322d47b2068SRick MacklemOnce this is done, the replaced/repaired DS can be brought back online. 323d47b2068SRick MacklemIt should have empty ds0,...,dsN directories under the top level exported 324d47b2068SRick Macklemdirectory for storage of data files just like it did when first set up. 325d47b2068SRick MacklemMount it on the MDS exactly as you did before disabling it. 326d47b2068SRick MacklemFor the nfsv4-data3 example, the command would be: 327d47b2068SRick Macklem.Bd -literal -offset 328d47b2068SRick Macklem# mount -t nfs -o nfsv4,minorversion=1,soft,retrans=2 nfsv4-data3:/ /data3 329d47b2068SRick Macklem.Ed 330d47b2068SRick Macklem.sp 331d47b2068SRick MacklemThen restart the nfsd to re-enable the DS. 332d47b2068SRick Macklem.Bd -literal -offset 333d47b2068SRick Macklem# /etc/rc.d/nfsd restart 334d47b2068SRick Macklem.Ed 335d47b2068SRick Macklem.sp 336d47b2068SRick MacklemNow, new files can be stored on nfsv4-data3, 337d47b2068SRick Macklembut files with the IP address zeroed out on the MDS will not yet use the 338d47b2068SRick Macklemrepaired DS (nfsv4-data3). 339d47b2068SRick MacklemThe next step is to go through the exported file tree on the MDS and, 340d47b2068SRick Macklemfor each of the 341d47b2068SRick Macklemfiles with an IPv4 address of 0.0.0.0 in its extended attribute, copy the file 342d47b2068SRick Macklemdata to the repaired DS and re-enable use of this mirror for it. 343d47b2068SRick MacklemThis command for copying the file data for one MDS file is 344d47b2068SRick Macklem.Xr pnfsdscopymr 8 345d47b2068SRick Macklemand it will also normally be used in a 346d47b2068SRick Macklem.Xr find 1 . 347d47b2068SRick MacklemFor the example case, the commands on the MDS would be: 348d47b2068SRick Macklem.Bd -literal -offset 349d47b2068SRick Macklem# cd <top-level-exported-dir> 350d47b2068SRick Macklem# find . -type f -exec pnfsdscopymr -r /data3 {} \; 351d47b2068SRick Macklem.Ed 352d47b2068SRick Macklem.sp 353d47b2068SRick MacklemWhen this completes, the recovery should be complete or at least nearly so. 354d47b2068SRick MacklemAs noted above, if a link/unlink or rename occurs on a file name while the 355d47b2068SRick Macklemabove 356d47b2068SRick Macklem.Xr find 1 357d47b2068SRick Macklemis in progress, it may not get copied. 358d47b2068SRick MacklemTo check for any file(s) not yet copied, the commands are: 359d47b2068SRick Macklem.Bd -literal -offset 360d47b2068SRick Macklem# cd <top-level-exported-dir> 361d47b2068SRick Macklem# find . -type f -exec pnfsdsfile {} \; | sed "/0\.0\.0\.0/!d" 362d47b2068SRick Macklem.Ed 363d47b2068SRick Macklem.sp 364d47b2068SRick MacklemIf this command prints out any file name(s), these files must 365d47b2068SRick Macklemhave the 366d47b2068SRick Macklem.Xr pnfsdscopymr 8 367d47b2068SRick Macklemcommand done on them to complete the recovery. 368d47b2068SRick Macklem.Bd -literal -offset 369*b8ac5c5aSRick Macklem# pnfsdscopymr -r /data3 <file-path-reported> 370d47b2068SRick Macklem.Ed 371d47b2068SRick Macklem.sp 372*b8ac5c5aSRick MacklemIf this commmand fails with the error 373*b8ac5c5aSRick Macklem.br 374*b8ac5c5aSRick Macklem.Dq pnfsdscopymr: Copymr failed for file <path>: Device not configured 375*b8ac5c5aSRick Macklem.br 376*b8ac5c5aSRick Macklemrepeatedly, this may be caused by a Read/Write layout that has not 377*b8ac5c5aSRick Macklembeen returned. 378*b8ac5c5aSRick MacklemThe only way to get rid of such a layout is to restart the 379*b8ac5c5aSRick Macklem.Xr nfsd 8 . 380*b8ac5c5aSRick Macklem.sp 381d47b2068SRick MacklemAll of these commands are designed to be 382d47b2068SRick Macklemdone while the pNFS service is running and can be re-run safely. 383d47b2068SRick Macklem.Pp 384d47b2068SRick MacklemFor a more detailed discussion of the setup and management of a pNFS service 385d47b2068SRick Macklemsee: 386d47b2068SRick Macklem.Bd -literal -offset indent 387d47b2068SRick Macklemhttp://people.freebsd.org/~rmacklem/pnfs-planb-setup.txt 388d47b2068SRick Macklem.Ed 389d47b2068SRick Macklem.sp 390d47b2068SRick Macklem.Sh SEE ALSO 391d47b2068SRick Macklem.Xr nfsv4 4 , 392d47b2068SRick Macklem.Xr pnfs 4 , 393d47b2068SRick Macklem.Xr exports 5 , 394d47b2068SRick Macklem.Xr fstab 5 , 395d47b2068SRick Macklem.Xr rc.conf 5 , 396d47b2068SRick Macklem.Xr sysctl.conf 5 , 397d47b2068SRick Macklem.Xr nfscbd 8 , 398d47b2068SRick Macklem.Xr nfsd 8 , 399d47b2068SRick Macklem.Xr nfsuserd 8 , 400d47b2068SRick Macklem.Xr pnfsdscopymr 8 , 401d47b2068SRick Macklem.Xr pnfsdsfile 8 , 402d47b2068SRick Macklem.Xr pnfsdskill 8 403d47b2068SRick Macklem.Sh HISTORY 404d47b2068SRick MacklemThe 405d47b2068SRick Macklem.Nm 406d47b2068SRick Macklemcommand first appeared in 407d47b2068SRick Macklem.Fx 12.0 . 408d47b2068SRick Macklem.Sh BUGS 409d47b2068SRick MacklemSince the MDS cannot be mirrored, it is a single point of failure just 410d47b2068SRick Macklemas a non 411d47b2068SRick Macklem.Tn pNFS 412d47b2068SRick Macklemserver is. 413d47b2068SRick MacklemFor non-mirrored configurations, all FreeBSD systems used in the service 414d47b2068SRick Macklemare single points of failure. 415