Once storage/gfid2path feature is enabled using `gluster volume set <volname> storage.gfid2path enable`, it starts recording the gfid2path xattr on each files. But this feature will not add xattr to the existing files. This tool accepts the file path as argument and sets the necessary xattr required for this feature. Change-Id: I75ad82c86ce482950645e687ff2e33b413fa53da Updates: #139 Signed-off-by: Aravinda VK <avishwan@redhat.com> Reviewed-on: https://review.gluster.org/17839 Smoke: Gluster Build System <jenkins@build.gluster.org> Reviewed-by: Niels de Vos <ndevos@redhat.com> Reviewed-by: Kotresh HR <khiremat@redhat.com> Tested-by: Kotresh HR <khiremat@redhat.com> CentOS-regression: Gluster Build System <jenkins@build.gluster.org>
55 lines
1.5 KiB
Groff
55 lines
1.5 KiB
Groff
|
|
.\" Copyright (c) 2017 Red Hat, Inc. <http://www.redhat.com>
|
|
.\" This file is part of GlusterFS.
|
|
.\"
|
|
.\" This file is licensed to you under your choice of the GNU Lesser
|
|
.\" General Public License, version 3 or any later version (LGPLv3 or
|
|
.\" later), or the GNU General Public License, version 2 (GPLv2), in all
|
|
.\" cases as published by the Free Software Foundation.
|
|
.\"
|
|
.\"
|
|
.TH gluster-setgfid2path 8 "Command line utility to set GFID to Path Xattrs"
|
|
.SH NAME
|
|
gluster-setgfid2path - Gluster tool to set GFID to Path xattrs
|
|
.SH SYNOPSIS
|
|
.B gluster-setgfid2path
|
|
.IR file
|
|
.SH DESCRIPTION
|
|
New feature introduced with Gluster release 3.12, to find full path from GFID.
|
|
This feature can be enabled using Volume set command \fBgluster volume set
|
|
<VOLUME> storage.gfid2path enable\fR
|
|
.PP
|
|
Once \fBgfid2path\fR feature is enabled, it starts recording the necessary
|
|
xattrs required for the feature. But it will not add xattrs for the already
|
|
existing files. This tool provides facility to update the gfid2path xattrs for
|
|
the given file path.
|
|
|
|
.SH EXAMPLES
|
|
To add xattrs of a single file,
|
|
.PP
|
|
.nf
|
|
.RS
|
|
gluster-setgfid2path /bricks/b1/hello.txt
|
|
.RE
|
|
.fi
|
|
.PP
|
|
To set xattr for all the existing files, run the below script on each bricks.
|
|
.PP
|
|
.nf
|
|
.RS
|
|
BRICK=/bricks/b1
|
|
find $BRICK -type d \\( -path "${BRICK}/.trashcan" -o -path \\
|
|
"${BRICK}/.glusterfs" \\) -prune -o -type f \\
|
|
-exec gluster-setgfid2path {} \\;
|
|
.RE
|
|
.fi
|
|
.PP
|
|
.SH SEE ALSO
|
|
.nf
|
|
\fBgluster\fR(8)
|
|
\fR
|
|
.fi
|
|
.SH COPYRIGHT
|
|
.nf
|
|
Copyright(c) 2017 Red Hat, Inc. <http://www.redhat.com>
|