%{_bindir}/lfs
%{_bindir}/lfs_migrate
/sbin/mount.lustre
+/sbin/mount.lustre_tgt
%if %{with static}
%{_libdir}/liblustreapi.a
%endif
lustre_routes_conversion.8 \
lustre_rsync.8 \
mount.lustre.8 \
+ mount.lustre_tgt.8 \
nids.5 \
plot-llstat.8 \
routerstat.8
.\"
.\" This file may be copied under the terms of the GNU Public License v2.
.\"
-.TH mount.lustre 8 "2008 Mar 15" Lustre "configuration utilities"
+.TH mount.lustre 8 "2019 Jul 30" Lustre "configuration utilities"
.SH NAME
-mount.lustre \- start a Lustre client or target service
+mount.lustre \- mount helper for Lustre client
+mount.lustre_tgt \- mount helper for Lustre target service
.SH SYNOPSIS
.br
-.BI "mount \-t lustre [\-o " options "] " "<block_device> <server_mountpoint>"
+.BI "mount -t lustre [-o " options "] " "<mgsname>:/<fsname> <client_mountpoint>"
.br
-.BI "mount \-t lustre [\-o " options "] " "<mgsname>:/<fsname> <client_mountpoint>"
+.BI "mount -t lustre_tgt [-o " options "] " "<block_device> <server_mountpoint>"
.SH DESCRIPTION
.B mount.lustre
-is used to start a Lustre client or target service. This program should not
-be called directly; rather it is a helper program invoked through
+and
+.B mount.lustre_tgt
+are used to start a Lustre client or target service, respectively. They
+should not be called directly; rather they are helper programs invoked through
.BR mount (8)
as above when the
.B lustre
+or
+.B lustre_tgt
filesystem type is used. Lustre clients and targets are stopped by using the
.BR umount (8)
command.
command, depending on whether a client or a target service is started:
.TP
.IR <mgsname> :/ <fsname>[/<subdir>]
-mounts the Lustre filesystem named
+mounts the Lustre client filesystem named
.I fsname
(optionally starting at subdirectory
.I subdir
provides a full POSIX-compilant interface.
.TP
.I block_device
-starts the target service defined by the
+specifies the phyisical disk or ZFS dataset uses to start the target service
+formatted by the
.IR mkfs.lustre (8)
-command on the physical disk or ZFS dataset given by
-.IR block_device .
-The
+command. The
.I block_device
may be specified using
.BI -L label
.I mountpoint
is only useful for
.BR df (1)
-operations and appears in
+operations to show the current space usage, and appears in
.BR /proc/mounts
to show the device is in use.
.SH OPTIONS
different interfaces on the same host, and the Lustre client chooses the best
one for communication based on which network interfaces are available locally.
.TP
-.B mount -t lustre /dev/sda1 /mnt/test/mdt
+.B mount -t lustre_tgt /dev/sda1 /mnt/test/mdt
Start the Lustre metadata target service from
.B /dev/sda1
on mountpoint
.BR /mnt/test/mdt .
.TP
-.B mount -t lustre -L testfs-MDT0000 -o abort_recov /mnt/test/mdt
+.B mount -t lustre_tgt -L testfs-MDT0000 -o abort_recov /mnt/test/mdt
Start the
.B testfs-MDT0000
-service (by using the disk label), but aborts the recovery process if
-all of the clients are known to be unavailable.
+service (by using the disk label), but aborts the Lustre client recovery
+process for the case that clients are known to be unavailable.
.SH BUGS
Not very many mount options can be changed with
.BR "-o remount" .
--- /dev/null
+.so man8/mount.lustre.8
#endif
err = IS_ERR(root) ? PTR_ERR(root) : -EBADF;
root = NULL;
- CERROR("lustre_lite: bad iget4 for root\n");
+ CERROR("%s: bad ll_iget() for root: rc = %d\n",
+ sbi->ll_fsname, err);
GOTO(out_root, err);
}
/**
* Parse mount line options
* e.g. mount -v -t lustre -o abort_recov uml1:uml2:/lustre-client /mnt/lustre
- * dev is passed as device=uml1:/lustre by mount.lustre
+ * dev is passed as device=uml1:/lustre by mount.lustre_tgt
*/
static int lmd_parse(char *options, struct lustre_mount_data *lmd)
{
LASSERT(lmd);
if (!options) {
LCONSOLE_ERROR_MSG(0x162,
- "Missing mount data: check /sbin/mount.lustre is installed.\n");
+ "Missing mount data: check /sbin/mount.lustre_tgt is installed.\n");
RETURN(-EINVAL);
}
/* Options should be a string - try to detect old lmd data */
if ((raw->lmd_magic & 0xffffff00) == (LMD_MAGIC & 0xffffff00)) {
LCONSOLE_ERROR_MSG(0x163,
- "Using an old version of /sbin/mount lustre. Please install version %s\n",
+ "Using an old version of /sbin/mount.lustre. Please install version %s\n",
LUSTRE_VERSION_STRING);
RETURN(-EINVAL);
}
kill_anon_super(sb);
}
+#ifdef HAVE_SERVER_SUPPORT
+/* Register the "lustre_tgt" fs type.
+ *
+ * Right now this isn't any different than the normal "lustre" filesystem
+ * type, but it is added so that there is some compatibility to allow
+ * changing documentation and scripts to start using the "lustre_tgt" type
+ * at mount time. That will simplify test interop, and in case of upgrades
+ * that change to the new type and then need to roll back for some reason.
+ *
+ * The long-term goal is to disentangle the client and server mount code.
+ */
+static struct file_system_type lustre_fs_type_tgt = {
+ .owner = THIS_MODULE,
+ .name = "lustre_tgt",
+#ifdef HAVE_FSTYPE_MOUNT
+ .mount = lustre_mount,
+#else
+ .get_sb = lustre_get_sb,
+#endif
+ .kill_sb = lustre_kill_super,
+ .fs_flags = FS_REQUIRES_DEV | FS_RENAME_DOES_D_MOVE,
+};
+MODULE_ALIAS_FS("lustre_tgt");
+
+#define register_filesystem_tgt(fstype) \
+do { \
+ int _rc; \
+ \
+ _rc = register_filesystem(fstype); \
+ if (_rc && _rc != -EBUSY) { \
+ /* Don't fail if server code also registers "lustre_tgt" */ \
+ CERROR("obdclass: register fstype '%s' failed: rc = %d\n", \
+ (fstype)->name, _rc); \
+ return _rc; \
+ } \
+} while (0)
+#define unregister_filesystem_tgt(fstype) unregister_filesystem(fstype)
+#else
+#define register_filesystem_tgt(fstype) do {} while (0)
+#define unregister_filesystem_tgt(fstype) do {} while (0)
+#endif
+
/* Register the "lustre" fs type */
static struct file_system_type lustre_fs_type = {
- .owner = THIS_MODULE,
- .name = "lustre",
+ .owner = THIS_MODULE,
+ .name = "lustre",
#ifdef HAVE_FSTYPE_MOUNT
- .mount = lustre_mount,
+ .mount = lustre_mount,
#else
- .get_sb = lustre_get_sb,
+ .get_sb = lustre_get_sb,
#endif
- .kill_sb = lustre_kill_super,
- .fs_flags = FS_REQUIRES_DEV | FS_RENAME_DOES_D_MOVE,
+ .kill_sb = lustre_kill_super,
+ .fs_flags = FS_REQUIRES_DEV | FS_RENAME_DOES_D_MOVE,
};
MODULE_ALIAS_FS("lustre");
int lustre_register_fs(void)
{
+ register_filesystem_tgt(&lustre_fs_type_tgt);
+
return register_filesystem(&lustre_fs_type);
}
int lustre_unregister_fs(void)
{
+ unregister_filesystem_tgt(&lustre_fs_type_tgt);
+
return unregister_filesystem(&lustre_fs_type);
}
/Makefile.in
/mkfs.lustre
/mount.lustre
+/mount.lustre_tgt
/tunefs.lustre
/lctl
/lfs
endif
# mount only finds helpers in /sbin
-rootsbin_PROGRAMS = mount.lustre
+rootsbin_PROGRAMS = mount.lustre mount.lustre_tgt
bin_SCRIPTS = llstat llobdstat plot-llstat
bin_PROGRAMS = lfs
sbin_SCRIPTS = ldlm_debug_upcall
mount_lustre_LDFLAGS := ${MNTMODLDFLAGS}
mount_lustre_LDADD := $(SELINUX) $(LDLIBMOUNT) $(PLUGIN_LIB) $(GSSLIB) \
$(top_builddir)/libcfs/libcfs/libcfs.la $(MNTMODLIBS)
+mount_lustre_tgt_SOURCES = ${mount_lustre_SOURCES}
+mount_lustre_tgt_CPPFLAGS = ${mount_lustre_CPPFLAGS}
+mount_lustre_tgt_LDFLAGS = ${mount_lustre_LDFLAGS}
+mount_lustre_tgt_LDADD = ${mount_lustre_LDADD}
mkfs_lustre_SOURCES = mkfs_lustre.c mount_utils.c mount_utils.h $(GSSSRC)
mkfs_lustre_CPPFLAGS := -UTUNEFS ${MNTMODCFLAGS}
/* Is this a lustre fs? */
int llapi_is_lustre_mnttype(const char *type)
{
- return (strcmp(type, "lustre") == 0 || strcmp(type,"lustre_lite") == 0);
+ return strcmp(type, "lustre") == 0 || strcmp(type, "lustre_tgt") == 0;
}
/* Is this a lustre client fs? */