From 590ae48c65a60c93c2e5407e3f663cef3daacc55 Mon Sep 17 00:00:00 2001 From: Amar Tumballi Date: Wed, 19 Jul 2017 23:08:05 +0530 Subject: glusterfsd: allow subdir mount Changes: 1. Take subdir mount option in client (mount.gluster / glusterfsd) 2. Pass the subdir mount to server-handshake (from client-handshake) 3. Handle subdir-mount dir's lookup in server-first-lookup and handle all fops resolution accordingly with proper gfid of subdir 4. Change the auth/addr module to handle the multiple subdir entries in option, and valid parsing. How to use the feature: `# mount -t glusterfs $hostname:/$volname/$subdir /$mount_point` Or `# mount -t glusterfs $hostname:/$volname -osubdir_mount=$subdir /$mount_point` Option can be set like: `# gluster volume set auth.allow "/subdir1(192.168.1.*),/(192.168.10.*),/subdir2(192.168.8.*)"` Updates #175 Change-Id: I7ea57f76ddbe6c3862cfe02e13f89e8a39719e11 Signed-off-by: Amar Tumballi Reviewed-on: https://review.gluster.org/17141 Smoke: Gluster Build System Reviewed-by: Shyamsundar Ranganathan CentOS-regression: Gluster Build System --- doc/glusterfs.8 | 3 +++ doc/mount.glusterfs.8 | 7 +++++-- 2 files changed, 8 insertions(+), 2 deletions(-) (limited to 'doc') diff --git a/doc/glusterfs.8 b/doc/glusterfs.8 index 701c25ecfac..520150a55e9 100644 --- a/doc/glusterfs.8 +++ b/doc/glusterfs.8 @@ -101,6 +101,9 @@ Mount the filesystem in 'worm' mode. .TP \fB\-\-xlator\-option=VOLUME\-NAME.OPTION=VALUE\fR Add/Override a translator option for a volume with the specified value. +.TP +\fB\-\-subdir\-mount=SUBDIR\-MOUNT\-PATH\fR +Mount subdirectory instead of the '/' of volume. .SS "Fuse options" .PP diff --git a/doc/mount.glusterfs.8 b/doc/mount.glusterfs.8 index 4e82c2fd57d..e16bbecb8b0 100644 --- a/doc/mount.glusterfs.8 +++ b/doc/mount.glusterfs.8 @@ -12,11 +12,11 @@ .SH NAME .B mount.glusterfs - script to mount native GlusterFS volume .SH SYNOPSIS -.B mount -t glusterfs [-o ] :/ +.B mount -t glusterfs [-o ] :/[/] .B .TP .B mount -t glusterfs [-o ] ,, -.B ,..:/ +.B ,..:/[/] .TP .TP .B mount -t glusterfs [-o ] @@ -95,6 +95,9 @@ Disable direct I/O mode in fuse kernel module \fBcongestion\-threshold=\fRN Set fuse module's congestion threshold to N [default: 48] .TP +\fsubdir\-mount=\fRN +Set the subdirectory mount option [default: NULL, ie, no subdirectory mount] +.TP .TP \fBbackup\-volfile\-servers=\fRSERVERLIST Provide list of backup volfile servers in the following format [default: None] -- cgit